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

Bug #317297 reported by RobertBrunhuber on 2009-01-14
10
Affects Status Importance Assigned to Milestone
cryptsetup
Undecided
Unassigned
cryptsetup (Ubuntu)
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.

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
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.

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

Please find attached the requested logfile.

Andrej Rohaŭ (arohau) wrote :

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

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.

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}"

Andrej Rohaŭ (arohau) wrote :

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

is being applied.

Andrej Rohaŭ (arohau) wrote :

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

Reset to confirmed, as requested information has been provided.

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

Other bug subscribers