Some time ago I installed Ubuntu 20.04 following this guide with btrfs-luks encryption.
The boot process used to involve only a single passphrase prompt at the very beginning.
Today, after upgrading to Ubuntu 22.04, booting fails.
I still receive a passphrase prompt at the very beginning of the boot process. But now I am receiving the following output (all UUIDs modified for clarity):
Btrfs loaded, crc32c=crc32c-intel, zoned=yes, fsverity=yes
Scanning for Btrfs filesystems
done.
Begin: Waiting for root file system ... Begin Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Midding modules (cat /proc/modules; ls /dev)
ALERT! UUID=xxx-xxx-xxx-xxx-xxx does not exist. Dropping to a shell!
After this output, it drops me into a (initramfs) prompt.
Running cat /proc/cmdline
gives me:
BOOT_IMAGE=/@/boot/vmlinuz-5.15.0-46-generic root=UUID=xxx-xxx-xxx-xxx-xxx ro rootflags=subvol=@
Listing disks by uuid via ls -l /dev/disk/by-uuid/
gives me (again, UUIDs are replaced for clarity):
aaa-aaa-aaa-aaa-aaa -> ../../nvem0n1p2
bbb-bbb-bbb-bbb-bbb -> ../../nvem0n1p3
ccc-ccc -> ../../nvme0n1p1
ddd-ddd-ddd-ddd-ddd -> ../../nvme0n1p4
So, the UUID mentioned is not available.
If I decrypt manually using cryptsetup open /dev/nvme0n1p3 cryptdata
(and entering the passphrase again) I receive:
BTRFS: device fsid=xxx-xxx-xxx-xxx-xxx devid 1 transid 797369 /dev/dm-0 scanned by systemd-udevd (527)
When I now run ls -l /dev/disk/by-uuid/
, the missing uuid is now included:
aaa-aaa-aaa-aaa-aaa -> ../../nvem0n1p2
bbb-bbb-bbb-bbb-bbb -> ../../nvem0n1p3
ccc-ccc -> ../../nvme0n1p1
ddd-ddd-ddd-ddd-ddd -> ../../nvme0n1p4
xxx-xxx-xxx-xxx-xxx -> ../../dm-0
When I now exit
, the boot process continues running without problem.
Now I am looking for a way to have the boot process run by itself again. I suspect that some config file might have been overwritten during the upgrade, and I think in addition to the installation guide linked above some adjustments have been necessary, but I do not remember exactly.
What I have tried:
- Booting from a USB stick, decrypting and mounting manually, chroot into the mount, and running
update-initramfs
as suggested by answers to similar questions. No effect.