Sample Header Ad - 728x90

GRUB ignores my cryptdevice parameter in /etc/default/grub

0 votes
0 answers
881 views
I want to create setup with a encrypted root filesystem on my Arch Linux installation, so when I successfully mounted my /boot and /boot/efi partitions, I'm contuning with grub installation with grub, efibootmgr and os-prober packages. Then I'm making these changes on my /etc/default/grub file for both GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX lines: "net.ifnames=0 cryptdevice=UUID=:cr_root root=/dev/mapper/cr_root" But however, when I run grub-install then grub-mkconfig -o /boot/grub/grub.cfg, I cannot see cryptdevice parameter I specified in my /boot/grub/grub.cfg file. Instead of that, I'm seeing root=. So therefore, when I reboot to that system, bootloader can successfully load the kernel, but kernel cannot see the actual root filesystem because it's looking for the device with UUID of encrypted **filesystem inside the LUKS container**, not the **partition**. Thus, it's says that waiting for the device /dev/disk/by-uuid/uuid-of-the-encrypted-filesystem when attempting to boot the system, but cannot continue to the boot and neither asks for the decryption password. I've also tried adding root filesystem's entry to /etc/crypttab then re-running mkinitcpio, and also regenerating my grub.cfg, nothing worked.
Asked by katatonic (13 rep)
Nov 14, 2023, 01:47 PM