[pkg-cryptsetup-devel] Bug#573073: cryptsetup: boot fails because fsck tries to access the device before it is unlocked
Linas Žvirblis
0x0007 at gmail.com
Mon Mar 8 17:44:57 UTC 2010
Package: cryptsetup
Version: 2:1.1.0~rc2-1
Severity: normal
I am using cryptsetup with lvm2 and encrypted logical volumes. The setup
was created during install with Debian Installer. The problem is that
sometimes it boot fine, but sometimes it dies like shown in boot
sequence transcript below. The passphrase is not being asked then.
When it dies I just rerun the script manually, and continue with boot
sequence. To me it seems like some sort of race condition, but I was
unable to locate the problem.
A while ago the chances of booting properly were close to 50%, but
something in recent upgrades greatly reduced the odds, as I have not
managed to get a proper boot in like 10 reboots.
-- Boot sequence transcript (as it appears on screen):
[...]
Setting up LVM Volume Groups Reading all physical volumes. This may
take a while...
Found volume group "vg01" using metadata type lvm2
4 logical volume(s) in volume group "vg01" now active
.
Starting remaining crypto disks...vg01-swap_crypt (starting)...
modprobe: FATAL: Error inserting padlock_sha
(/lib/modules/2.6.33-2-amd64/kernel/drivers/crypto/padlock-sha.ko): No
such device
done.
Checking file systems...fsck from util-linux-ng 2.17
boot: clean 203/62496 files, 29925/249856 blocks
fsck.ext4: No such file or directory while trying to
open /dev/mapper/vg01-home_crypt
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate
superblock:
e2fsck -b 8193 <device>
fsck died with exit status 8
failed (code 8).
File system check failed. A log is being saved [...]
[...]
# /etc/init.d/cryptdisks start
Starting remaining crypto disks...vg01-home_crypt (starting)...
Unlocking the disk /dev/disk/by-uid [...] (vg01-home_crypt)
Enter passphrase:
Key slot 0 unlocked.
done.
[...]
-- Partition structure:
/dev/sda1 -> vg01 -> vg01-boot -> Not encrypted -> /boot
/dev/sda1 -> vg01 -> vg01-root -> Not encrypted -> /
/dev/sda1 -> vg01 -> vg01-swap -> vg01-swap_crypt (random) -> swap
/dev/sda1 -> vg01 -> vg01-home -> vg01-home_crypt (pass) -> /home
-- Package-specific info:
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-2.6.33-2-amd64 root=/dev/mapper/vg01-root ro
noresume hpet=force quiet
-- /etc/crypttab
vg01-home_crypt UUID=cc93c5dd-a2fc-4822-a4fc-acd3f0e108a2 none luks
vg01-swap_crypt /dev/mapper/vg01-swap /dev/urandom
cipher=aes-cbc-essiv:sha256,size=256,swap
-- /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name
devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/vg01-root / ext4 errors=remount-ro 0 1
/dev/mapper/vg01-boot /boot ext4 defaults 0 2
/dev/mapper/vg01-home_crypt /home ext4 defaults 0 2
/dev/mapper/vg01-swap_crypt none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
-- lsmod
Module Size Used by
ppdev 5565 0
lp 8201 0
sco 7257 2
rfcomm 29762 0
bridge 39813 0
stp 1440 1 bridge
bnep 9722 2
l2cap 25274 6 rfcomm,bnep
bluetooth 42103 6 sco,rfcomm,bnep,l2cap
powernow_k8 10978 1
cpufreq_powersave 902 0
cpufreq_stats 2659 0
cpufreq_userspace 2024 0
cpufreq_conservative 7910 0
binfmt_misc 6550 1
uinput 6687 1
fuse 50478 1
ipt_REJECT 1953 1
xt_limit 1798 1
xt_tcpudp 2319 8
ipt_addrtype 1769 4
xt_state 1303 6
ip6table_filter 2416 1
ip6_tables 15290 1 ip6table_filter
nf_nat_irc 1398 0
nf_conntrack_irc 3379 1 nf_nat_irc
nf_nat_ftp 2063 0
nf_nat 13532 2 nf_nat_irc,nf_nat_ftp
nf_conntrack_ipv4 9705 8 nf_nat
nf_defrag_ipv4 1139 1 nf_conntrack_ipv4
nf_conntrack_ftp 5569 1 nf_nat_ftp
nf_conntrack 45895 7
xt_state,nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_nat,nf_conntrack_ipv4,nf_conntrack_ftp
iptable_filter 2290 1
ip_tables 14114 1 iptable_filter
x_tables 12957 7
ipt_REJECT,xt_limit,xt_tcpudp,ipt_addrtype,xt_state,ip6_tables,ip_tables
sha256_generic 8692 4
cryptd 5504 0
aes_x86_64 7340 4
aes_generic 25714 1 aes_x86_64
cbc 2539 2
loop 11902 0
firewire_sbp2 11562 0
radeon 551969 2
ttm 40361 1 radeon
drm_kms_helper 20097 1 radeon
drm 143558 4 radeon,ttm,drm_kms_helper
i2c_algo_bit 4225 1 radeon
dm_crypt 10744 2
usbhid 33411 0
hid 63497 1 usbhid
usb_storage 38425 0
snd_hda_codec_analog 64565 1
snd_hda_intel 20179 1
snd_hda_codec 57782 2 snd_hda_codec_analog,snd_hda_intel
snd_hwdep 5428 1 snd_hda_codec
snd_pcm_oss 32790 0
snd_mixer_oss 12654 1 snd_pcm_oss
snd_pcm 61254 3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
arc4 1274 2
snd_seq_midi 4432 0
ecb 1841 2
sg 18959 0
snd_rawmidi 15810 1 snd_seq_midi
snd_seq_midi_event 4628 1 snd_seq_midi
b43 149818 0
rng_core 3158 1 b43
mac80211 140504 1 b43
sr_mod 12602 0
snd_seq 43279 2 snd_seq_midi,snd_seq_midi_event
cdrom 29358 1 sr_mod
cfg80211 105832 2 b43,mac80211
ssb 38363 1 b43
sdhci_pci 6218 0
sdhci 14030 1 sdhci_pci
mmc_core 46156 3 b43,ssb,sdhci
snd_timer 15749 2 snd_pcm,snd_seq
snd_seq_device 4493 3 snd_seq_midi,snd_rawmidi,snd_seq
pata_atiixp 3521 0
snd 47090 13
snd_hda_codec_analog,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
ohci_hcd 19324 0
tpm_infineon 7499 0
tpm_tis 7336 0
ehci_hcd 31298 0
hp_wmi 4306 0
tpm 9933 2 tpm_infineon,tpm_tis
tg3 99773 0
joydev 8546 0
tifm_7xx1 3834 0
rfkill 13164 5 bluetooth,cfg80211,hp_wmi
libphy 13923 1 tg3
wmi 5461 1 hp_wmi
tifm_core 4372 1 tifm_7xx1
pcspkr 1699 0
tpm_bios 4521 1 tpm
usbcore 126389 5 usbhid,usb_storage,ohci_hcd,ehci_hcd
led_class 2417 2 b43,sdhci
firewire_ohci 19490 0
edac_core 29261 0
i2c_piix4 8328 0
k8temp 3139 0
firewire_core 37807 2 firewire_sbp2,firewire_ohci
container 2389 0
yenta_socket 19147 1
soundcore 4822 1 snd
edac_mce_amd 6425 0
pcmcia 17957 2 b43,ssb
i2c_core 15385 5
radeon,drm_kms_helper,drm,i2c_algo_bit,i2c_piix4
rsrc_nonstatic 7294 1 yenta_socket
pcmcia_core 24631 3 yenta_socket,pcmcia,rsrc_nonstatic
video 18001 0
output 1692 1 video
parport_pc 18855 1
shpchp 26264 0
evdev 7384 24
snd_page_alloc 6313 2 snd_hda_intel,snd_pcm
button 4634 0
processor 29489 1 powernow_k8
battery 4998 0
ac 2192 0
parport 27314 3 ppdev,lp,parport_pc
pci_hotplug 21251 1 shpchp
psmouse 45587 0
serio_raw 3960 0
nls_base 6377 1 usbcore
crc_itu_t 1307 1 firewire_core
ext4 278926 3
mbcache 5050 1 ext4
jbd2 63225 1 ext4
crc16 1319 2 l2cap,ext4
dm_mod 55446 17 dm_crypt
sd_mod 30459 2
crc_t10dif 1276 1 sd_mod
thermal 11889 0
fan 3266 0
thermal_sys 11990 4 video,processor,thermal,fan
ata_generic 3015 0
sata_sil 7412 2
libata 133993 3 pata_atiixp,ata_generic,sata_sil
scsi_mod 123365 6
firewire_sbp2,usb_storage,sg,sr_mod,sd_mod,libata
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.33-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=da_DK.UTF-8, LC_CTYPE=da_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages cryptsetup depends on:
ii dmsetup 2:1.02.39-1 The Linux Kernel Device Mapper use
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.39-1 The Linux Kernel Device Mapper use
ii libpopt0 1.15-1 lib for parsing cmdline parameters
ii libuuid1 2.17-0 Universally Unique ID library
cryptsetup recommends no packages.
Versions of packages cryptsetup suggests:
ii dosfstools 3.0.9-1 utilities for making and checking
ii initramfs-tools 0.93.4 tools for generating an initramfs
ii udev 151-2 /dev/ and hotplug management daemo
-- no debconf information
More information about the pkg-cryptsetup-devel
mailing list