Bug#594092: initramfs-tools: Detection of resume device could terminate prematurely
Package: initramfs-tools
Version: 0.98
Severity: normal
Hi,
My configuration includes (among other things) encrypted swap + uswsusp.
Within last month one of the initrams-tools upgrades rendered my setup unusable: resume device (/dev/mapper/swap) was not available during boot.
I went and peppered /usr/share/initramfs-tools/hooks/cryptroot with debug output and found out that:
1)I have (orphaned) /etc/suspend.conf lying around since Good Olde Times which lists /dev/sda8 as resume target
2)All other (proper) places list /dev/mapper/swap as resume target
3)"cryptroot" hook terminates prematurely trying to find canonical name for /dev/sda8.
Specifically, line 97 of "cryptroot":
device=$(canonical_device "$device") || return 0
causes hook to terminate prematurely, broking the resume process. I think that old config files lying around are not the only possible cause for breakage in this place, so other users might be affected as well - for example, if they made errors in their config files.
I think that either user should be warned ("Resume device ... is not available, fix manually") or more sensible approach to error handling should be employed.
Thank you!
-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 8.8M Aug 23 18:59 /boot/initrd.img-2.6.30-1-686
-rw-r--r-- 1 root root 8.6M Aug 10 15:04 /boot/initrd.img-2.6.30-1-686.bak
-- /proc/cmdline
root=/dev/sda1 ro ramdisk_size=8192 resume=/dev/mapper/swap
-- resume
RESUME=/dev/mapper/swap
-- /proc/filesystems
ext2
ext3
fuseblk
-- lsmod
Module Size Used by
iwl3945 61064 0
omnibook 47824 0
sco 8832 2
rfcomm 30368 14
bnep 10860 4
l2cap 18120 19 rfcomm,bnep
vboxnetadp 6428 0
vboxnetflt 12324 0
vboxdrv 155584 2 vboxnetadp,vboxnetflt
acpi_cpufreq 7640 0
cpufreq_powersave 1292 0
cpufreq_userspace 2768 0
cpufreq_stats 3520 0
cpufreq_conservative 6256 2
autofs4 20544 1
irda 95720 0
crc_ccitt 1816 1 irda
binfmt_misc 7120 1
vmnet 33260 13
parport_pc 22420 0
parport 31144 1 parport_pc
vmblock 11256 1
vmci 42584 0
vmmon 59876 0
kvm_intel 39744 0
kvm 138608 1 kvm_intel
fuse 47752 1
nfsd 204900 0
exportfs 3792 1 nfsd
nfs 221580 0
lockd 57972 2 nfsd,nfs
fscache 34440 1 nfs
nfs_acl 2640 2 nfsd,nfs
auth_rpcgss 31416 2 nfsd,nfs
sunrpc 163772 6 nfsd,nfs,lockd,nfs_acl,auth_rpcgss
ext3 107172 3
jbd 41036 1 ext3
btusb 10276 2
bluetooth 47060 9 sco,rfcomm,bnep,l2cap,btusb
visor 13812 0
usbserial 27456 1 visor
coretemp 5176 0
ip_tables 10188 0
x_tables 14108 1 ip_tables
sha256_generic 11216 0
cbc 3012 1
aes_i586 8092 4
aes_generic 27436 1 aes_i586
dm_crypt 11092 3
dm_mod 49992 7 dm_crypt
snd_hda_codec_si3054 4024 1
snd_hda_codec_realtek 178472 1
snd_hda_intel 22192 0
snd_hda_codec 63580 3 snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 6120 1 snd_hda_codec
arc4 1560 2
snd_pcm_oss 32232 0
snd_mixer_oss 12368 1 snd_pcm_oss
ecb 2368 4
snd_pcm 62420 4 snd_hda_codec_si3054,snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_midi 5688 0
snd_rawmidi 18596 1 snd_seq_midi
iwlcore 92264 1 iwl3945
snd_seq_midi_event 6212 1 snd_seq_midi
pcmcia 24280 0
snd_seq 42436 2 snd_seq_midi,snd_seq_midi_event
snd_timer 17436 2 snd_pcm,snd_seq
snd_seq_device 6136 3 snd_seq_midi,snd_rawmidi,snd_seq
joydev 8576 0
snd 49060 12 snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
mac80211 142848 2 iwl3945,iwlcore
yenta_socket 21168 1
tifm_7xx1 4864 0
intel_agp 22900 0
rsrc_nonstatic 9664 1 yenta_socket
soundcore 6184 1 snd
i2c_i801 8564 0
nvidia 8869740 31
pcmcia_core 31212 3 pcmcia,yenta_socket,rsrc_nonstatic
pcspkr 2104 0
rng_core 3672 0
rfkill 9668 2 iwlcore
snd_page_alloc 8180 2 snd_hda_intel,snd_pcm
psmouse 37528 0
tifm_core 7104 1 tifm_7xx1
agpgart 30836 2 intel_agp,nvidia
i2c_core 20844 2 i2c_i801,nvidia
battery 6012 0
processor 34504 3 acpi_cpufreq
video 18044 0
container 3244 0
ac 2960 0
button 5060 0
cfg80211 55556 3 iwl3945,iwlcore,mac80211
input_polldev 3588 0
serio_raw 4560 0
output 2604 1 video
evdev 8028 18
ext2 54120 1
mbcache 6924 2 ext3,ext2
ahci 30068 0
sg 20296 0
sr_mod 13264 0
cdrom 30316 1 sr_mod
sd_mod 28748 6
crc_t10dif 1632 1 sd_mod
ata_generic 4340 0
ide_pci_generic 3632 0
ide_core 88100 1 ide_pci_generic
ata_piix 20848 5
uhci_hcd 19132 0
firewire_ohci 18952 0
firewire_core 37736 1 firewire_ohci
crc_itu_t 2148 1 firewire_core
sdhci_pci 6540 0
sdhci 14868 1 sdhci_pci
mmc_core 46384 1 sdhci
led_class 3852 3 iwl3945,iwlcore,sdhci
ehci_hcd 29680 0
libata 150904 3 ahci,ata_generic,ata_piix
e100 27464 0
mii 4664 1 e100
scsi_mod 131800 4 sg,sr_mod,sd_mod,libata
usbcore 126004 6 btusb,visor,usbserial,uhci_hcd,ehci_hcd
fan 4044 0
thermal 12580 0
thermal_sys 13140 4 processor,video,fan,thermal
-- /etc/kernel-img.conf
# Do not create symbolic links in /
Do_Symlinks = Yes
do_initrd = Yes
postinst_hook = /usr/sbin/update-grub
postrm_hook = /usr/sbin/update-grub
do_bootloader = no
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=local
DEVICE=
NFSROOT=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no
-- /etc/crypttab
# <target device> <source device> <key file> <options>
home /dev/sda6 none luks,checkargs=ext3
var /dev/sda7 none luks,checkargs=ext3
swap /dev/sda8 none swap,luks,timeout=30
-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
/usr/share/initramfs-tools/hooks:
busybox
cryptgnupg
cryptopenct
cryptopensc
cryptpassdev
cryptroot
cryptroot.orig
dmsetup
keymap
klibc
thermal
udev
uswsusp
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF8, LC_CTYPE=en_US.UTF8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initramfs-tools depends on:
ii cpio 2.11-4 GNU cpio -- a program to manage ar
ii findutils 4.4.2-1 utilities for finding files--find,
ii klibc-utils 1.5.15-1 small utilities built with klibc f
ii module-init-tools 3.12-1 tools for managing Linux kernel mo
ii udev 161-1 /dev/ and hotplug management daemo
Versions of packages initramfs-tools recommends:
ii busybox 1:1.17.1-2 Tiny utilities for small and embed
Versions of packages initramfs-tools suggests:
ii bash-completion 1:1.2-2 programmable completion for the ba
-- no debconf information
Reply to: