[pkg-cryptsetup-devel] Bug#724813: cryptsetup doesn't wait disk to appear in /dev
Emmanuel CHANTREAU
echant-5 at maretmanu.org
Sat Sep 28 08:04:11 UTC 2013
Package: cryptsetup
Version: 2:1.6.1-1
Severity: important
Dear Maintainer,
*** Please consider answering these questions, where appropriate ***
* What led up to the situation?
I boot on a quick ssd disk and I have a crypted partition on a hard disk
attached by an usb3. The crypttab got the line for this partition but the
partition is not done. The password is in a file so there is no need to
wait the user.
The trace (set -x and "ls /dev/sd*" in init.d/cryptsetup)
show that the partition is not already visible. Adding "/bin/sleep 1s"
at the start of the script resolve the problem.
My conclusion is that the cryptsetup is executed no matter if the disks
are already visibles, so the user need to be lucky to get the good behaviour.
*** End of the template - remove these lines ***
-- Package-specific info:
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10-3-686-pae root=UUID=3a51bc0b-7b6b-409a-b843-9e4783d95c22 ro quiet
-- /etc/crypttab
# <target name> <source device> <key file> <options>
kikiext /dev/sdc1 /etc/crypttab.kikicrypt luks,loud
-- /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
LABEL=root / ext4 noatime,discard,errors=remount-ro,noatime 0 1
LABEL=boot /boot ext2 defaults,noatime,errors=remount-ro 0 2
LABEL=reste /reste ext4 defaults,discard,noatime,errors=remount-ro 0 2
/reste/usr /usr none defaults,bind,noatime
/reste/var /var none defaults,bind,noatime
/reste/home /home none defaults,bind,noatime
/dev/mapper/kikiext /mpnts/kikiext ext4 defaults,errors=remount-ro
/reste/opt /opt none defaults,bind,noatime
tmpfs /tmp tmpfs defaults,size=1g 0 0
/dev/sdb /media/usb0 auto defaults,users,noauto,errors=remount-ro
/dev/sdb1 /media/usb0 auto defaults,users,noauto,errors=remount-ro
/dev/sdb2 /media/usb1 auto defaults,users,noauto,errors=remount-ro
/dev/sdc /media/usb2 auto defaults,users,noauto,errors=remount-ro
/dev/sdc1 /media/usb2 auto defaults,users,noauto,errors=remount-ro
/dev/sdc2 /media/usb3 auto defaults,users,noauto,errors=remount-ro
LABEL=pti80 /pti80 ext4 defaults,users,noauto,errors=remount-ro
-- lsmod
Module Size Used by
parport_pc 22073 0
ppdev 12620 0
lp 12805 0
parport 31317 3 lp,ppdev,parport_pc
cpufreq_stats 12762 0
cpufreq_userspace 12520 0
cpufreq_conservative 13872 0
cpufreq_powersave 12422 0
bnep 17264 2
rfcomm 28433 0
bluetooth 148477 10 bnep,rfcomm
autofs4 22898 7
binfmt_misc 12789 1
uinput 12961 1
nfsd 165319 13
auth_rpcgss 33694 1 nfsd
oid_registry 12387 1 auth_rpcgss
nfs_acl 12463 1 nfsd
nfs 94283 0
lockd 49438 2 nfs,nfsd
dns_resolver 12569 1 nfs
fscache 32615 1 nfs
sunrpc 129998 23 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
nf_conntrack_irc 12395 0
nf_conntrack_ftp 12571 0
xt_tcpudp 12506 12
nf_conntrack_ipv4 14029 2
nf_defrag_ipv4 12443 1 nf_conntrack_ipv4
xt_conntrack 12601 2
nf_conntrack 53821 4 xt_conntrack,nf_conntrack_ftp,nf_conntrack_irc,nf_conntrack_ipv4
xt_multiport 12492 2
xt_recent 13159 2
xt_LOG 17053 2
xt_limit 12484 2
iptable_filter 12488 1
ip_tables 17010 1 iptable_filter
x_tables 18124 8 xt_recent,ip_tables,xt_tcpudp,xt_limit,xt_conntrack,xt_LOG,xt_multiport,iptable_filter
dummy 12629 0
ext2 50124 1
fuse 61469 1
dm_crypt 18014 1
dm_mod 57696 3 dm_crypt
joydev 17022 0
hid_generic 12369 0
usbhid 36040 0
hid 64702 2 hid_generic,usbhid
iTCO_wdt 12727 0
iTCO_vendor_support 12632 1 iTCO_wdt
snd_hda_codec_realtek 31992 1
snd_hda_codec_hdmi 31192 1
coretemp 12770 0
kvm 246104 0
eeepc_wmi 12536 0
asus_wmi 18511 1 eeepc_wmi
sparse_keymap 12680 1 asus_wmi
rfkill 18706 3 bluetooth,asus_wmi
evdev 17266 21
microcode 17809 0
psmouse 64900 0
pcspkr 12560 0
serio_raw 12812 0
lpc_ich 16685 0
i2c_i801 16909 0
mfd_core 12537 1 lpc_ich
usblp 17154 0
snd_hda_intel 31021 11
snd_hda_codec 102848 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep 12939 1 snd_hda_codec
snd_pcm_oss 36297 0
snd_mixer_oss 17770 3 snd_pcm_oss
snd_pcm 57885 4 snd_pcm_oss,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc 12910 2 snd_pcm,snd_hda_intel
snd_seq_midi 12744 0
snd_seq_midi_event 13124 1 snd_seq_midi
snd_rawmidi 22551 1 snd_seq_midi
snd_seq 39569 2 snd_seq_midi_event,snd_seq_midi
snd_seq_device 13016 3 snd_seq,snd_rawmidi,snd_seq_midi
acpi_cpufreq 13080 0
snd_timer 22217 2 snd_pcm,snd_seq
i915 422963 3
mperf 12421 1 acpi_cpufreq
video 17499 2 i915,asus_wmi
drm_kms_helper 27237 1 i915
drm 165528 4 i915,drm_kms_helper
snd 42832 30 snd_hda_codec_realtek,snd_pcm_oss,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_mixer_oss
wmi 13051 1 asus_wmi
i2c_algo_bit 12713 1 i915
i2c_core 19505 5 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit
button 12824 1 i915
mei_me 13328 0
processor 27839 1 acpi_cpufreq
mei 40813 1 mei_me
soundcore 12890 3 snd
ext4 336587 3
crc16 12327 2 ext4,bluetooth
jbd2 58018 1 ext4
mbcache 12938 2 ext2,ext4
btrfs 626281 0
xor 25800 1 btrfs
zlib_deflate 21318 1 btrfs
raid6_pq 95426 1 btrfs
libcrc32c 12394 1 btrfs
sg 21648 0
sd_mod 35655 6
crc_t10dif 12332 1 sd_mod
usb_storage 39406 1
crc32c_intel 12659 1
ahci 25000 3
libahci 22632 1 ahci
r8169 51462 0
mii 12595 1 r8169
aesni_intel 18000 2
aes_i586 16647 1 aesni_intel
xts 12618 1 aesni_intel
lrw 12760 1 aesni_intel
gf128mul 12895 2 lrw,xts
ablk_helper 12508 1 aesni_intel
cryptd 14160 2 ablk_helper
ehci_pci 12432 0
ehci_hcd 35820 1 ehci_pci
libata 126225 2 ahci,libahci
xhci_hcd 72664 0
scsi_mod 131001 4 sg,usb_storage,libata,sd_mod
usbcore 110348 6 usblp,usb_storage,ehci_hcd,ehci_pci,usbhid,xhci_hcd
usb_common 12408 1 usbcore
fan 12601 0
thermal 13172 0
thermal_sys 22673 4 fan,video,thermal,processor
-- System Information:
Debian Release: jessie/sid
Architecture: i386 (i686)
Kernel: Linux 3.10-3-686-pae (SMP w/4 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 cryptsetup depends on:
ii cryptsetup-bin 2:1.6.1-1
ii debconf [debconf-2.0] 1.5.51
ii dmsetup 2:1.02.77-6+b1
ii libc6 2.17-92+b1
ii sysv-rc 2.88dsf-43
Versions of packages cryptsetup recommends:
ii busybox 1:1.20.0-9
ii console-setup 1.95
ii initramfs-tools [linux-initramfs-tool] 0.113
ii kbd 1.15.5-1
Versions of packages cryptsetup suggests:
ii dosfstools 3.0.16-2
ii liblocale-gettext-perl 1.05-7+b1
-- Configuration Files:
/etc/init.d/cryptdisks changed:
set -e
/bin/sleep 1s
if [ -r /lib/cryptsetup/cryptdisks.functions ]; then
. /lib/cryptsetup/cryptdisks.functions
else
exit 0
fi
INITSTATE="remaining"
DEFAULT_LOUD="yes"
case "$CRYPTDISKS_ENABLE" in
[Nn]*)
exit 0
;;
esac
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart|reload|force-reload)
do_stop
do_start
;;
force-start)
FORCE_START="yes"
do_start
;;
*)
echo "Usage: cryptdisks {start|stop|restart|reload|force-reload|force-start}"
exit 1
;;
esac
-- debconf information:
cryptsetup/prerm_active_mappings: true
More information about the pkg-cryptsetup-devel
mailing list