Bug#428725: initramfs-tools: please provide hook to initialize LVM before mounting crypto-root
Package: initramfs-tools
Version: 0.88
Severity: normal
Hi,
I have my root filesystem on an encrypted LV:
$ grep root /etc/crypttab
root /dev/vg0/c_root none luks,keyscript=/etc/keyscript_scyw00225
$ grep root /etc/fstab
/dev/mapper/root / ext3 defaults,errors=remount-ro 0 1
$
In this setup, the initrd does not start the LVM before trying to
unlock the crypto filesystem. From my diagnosis, it looks like
scripts/local-top/lvm2 looks whether the file system given to the
kernel on its command line is directly on an LV and only starts the
appropriate VG in this case. It does not seem to detect the
possibility of the root FS being on an encrypted LV.
A possible solution to this would be to provide a hook to override the
ROOT variable for the lvm2 script.
I have worked around this by copying the lvm2 script to
/etc/initramfs-tools/scripts/local-top and to hardcode an "activate_vg
/dev/mapper/vg0-c_root" there.
Greetings
Marc
-- Package-specific info:
-- /proc/cmdline
root=/dev/mapper/root ro video=radeon:force_sleep,1400x1050-24@60 initrd=initrd BOOT_IMAGE=vmlinuz
-- /proc/filesystems
cramfs
ext3
-- lsmod
Module Size Used by
tun 10304 1
ieee80211_crypt_ccmp 7008 2
appletalk 33632 2
ax25 49744 2
ipx 26052 2
p8023 2080 1 ipx
radeon 110528 1
drm 73908 2 radeon
rfcomm 35480 7
hidp 18272 2
hid 23680 1 hidp
l2cap 22208 10 rfcomm,hidp
ppdev 8580 0
lp 10884 0
tcp_diag 1760 0
inet_diag 11336 2 tcp_diag
ipv6 236320 18
button 7952 0
ac 5220 0
battery 10020 0
binfmt_misc 10984 1
cpufreq_powersave 1792 0
cpufreq_stats 5120 0
cpufreq_conservative 6888 0
cpufreq_ondemand 7884 0
cpufreq_userspace 4128 1
speedstep_centrino 9220 1
freq_table 4512 3 cpufreq_stats,cpufreq_ondemand,speedstep_centrino
sr_mod 16100 0
sbp2 21188 0
tsdev 7520 0
joydev 9152 0
irtty_sir 8064 0
pcmcia 35276 0
sir_dev 15300 1 irtty_sir
irda 172668 2 irtty_sir,sir_dev
crc_ccitt 2144 1 irda
parport_pc 32740 1
parport 33672 3 ppdev,lp,parport_pc
rtc 12760 0
serio_raw 6564 0
psmouse 34952 0
ipw2200 130628 0
pcspkr 3136 0
ieee80211 30984 1 ipw2200
ieee80211_crypt 5792 2 ieee80211_crypt_ccmp,ieee80211
snd_intel8x0 32060 5
i2c_i801 8560 0
firmware_class 9408 2 pcmcia,ipw2200
snd_intel8x0m 16716 6
snd_ac97_codec 92356 2 snd_intel8x0,snd_intel8x0m
ac97_bus 2272 1 snd_ac97_codec
snd_pcm_oss 39168 0
snd_mixer_oss 15328 1 snd_pcm_oss
snd_pcm 71940 8 snd_intel8x0,snd_intel8x0m,snd_ac97_codec,snd_pcm_oss
snd_timer 20868 3 snd_pcm
snd 48132 23 snd_intel8x0,snd_intel8x0m,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 7424 1 snd
snd_page_alloc 9512 3 snd_intel8x0,snd_intel8x0m,snd_pcm
i2c_core 20480 1 i2c_i801
yenta_socket 24876 3
rsrc_nonstatic 11968 1 yenta_socket
pcmcia_core 36884 3 pcmcia,yenta_socket,rsrc_nonstatic
iTCO_wdt 9956 0
hci_usb 16220 6
bluetooth 48484 16 rfcomm,hidp,l2cap,hci_usb
shpchp 30996 0
pci_hotplug 29088 1 shpchp
intel_agp 23004 1
agpgart 32168 2 drm,intel_agp
evdev 9216 5
eth1394 18276 0
ext3 120904 5
jbd 55208 1 ext3
mbcache 8164 1 ext3
sha256 11008 0
aes 27680 14
cbc 4256 6
blkcipher 5956 1 cbc
dm_crypt 12808 1
raid10 22560 0
raid456 120336 0
xor 14376 1 raid456
raid1 22080 0
raid0 7968 0
multipath 8416 0
linear 5856 0
md_mod 72628 6 raid10,raid456,raid1,raid0,multipath,linear
ide_generic 1344 0 [permanent]
dm_mirror 20116 0
dm_snapshot 16420 0
dm_mod 52556 28 dm_crypt,dm_mirror,dm_snapshot
ide_cd 36512 0
cdrom 32768 2 sr_mod,ide_cd
ide_disk 15648 2
usb_storage 76384 0
piix 9508 0 [permanent]
generic 4804 0 [permanent]
ide_core 115016 6 ide_generic,ide_cd,ide_disk,usb_storage,piix,generic
tg3 99812 0
ohci1394 32432 0
ieee1394 89560 3 sbp2,eth1394,ohci1394
ata_generic 8100 0
libata 109172 1 ata_generic
scsi_mod 133740 4 sr_mod,sbp2,usb_storage,libata
ehci_hcd 30796 0
uhci_hcd 22608 0
usbcore 123304 5 hci_usb,usb_storage,ehci_hcd,uhci_hcd
thermal 14120 0
processor 30888 2 speedstep_centrino,thermal
fan 4868 0
-- /etc/kernel-img.conf
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
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: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-1-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initramfs-tools depends on:
ii busybox 1:1.1.3-4 Tiny utilities for small and embed
ii cpio 2.8-1 GNU cpio -- a program to manage ar
ii klibc-utils 1.5-2 small statically-linked utilities
ii module-init-tools 3.3-pre11-1 tools for managing Linux kernel mo
ii udev 0.105-4 /dev/ and hotplug management daemo
initramfs-tools recommends no packages.
-- no debconf information
Reply to: