[pkg-cryptsetup-devel] Bug#601886: cryptsetup: luksformat leaves the Luks device open

intrigeri at boum.org intrigeri at boum.org
Sat Oct 30 16:28:12 UTC 2010


Package: cryptsetup
Version: 2:1.1.3-3
Severity: normal
Tags: patch

Hi,

	# ls -l /dev/mapper/luksformat1 
	ls: cannot access /dev/mapper/luksformat1: No such file or directory

	# luksformat /dev/sdb1
        Creating encrypted device on /dev/sdb1...

	WARNING!
	========
	This will overwrite data on /dev/sdb1 irrevocably.
	
	Are you sure? (Type uppercase yes): YES
	Enter LUKS passphrase: 
	Verify passphrase: 
	Please enter your passphrase again to verify it
	Enter passphrase for /dev/sdb1: 
	mkfs.vfat 3.0.9 (31 Jan 2010)
	unable to get drive geometry, using default 255/63
	
	Device luksformat1 is busy.

	# ls -l /dev/mapper/luksformat1
	lrwxrwxrwx 1 root root 8 Oct 30 18:23 /dev/mapper/luksformat1 -> ../dm-11

This resulting state is very confusing for the end-user, who is told
by GNOME she cannot eject the USB stick because it is busy. More
experienced ones will know how to manually luksClose the device, but
luksformat seems primarily targeted at less tech-savvy people.

Inserting "sleep 1;" between the mkfs and luksClose calls (line 74)
fixes the bug 10 times out of 10 on my system, using two different USB
sticks. I wonder if this is should be considered as a kernel bug, but
I'd like to see it fixed in Squeeze, even using this workaround.

Btw, this did not happen in Lenny.

Bye,

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (1, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cryptsetup depends on:
ii  dmsetup                2:1.02.48-3       The Linux Kernel Device Mapper use
ii  libc6                  2.11.2-6+squeeze1 Embedded GNU C Library: Shared lib
ii  libdevmapper1.02.1     2:1.02.48-3       The Linux Kernel Device Mapper use
ii  libpopt0               1.16-1            lib for parsing cmdline parameters
ii  libuuid1               2.17.2-3.3        Universally Unique ID library

cryptsetup recommends no packages.

Versions of packages cryptsetup suggests:
ii  busybox                       1:1.17.1-4 Tiny utilities for small and embed
ii  dosfstools                    3.0.9-1    utilities for making and checking 
ii  initramfs-tools [linux-initra 0.98.5     tools for generating an initramfs
ii  udev                          163-2      /dev/ and hotplug management daemo

-- no debconf information

--
  intrigeri <intrigeri at boum.org>
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr-fingerprint.asc
  | Do not be trapped by the need to achieve anything.
  | This way, you achieve everything.





More information about the pkg-cryptsetup-devel mailing list