cryptroot fails silently fails on error

Bug #1046826 reported by Muelli
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I just updated my machine from 11.10 to 12.04. The update itself failed, because update-manager didn't prevent the laptop from going into suspend. Anyway, I rebooted, chrooted and did dpkg --configure -a and apt-get dist-upgrade. All packages were fine. However, the machine wouldn't boot, because it couldn't find the crypto volume. Turns out, that conf.d/cryptroot was missing. That was because of a *silent* failure from the cryptroot script from initramfs-tools.

The hook ran LVM which in turn expected /var/run/lock to be present. It was indeed present, but a symlink to /run/lock. But that did not exist. So LVM failed and so /etc/crypttab was not copied in the initramfs.

I pulled my hair out for 8 hours to find that out. As a note to that poor person being in trouble next time: When trying to fix and luksOpening the crypto volume, name it exactly as it's written in /etc/crypttab. Because the cryptroot hook from initramfs-tools expects the LUKS device to be named exactly as /etc/crypttab indicates. That took with a couple of hours to figure out.

Anyway, I expected update-initramfs to fail loudly if it couldn't set up the initramfs properly to decrypt my container.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Steve Langasek (vorlon)
affects: initramfs-tools (Ubuntu) → cryptsetup (Ubuntu)
Revision history for this message
Michał Sawicz (saviq) wrote :

For me the problem was that crypttab didn't match fstab, update-initramfs happily completed and the system became unbootable.

One more point of failure seems to be when the encrypted volume isn't open, or is open under a name different than fstab/crypttab (i.e. you wanted to rename the mapping).

summary: - cryptroot fails silently fails if LVM fails when /run/lock is non
- existent
+ cryptroot fails silently fails on error
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.