16.04 - initrd fails to decrypt and mount /usr directory when it's on it's own cryptsetup partition

Bug #1594073 reported by Alessandro Selli on 2016-06-19
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Undecided
Unassigned

Bug Description

Running Ubuntu 16.04 LTS, upgraded from a 15.10 that did not show the issue.

Initramd fails at setting up the encrypted /usr partition.
At the (initramfs) prompt the following command is accepted and succeeds at decrypting the partition:

cryptsetup --key-file /root/etc/keys/sda5_usr open --type luks /dev/sda5 sda5_usr

After entering the above command and pressing <Ctrl>+<d> to exit the initramfs shell, system boot resumes and completes successfully.
/etc (in the initramd) does not have the crypttab file, which is present in the decrypted and mounted root filesystem in /root/etc.

The problem manifests itself regardless that in /etc/initramfs-tools/initramfs.conf MODULES=most or MODULES=dep is set before generating the initrd.

Terminal output of the failed boot up to the initramfs prompt:

Begin: Running /scripts/init-premount ... done
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... Please unlock disk sda3_ubuntu_root:
[ 120.025413] NET: Registered protocol family 38
cryptsetup: sda3_ubuntu_root set up successfully
done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.27.1
[/sbin/fsck.ext4 (1) -- /dev/mapper/sda3_ubuntu_root] fsck.ext4 -a -C0 /dev/mapper/sda3_ubuntu_root
Ubuntu_rootfs: clean, 44092/625056 files, 801590/2499604 blocks
done.
[ 126.996543] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: mounting /usr file system ... Begin: Waiting for /usr file system ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for /usr device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! UUID=6b18125b-32be-458c-a623-612a14e74eb3 does not exist. Dropping to a shell!

BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) _

Launchpad Janitor (janitor) wrote :

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

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions