[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uniquely Identifying USB filesystem possible?
From: |
Harry Hirte |
Subject: |
Re: Uniquely Identifying USB filesystem possible? |
Date: |
Fri, 19 Jan 2024 10:14:05 +0000 (UTC) |
On Wednesday, January 17, 2024 at 03:50:46 PM GMT+1, Harry Hirte
<harry.hirte@yahoo.com> wrote:
>On Tuesday, January 16, 2024 at 08:15:58 PM GMT+1, Andrei Borzenkov
><arvidjaar@gmail.com> wrote:
>...
>>>This is LUKS1
>>actually that does not matter. Grub2 was previously only working with LUKS1
>>and has been extended to work with LUKS2
>>I have for years used grub to open a LUKS-1 device (boot) to load initrd and
>>then moved on to open the LUKS-2 root filesystem.
>>Standard grub now works with LUKS-2 only for pbkdf2; I use a patched version
>>that also supports argon2i.
>>But this is irrelevant. Grub still supports LUKS version 1 - just not on USB
>>drives, it seems
>Hmm, I take that back
>there are indeed two modules and I loaded only the luks2
>-rw-r--r-- 1 root root 21720 Jan 16 14:33 luks2.mod
>-rw-r--r-- 1 root root 6280 Jan 16 14:33 luks.mod
>I will have to try this out...
I used this configuration:
insmod luks
insmod usb
insmod search_fs_uuid
set crypto_uuid=abb2....
search.fs_uuid 24cce... keyfile
cryptomount -k ($keyfile)0+ -O xxx -S yyy -u $crypto_uuid
set root=lvm/vg0-root
set prefix=(lvm/vg0-boot)/grub
insmod normal
normal
unfortunately search.fs_uuid does not care about luks - UUIDs:
error: no such device: 24cce...
error: disk `' not found.
error: disk `lvm/vg0-boot' not found.
Unknown command `normal'.
error: disk `lvm/vg0-boot' not found.
Entering rescue mode...
grub rescue> cryptomount -a
Enter passphrase for hd0 (24cce...):
error: no key data.
At least cryptomount recognizes the USB stick now.
I will use (hd0)0+ for the time being. It seems there is only a tiny step
missing (extending search.fs_uuid to LUKS1 and LUKS2)