Bug#459632: initramfs-tools: Unable to detect LVM correctly if root device does not match /dev/mapper/*
Package: initramfs-tools
Version: 0.91d
Severity: critical
Justification: breaks the whole system
I've got a LVM setup on top of a raid1 (soft raid). Raid is detected fine but
the LVM was not.
Here is the problem.
LVM has an 'lvm' volume group and a 'root' logical volume.
Udev has two entries for this device :
- /dev/mapper/lvm-root
- /dev/lvm/root
On my first try, I had /dev/lvm/root defined as the mounted root device (in
/etc/mtab). Even if /dev/lvm/root is a symlink to /dev/mapper/lvm-root,
initramfs does not detect it as a LVM volume and therefore does not include
the scripts in the initrd.
The thing is, when detecting the root filesystem device, the script should
check if the device is a link and if so, check if the target is of the
form /dev/mapper/*
Changing the root filesystem to /dev/mapper/lvm-root solved the problem (after
I wasted about an hour).
-- Package-specific info:
-- /proc/cmdline
root=/dev/mapper/lvm-root ro
-- /proc/filesystems
cramfs
ext3
fuseblk
vfat
-- lsmod
Module Size Used by
nls_iso8859_1 4128 0
nls_cp437 5792 0
vfat 12032 0
fat 48540 1 vfat
binfmt_misc 11112 1
ppdev 8676 0
parport_pc 33828 0
lp 10980 0
parport 33960 3 ppdev,parport_pc,lp
button 7920 0
ac 5188 0
battery 9988 0
ipv6 236996 438
fuse 41908 3
snd_seq_dummy 3748 0
snd_seq_oss 29408 0
snd_seq_midi 8160 0
snd_rawmidi 22624 1 snd_seq_midi
snd_seq_midi_event 6880 2 snd_seq_oss,snd_seq_midi
snd_seq 46320 6
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_seq_device 7692 5
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
sidewinder 11744 0
ns558 4704 0
gameport 14984 2 sidewinder,ns558
w83627hf 22964 0
w83781d 26700 0
hwmon_vid 2944 2 w83627hf,w83781d
eeprom 7024 0
i2c_isa 4192 0
cryptoloop 2912 0
loop 16932 1 cryptoloop
nvidia 6215760 24
ath_rate_sample 11808 1
tsdev 7968 0
ath_pci 88384 0
snd_intel8x0 32124 1
wlan 183620 3 ath_rate_sample,ath_pci
snd_ac97_codec 92836 1 snd_intel8x0
ath_hal 191504 3 ath_rate_sample,ath_pci
ac97_bus 2272 1 snd_ac97_codec
snd_pcm_oss 39200 0
snd_mixer_oss 15424 1 snd_pcm_oss
snd_pcm 72324 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
psmouse 36016 0
pcspkr 3104 0
snd_timer 21028 2 snd_seq,snd_pcm
serio_raw 6692 0
i2c_i801 8656 0
iTCO_wdt 9924 0
rtc 12856 0
snd 48324 12
snd_seq_oss,snd_rawmidi,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,
snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 7520 1 snd
snd_page_alloc 10056 2 snd_intel8x0,snd_pcm
i2c_core 23552 5 w83781d,eeprom,i2c_isa,nvidia,i2c_i801
shpchp 31060 0
pci_hotplug 29184 1 shpchp
intel_agp 23188 1
agpgart 31912 2 nvidia,intel_agp
vdev 9312 3
ext3 121288 4
jbd 55336 1 ext3
mbcache 8260 1 ext3
dm_mirror 20928 0
dm_snapshot 16900 0
dm_mod 52160 9 dm_mirror,dm_snapshot
raid1 22336 2
md_mod 73588 5 raid1
sg 32668 0
sr_mod 16516 0
cdrom 32832 1 sr_mod
ide_disk 16512 3
usb_storage 76608 0
generic 4836 0 [permanent]
piix 8868 0 [permanent]
ide_core 113764 4 ide_disk,usb_storage,generic,piix
ata_piix 13348 0
skge 38096 0
ata_generic 7556 0
ehci_hcd 30796 0
uhci_hcd 22960 0
floppy 54884 0
usbcore 125416 4 usb_storage,ehci_hcd,uhci_hcd
sd_mod 27136 6
thermal 13416 0
processor 31176 1 thermal
fan 4836 0
sata_sx4 12388 0
sata_via 11460 0
sata_promise 12228 5
libata 115984 5
ata_piix,ata_generic,sata_sx4,sata_via,sata_promise
scsi_mod 136620 5 sg,sr_mod,usb_storage,sd_mod,libata
-- /etc/kernel-img.conf
# Kernel Image management overrides
# See kernel-img.conf(5) for details
do_symlinks = no
do_initrd = Yes
postinst_hook = /usr/sbin/update-grub
postrm_hook = /usr/sbin/update-grub
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
BOOT=local
DEVICE=eth0
NFSROOT=auto
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.utf8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initramfs-tools depends on:
ii cpio 2.9-9 GNU cpio -- a program to manage
ar
ii findutils 4.2.31-4 utilities for finding
files--find,
ii klibc-utils 1.5.7-4 small statically-linked utilities
ii module-init-tools 3.3-pre11-4 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.1.3-5 Tiny utilities for small and
embed
-- no debconf information
Reply to: