I have the following setup:
- artix linux OS
- linux-hardened kernel “6.1.24-hardened1-1-hardened”
- encrypted root partition (no lvm)
- unencrypted boot partition (GRUB installed)
- device is a USB stick
- no EFI partition, modules, hooks, etc.
- mkinitcpio.conf HOOK order: base udev autodetect modconf kms block lvm2 encrypt keyboard keymap consolefont resume filesystems fsck
I have 2 machines with differing behavior when booting from this USB. Machine 1 boots normally with no issues. Machine 2 boots normally until the initramfs is loaded. When it gets to the encrypt
hook it fails to find the encrypted root partition by UUID and gives up trying to decrypt after 10 seconds. This drops me into a rescue shell. In this shell, running blkid
does not produce any information about the USB or its partitions whatsoever, including the boot partition it just booted from. It does provide the UUIDs and device mappings of machine 2’s internal HDD, however.
I figured this might have something to do with UEFI boot, so I went into the BIOS settings and made sure it was set to legacy boot. I confirmed in the BIOS boot menu that there was no option to UEFI boot to the USB.
I decided to see if GRUB itself had any issues with recognizing the root partition. I pressed c
to enter the GRUB command line and entered ls
and there is the root partition and boot partition of the USB, along with the internal HDD partitions.
Despite setting the log level to 999 in the grub config, there doesn’t seem to be any warnings or errors besides not being able to find the root partition. All of the aforementioned behavior is consistently reproducible and has no impact on machine 1's ability to boot to the USB normally.
linux-hardened linux-hardened-headers lvm2 cryptsetup glibc mkinitcpio
. So I would assume that they are not exclusive to the initramfs