Bug#483082: initramfs-tools: Error while detecting rootfs when 'MODULES=dep'
Package: initramfs-tools
Version: 0.92a
Severity: grave
Tags: patch
Justification: renders package unusable
Hello,
When MODULES is set to 'dep' in /etc/initramfs-tools/initramfs.conf,
update-initramfs fails to detect correctly the root filesystem(device
and fs used). When called, this command fails with:
----------
mkinitramfs: missing rootfs root rootfs /sys entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-2.6.25-2-amd64
----------
This bug added with #479607, makes 2 of machines unsuable with 2.6.25 kernel series.
The attached patch resolves the issue on my machines. Please, review the patch and consider it for the next release of this package.
Thanks,
-- Package-specific info:
-- /proc/cmdline
BOOT_IMAGE=Linux ro root=UUID=76188785-a331-44de-a9b8-12f07ce5172d profile=64 noisapnp
-- /proc/filesystems
ext3
fuseblk
-- lsmod
Module Size Used by
binfmt_misc 17164 1
ppdev 13832 0
parport_pc 34344 0
lp 17540 0
parport 44848 3 ppdev,parport_pc,lp
autofs4 28552 1
battery 14208 0
container 9600 0
video 27412 0
output 8704 1 video
ac 9344 0
sbs 14336 0
sbshc 11904 1 sbs
wmi 13120 0
ipv6 294120 24
fuse 53440 1
loop 23044 0
ide_cd_mod 41504 0
cdrom 39464 1 ide_cd_mod
ide_disk 20096 2
ata_generic 13572 0
ipaq 44184 0
usbserial 41328 1 ipaq
snd_ens1371 32448 1
gameport 20368 1 snd_ens1371
snd_ac97_codec 118488 1 snd_ens1371
ac97_bus 6528 1 snd_ac97_codec
snd_pcm_oss 46752 0
snd_pcm 88072 3 snd_ens1371,snd_ac97_codec,snd_pcm_oss
snd_mixer_oss 21376 1 snd_pcm_oss
snd_seq_dummy 8580 0
snd_seq_oss 36736 0
snd_seq_midi 13376 0
snd_rawmidi 31008 2 snd_ens1371,snd_seq_midi
via82cxxx 12932 0 [permanent]
snd_seq_midi_event 12544 2 snd_seq_oss,snd_seq_midi
snd_seq 58912 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 29328 2 snd_pcm,snd_seq
snd_seq_device 12948 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 66888 12 snd_ens1371,snd_ac97_codec,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 13088 1 snd
serio_raw 11652 0
3c59x 50996 0
floppy 66984 0
snd_page_alloc 15120 1 snd_pcm
k8temp 10624 0
i2c_viapro 13976 0
pcspkr 7808 0
psmouse 45724 0
i2c_core 30752 1 i2c_viapro
ehci_hcd 40076 0
ide_pci_generic 9476 0 [permanent]
uhci_hcd 29472 0
ide_core 138160 4 ide_cd_mod,ide_disk,via82cxxx,ide_pci_generic
atl1 39436 0
mii 10240 2 3c59x,atl1
shpchp 38300 0
pci_hotplug 35512 1 shpchp
button 13856 0
evdev 17408 4
ext3 139280 9
jbd 55336 1 ext3
mbcache 13956 1 ext3
dm_mirror 31748 0
dm_snapshot 22472 0
dm_mod 68536 7 dm_mirror,dm_snapshot
raid10 27392 0
raid456 129824 0
async_xor 7424 1 raid456
async_memcpy 6400 1 raid456
async_tx 7168 1 raid456
xor 10128 2 raid456,async_xor
raid1 28032 0
raid0 12032 0
multipath 13440 0
linear 10112 0
md_mod 87204 6 raid10,raid456,raid1,raid0,multipath,linear
sd_mod 33728 10
thermal 26656 0
processor 49388 1 thermal
fan 10760 0
sata_via 17412 9
libata 165808 2 ata_generic,sata_via
scsi_mod 170360 2 sd_mod,libata
dock 16288 1 libata
-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = yes
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
-- /etc/initramfs-tools/initramfs.conf
MODULES=dep
ROOT="UUID=76188785-a331-44de-a9b8-12f07ce5172d"
BUSYBOX=y
KEYMAP=y
BOOT=local
DEVICE=eth0
NFSROOT=auto
-- /sys/block
dm-0
dm-1
hda
hdd
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
ram0
ram1
ram10
ram11
ram12
ram13
ram14
ram15
ram2
ram3
ram4
ram5
ram6
ram7
ram8
ram9
sda
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initramfs-tools depends on:
ii cpio 2.9-13 GNU cpio -- a program to manage ar
ii findutils 4.4.0-2 utilities for finding files--find,
ii klibc-utils 1.5.9-2 small utilities built with klibc f
ii module-init-tools 3.4-1 tools for managing Linux kernel mo
ii udev 0.114-2 /dev/ and hotplug management daemo
Versions of packages initramfs-tools recommends:
ii busybox 1:1.9.2-3 Tiny utilities for small and embed
-- no debconf information
--- /tmp/hook-functions 2008-05-26 21:32:24.000000000 +0200
+++ /usr/share/initramfs-tools/hook-functions 2008-05-26 21:24:46.000000000 +0200
@@ -222,7 +222,11 @@ dep_add_modules()
local block minor root FSTYPE root_dev_path x
# findout root block device + fstype
- eval "$(mount | awk '/ \/ / {print "root=" $1 "\nFSTYPE=" $5; exit}')"
+ eval "$(mount | awk '/ \/dev\// {if ($3 = "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')"
+ if [ "${root}" = "/dev/root" ] ; then
+ root="/dev/disk/by-uuid/"$(/lib/udev/vol_id --uuid ${root}) 2>/dev/null
+ fi
+ root="$(readlink -f ${root})"
# find out real rootfs on auto type
if [ "${FSTYPE}" = "auto" ]; then
Reply to: