You are not logged in.

#1 2022-09-25 08:31:45

giuss
Member
Registered: 2022-09-25
Posts: 3

[Solved] Can't decrypt root partition after system upgrade

Hi everyone. I recently ran a system upgrade (using paru, which as far as I know, is equivalent to running pacman -Syu when it comes to non-aur packages). After the upgrade, I was unable to decrypt the root partition at boot time. My bootloader is systemd-boot, and device decryption is handled with sd-encrypt. In particular, I am able to input the device passphrase, but then I get the following error messages:

[...]
Starting Cryptography Setup for root...
Please enter passaphrase for disk [...] 
[FAILED] Failed to start Cryptography Setup for root.
See 'systemctl status systemd-cryptsetup@root.service' for details.
[DEPEND] Dependency failed for Local Encrypted Volumes.
[DEPEND] Dependency failed for /dev/mapper/root.
[...]
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.

Press Enter to continue.

I am reporting only these lines because I couldn't figure out how to read these logs, so I took a photo and wrote them myself.

I am able to decrypt and mount the drive using a live usb install. Being in chroot, I could not read systemctl status systemd-cryptsetup@root.service or journalctl -b.
I then tried the following:

  • Running mkinitcpio -P. My current hooks are

    HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt keyboard fsck)
  • Checking for the correct UUIDs in /etc/fstab and arch.conf.

    blkid outputs

    /dev/nvme0n1p5: UUID="8072eaf6-06e7-407d-bd36-86e35927a7d6" TYPE="swap" PARTUUID="30373357-8b46-0c4b-89a9-b3d2a08fe2f3"
    /dev/nvme0n1p3: TYPE="BitLocker" PARTLABEL="Basic data partition" PARTUUID="0d2b6ed9-73e4-48af-8c5f-52fbfadccde7"
    /dev/nvme0n1p1: UUID="D566-C742" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="577bfe1d-dd7e-5b48-95fc-a4a8048028ae"
    /dev/nvme0n1p6: UUID="503e2f9e-30e8-4225-8d75-810095385ee7" TYPE="crypto_LUKS" PARTUUID="0bf77500-3e3c-eb4d-af58-047b70aead99"
    /dev/nvme0n1p4: BLOCK_SIZE="512" UUID="7C5E7CB35E7C67B2" TYPE="ntfs" PARTUUID="d31b6fc1-176c-4071-a3fa-6637a8e53c01"
    /dev/sdb1: BLOCK_SIZE="512" UUID="5EEAEE6EEAEE423F" TYPE="ntfs" PARTUUID="371c09b1-01"
    /dev/loop0: TYPE="squashfs"
    /dev/mapper/root: UUID="933fc02f-c7dd-4ebb-b4e4-4b805d407f4b" BLOCK_SIZE="4096" TYPE="ext4"
    /dev/sda1: LABEL="ARCH_202209" UUID="2E84-F484" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="252bdcda-01"
    /dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="76d396f8-633c-4981-bf7f-a89f36e469de"

    /etc/fstab

    # /dev/mapper/root
    UUID=933fc02f-c7dd-4ebb-b4e4-4b805d407f4b	/         	ext4      	rw,relatime	0 1
    
    # /dev/nvme0n1p1
    UUID=D566-C742      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2
    
    # /dev/nvme0n1p5
    UUID=8072eaf6-06e7-407d-bd36-86e35927a7d6	none      	swap      	defaults  	0 0

    arch.conf

    title    Arch Linux
    linux    /vmlinuz-linux
    initrd   /intel-ucode.img
    initrd   /initramfs-linux.img
    options  rd.luks.name=503e2f9e-30e8-4225-8d75-810095385ee7=root root="/dev/mapper/root" rw

    The UUIDs for the encrypted partition and the mapped are the same.

  • Rolling back from linux 5.19.10.arch1-1 to linux 5.19.9.arch1-1 and running mkinitcpio -P.
    The complete list of upgraded packages is

    [2022-09-24T17:52:51+0200] [ALPM] upgraded iana-etc (20220715-1 -> 20220915-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded boost-libs (1.79.0-1 -> 1.80.0-2)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded cracklib (2.9.7-2 -> 2.9.8-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded flac (1.4.0-1 -> 1.4.1-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded fuse-common (3.11.0-1 -> 3.12.0-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded fuse3 (3.11.0-1 -> 3.12.0-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded pcre2 (10.40-1 -> 10.40-2)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded glib2 (2.72.3-3 -> 2.74.0-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded glib-networking (1:2.72.2-1 -> 1:2.74.0-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded hwdata (0.362-1 -> 0.362-2)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded imagemagick (7.1.0.48-1 -> 7.1.0.48-2)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded imath (3.1.5-2 -> 3.1.5-3)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded imlib2 (1.9.1-1 -> 1.9.1-2)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded ldb (2:2.5.2-2 -> 2:2.6.1-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded libblockdev (2.27-1 -> 2.28-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded libbluray (1.3.2-1 -> 1.3.3-1)
    [2022-09-24T17:52:51+0200] [ALPM] installed highway (1.0.1-1)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded libjxl (0.6.1-3 -> 0.7.0-2)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded libphonenumber (1:8.12.52-3 -> 1:8.12.52-4)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded libva (2.15.0-6 -> 2.15.0-7)
    [2022-09-24T17:52:51+0200] [ALPM] upgraded libwpe (1.12.3-1 -> 1.14.0-1)
    [2022-09-24T17:52:52+0200] [ALPM] upgraded linux (5.19.9.arch1-1 -> 5.19.10.arch1-1)
    [2022-09-24T17:52:52+0200] [ALPM] upgraded mtools (1:4.0.40-1 -> 1:4.0.41-1)
    [2022-09-24T17:52:52+0200] [ALPM] upgraded nodejs (18.9.0-1 -> 18.9.1-1)
    [2022-09-24T17:52:52+0200] [ALPM] upgraded pyright (1.1.271-1 -> 1.1.272-1)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded qt5-base (5.15.6+kde+r167-1 -> 5.15.6+kde+r177-1)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded sdl2_image (2.6.2-1 -> 2.6.2-2)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded smbclient (4.16.5-1 -> 4.17.0-1)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded telegram-desktop (4.1.1-1 -> 4.2.0-1)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded upower (0.99.20-1 -> 1.90.0-1)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded wpebackend-fdo (1.12.1-1 -> 1.14.0-1)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded webkit2gtk (2.36.7-1 -> 2.38.0-2)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded webkit2gtk-4.1 (2.36.7-1 -> 2.38.0-2)
    [2022-09-24T17:52:53+0200] [ALPM] upgraded zbar (0.23.1-9 -> 0.23.90-1)

I can't figure out what to try next, so I thought I should try and ask here on the forum. I tried searching first, but I couldn't find any relevant thread. Thanks in advance for the help, hope I was thorough!:)

EDIT: I fixed the issue! If you inspect the hooks I reported, keyboard appears two times, the second one being where filesystems should have been. Fixing the config and regenerating the initramfs let me boot in the system correctly.

Last edited by giuss (2022-09-26 12:44:13)

Offline

Board footer

Powered by FluxBB