You are not logged in.

#1 2020-07-02 13:03:48

JamesWelchman
Member
Registered: 2018-12-12
Posts: 4

Not prompted for Password to decrypt root on boot

Problem:
I have an encrypted root partition and wish to be prompted for the password on boot.
Currently booting stops waiting on /dev/mapper/cryptroot to become available.
I am not prompted for a password to open my encrypted root partition.

Boot Partition:
My boot partition is an EFI system partition which I mounted on /mnt/boot during the installation process.
I have installed systemd-boot on this partition and these are the config files:

/boot/loader/loader.conf

default  arch.conf
timeout  4
console-mode max

/boot/loader/entries/arch.conf

title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options rd.luks.name=XXX=cryptroot root=/dev/mapper/cryproot

where XXX is the encyrpted root partition UUID.

Root Partition:
When booting Arch from the installation USB I can open my encrypted root partition and mount it to /mnt.

$ cryptsetup open /dev/nvme01p2 cryptroot
Password:
$ mount /dev/mapper/cryptroot /mnt

Kernel:
This is the array of HOOKS used in /etc/mkinitcpio.conf

HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt filesystems fsck)

After editing this file I rebuilt my initramfs with

 $ mkinitcpio -p 

.
This command returned no errors.


I'm not an expert but what I believe what is happening:
1. systemd-boot is finding vmlinuz-linux/initramfs.img fine
2. I am missing a kernel flag to force a password prompt to open the encrypted root partition.

Thanks for any help in advance - it's very much appreciated!

Offline

#2 2020-07-02 13:11:36

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,988
Website

Re: Not prompted for Password to decrypt root on boot

Is the UUID correct? Please show the uncensored boot config with the UUID and the output of

lsblk -o +UUID

macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#3 2020-07-02 13:22:31

JamesWelchman
Member
Registered: 2018-12-12
Posts: 4

Re: Not prompted for Password to decrypt root on boot

schard wrote:

Is the UUID correct?

Sorry, I was much too trigger happy opening a thread.
The UUID was indeed missing a character.

Everything works fine now!

Thanks for your help.

Last edited by JamesWelchman (2020-07-02 13:23:00)

Offline

Board footer

Powered by FluxBB