[jaunty] cryptsetup for root on encrypted lvm not called in initramfs.

Bug #317297 reported by RobertBrunhuber
10
Affects Status Importance Assigned to Milestone
cryptsetup
Invalid
Undecided
Unassigned
cryptsetup (Ubuntu)
Confirmed
High
Unassigned

Bug Description

After upgrading to linux-image-2.6.28-4-generic and rebooting with an encrypted lvm setup I'm dropped to a busybox shell.
Error message: Alert! /dev/mapper/<name-of-encrypted-lvm> does not exist.

For installed versions of cryptsetup, lvm2, watershed and initramfs-tools please see attached apt-cache.log.

Revision history for this message
RobertBrunhuber (ubuntu-rbrunhuber) wrote :
Revision history for this message
Chris Halse Rogers (raof) wrote :

Confirming. I see this behaviour too.

Manually runing cryptsetup from the busybox prompt works; boot continues as normal from there. Something in the hooks isn't getting run.

Changed in initramfs-tools:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Kjell Braden (afflux) wrote :

Debugging with the reporter on IRC showed that the initramfs hook (/usr/share/initramfs-tools/hooks/cryptroot) does not seem to create the config file in the initramfs.

Revision history for this message
Kjell Braden (afflux) wrote :

Can you please try to add the following line after the first line of /usr/share/initramfs-tools/hooks/cryptroot?

# -- snip --
set -x
# -- snip --

And attach the output of "update-initramfs -u".

Changed in cryptsetup:
status: Confirmed → Incomplete
Revision history for this message
RobertBrunhuber (ubuntu-rbrunhuber) wrote :

Please find attached the requested logfile.

Revision history for this message
Andrej Rohaŭ (arohau) wrote :

Please find another logfile attached.
It trips during canonical_device() processing.

Revision history for this message
Andrej Rohaŭ (arohau) wrote :

It can be traced back to /dev/disk/by-uuid/ symlink pointing back at /dev/dm-0.
Bug #317442 identified an issue with udev 65-dmsetup.rules file, which does not apply a NAME rule to dm-0.
A log file of `udevadm test /devices/virtual/block/dm-0` shows that something not expected later by cryptroot hooks is happening.

Revision history for this message
Andrej Rohaŭ (arohau) wrote :

Applying a patch to 65-dmsetup.rules seems to allow udev to rename the dm-0 device for a clean mount on my system at least.

@@ -14 +14,2 @@
-OPTIONS+="string_escape=none", NAME="mapper/$env{DM_NAME}"
+OPTIONS+="string_escape=none"
+KERNEL=="dm-*", NAME="mapper/$env{DM_NAME}"

Revision history for this message
Andrej Rohaŭ (arohau) wrote :

udev_rules_apply_to_event: NAME 'mapper/sda2_crypt' /lib/udev/rules.d/65-dmsetup.rules:15

is being applied.

Revision history for this message
Andrej Rohaŭ (arohau) wrote :

Please see the cryptroot hooks processing with udev rules file patched.

Revision history for this message
RobertBrunhuber (ubuntu-rbrunhuber) wrote :

Reset to confirmed, as requested information has been provided.

Changed in cryptsetup:
status: Incomplete → Confirmed
Kees Cook (kees)
Changed in cryptsetup:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.