It seems this is due to a change in vol_id (udev package).  vol_id
(udev: 124-12) used to say "/dev/mapper/swap: unknown volume type" when
it failed to find a known filesystem on /dev/mapper/swap.  After my
latest update, vol_id (udev: 136-4) says "unknown or non-unique volume
type (--probe-all lists possibly conflicting types)" without mentioning
the device.  /lib/cryptsetup/checks/{vol_id,un_vol_id} have not been
updated to check for the new vol_id output with the result that code in
/lib/cryptsetup/cryptdisks.functions assumes that vol_id has found some
valid filesystem when it hasn't.

Instead of hard-coding the vol_id output when no valid filesystem is
found, we could determine it at run time by running vol_id on some
device or file that is guaranteed to not have any filesystem.  Would
/dev/null work?  I've attached a patch to update vol_id and un_vol_id to
use the following:

# vol_id output if $dev has an unknown filesystem
pattern=`echo $dev | sed 's/\//\\\\\//g'`
unknown=`/lib/udev/vol_id -t /dev/null 2>&1 | sed "s/\/dev\/null/$pattern/g"`

if [ "$vol_id" != "$unknown" ] && [ "$vol_id" != "minix" ] && [ -z "$fs" ]; then
...


** Attachment added: "patch for cryptsetup package to deal with output from 
updated vol_id binary (udev package)"
   http://launchpadlibrarian.net/21223209/cryptsetup_vol_id.patch

-- 
Encrypted SWAP partition not created/mounted
https://bugs.launchpad.net/bugs/316607
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to