Home Blag Links Wireguard About

Open LUKS rootfs from emergency shell

2021-02-04

I recently set up a couple of Archlinux lab machines with EFI boot and encrypted root partitions. After boot, I dropped into a rootfs shell.

Fixing this and proceeding boot is easy. Just open the LUKS volume, mount it into /new_root and exit the emergency shell. Boot process will proceed.

Starting version 247.3-1-arch
mount: /new_root: can't find UUID=49761b3b-7334-4691-bc19-a0a1510411ac.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]# cryptsetup open /dev/sda23 cryptroot
WARNING: Locking directory /run/cryptsetup is missing!
Enter passprhase for /dev/sda23:
[rootfs ]# mount /dev/mapper/cryptroot /new_root/
[rootfs ]# exit