You are not logged in.

#1 2014-02-04 15:50:31

ce1984
Member
Registered: 2014-01-24
Posts: 41

[SOLVED] Installing on encypted partition: keyfile could not be opened

Solution: Well, I feel dumb right now. Somehow in my /etc/defaults/grub file I had an extra space between the UUID and the ":auto:. . ." It was right at the end of a line so I didn't notice it. The usb hook was not neccesary.



Hi All. I'm trying to install arch on an encrypted partition as per the wiki. So far I have the encrypted partition setup, arch installed on it, and I have the keyfile on a ext4 formatted USB drive. I've been sucessful manually decrypting the drive booted from a liveUSB with:

cryptsetup luksOpen --key-file <usb drive>/keyfile /dev/<root partition> cryptroot

In mkinitcpio.conf I have added

MODULES="ext2 ext4"

and

HOOKS= ". . . encrypt filesystems. . ." 

In /etc/default/grub I have added

GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/<root uuid> cryptkey=/dev/disk/by-uuid/<usb uuid>:auto:/keyfile"

After editing these I've run

mkinitcpio -p linux
grub-mkconfig /boot/grub/grub.cfg

On booting I see several iterations of

No caching mode page present
Assuming drive cache: write through

Is this normal for USB drives?

Then I get "keyfile could not be opened" before it falls back asking for the passphrase. I've tried removing the usb drive to see what happens and it gives a message that it's waiting 10 seconds for the keyfile or something to that effect. The difference to me seems to imply that it least it knows that the keyfile UUID is present on the system, if not mounted. Any tips?

Thanks

Last edited by ce1984 (2014-02-04 18:12:32)

Offline

#2 2014-02-04 17:04:23

grandtheftjiujitsu
Member
Registered: 2013-07-27
Posts: 91

Re: [SOLVED] Installing on encypted partition: keyfile could not be opened

I think you need "usb" in your HOOKS array.  I'm not exactly sure where it needs to be placed, but before "encrypt" since the USB is where the encryption key is.  Then re-build mkpinitcpio.conf.

Offline

#3 2014-02-04 17:21:58

ce1984
Member
Registered: 2014-01-24
Posts: 41

Re: [SOLVED] Installing on encypted partition: keyfile could not be opened

Thanks. After adding usb and running mkinitcpio, I get

WARNING: Hook 'usb' is deprecated. Replace it with 'block' in your config

the block hook was already set (and before the encrypt hook).

Offline

Board footer

Powered by FluxBB