You are not logged in.

#1 2019-09-28 16:46:25

Mox
Member
Registered: 2012-02-07
Posts: 32

[solved] Grub error 'lvmid/xxx' not found

Hi everybody,

I tried to set up a system following [https://wiki.archlinux.org/index.php/Dm … ion_(GRUB)].
I'm running an UEFI system, so I omitted the BIOS boot partition. Therefore, /dev/sda2 becomes /dev/sda1 and /dev/sda3 becomes /dev/sda2 on my computer. And I named the volume group SysVolGroup. Therefore lsblk shows:

Name                                         MAJ:MIN RM    SIZE   RO TYPE    MOUNTPOINT
loop0                                         7:0     0    xxxM   1  loop     /run/archiso/sfs/airootfs
sda                                           8:0     0    xxxG   0  disk
|-sda1                                        8:1     0    xxxM   0  part     /mnt/efi
|-sda2                                        8:2     0    xxxG   0  part
  |-SysVolGroup                             254:0     0    xxxG   0  crypt
    |-SysVolGroup-swap                      254:1     0      xG   0  lvm
    |-SysVolGroup-root                      254:2     0     xxG   0  lvm     /mnt
    |-SysVolGroup-home                      254:3     0    xxxG   0  lvm     /mnt/home
sdb                                           8:16    0     xxG   0  disk 
|-sdb1                                        8:17    0    xxxM   0  part    /run/archiso/bootmnt
|-sdb2                                        8:18    0     xxM   0  part

In the mkinitcpio.conf, I added the hooks as shown in the wiki:

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)

and added

GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:cryptlvm cryptkey=rootfs:/root/cryptlvm.keyfile"

to my /etc/default/grub (after chroot'ing into the nascent system).

After installing Grub and creating the config with

grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB

I rebooted. Immediately after starting GRUB, I was presented with a screen saying

Welcome to GRUB!

error: disk `lvmid/9e0....
...-Q5hUku' not found.
Entering rescue mode...
grub rescue> _

In the generated /boot/grub/grub.cfg this corresponds to the following line:

...
if [ x$feature_default_font_path = xy ] ; then
    font=unicode
else
 insmod lvm
 insmod ext2
 set root='lvmid/9e0wtd-....-Q5hUku'
 if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs--uuid --set=root --hint='lvmid/9e0wtd-...-.Q5hUku' 84dcb...5d96
else
    search --no-floppy --fs-uuid --set=root 84dcb...5d96
fi
      font="/usr/share/grub/unicode.pf2"
fi
...

ls -l /dev/disk/by-id contains the line

lrwxrwxrwx 1 root root 10 Sep 28 15:41 dm-uuid-LVM-9e0wtdgHsH0KCw4cqllK4UyFV6uLyWVc3afsQGYJyNZUOJ63kceXVeXckoQ5hUku -> ../../dm-2

ls -l /dev/disk/by-label contains

lrwxrwxrwx 1 root root 10 Sep 28 15:41 root -> ../../dm-2

So my question is: What can I do to get my system to boot properly?

Best regards,
mox




Beside taking some time to read up on stuff, I had a rather smoth sail until I tried to reboot after installation.

Last edited by Mox (2019-09-28 18:38:47)

Offline

#2 2019-09-28 17:48:59

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: [solved] Grub error 'lvmid/xxx' not found

https://wiki.archlinux.org/index.php/GR … pted_/boot
Note the config and red notes.

Mox wrote:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:cryptlvm cryptkey=rootfs:/root/cryptlvm.keyfile"

How should the system read the key for decryption from the encrypted drive?

Last edited by Swiggles (2019-09-28 17:51:12)

Offline

#3 2019-09-28 18:38:04

Mox
Member
Registered: 2012-02-07
Posts: 32

Re: [solved] Grub error 'lvmid/xxx' not found

Swiggles wrote:

That actually was it. I was so sure I had formatted to Luks1 that I forgot to recheck this when it did not work. So thank you for pointing me in the right direction. It boots now.


Swiggles wrote:
Mox wrote:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:cryptlvm cryptkey=rootfs:/root/cryptlvm.keyfile"

How should the system read the key for decryption from the encrypted drive?

This actually works. See https://wiki.archlinux.org/index.php/Dm … rase_twice. When the kernel is starting, the keyfile inside the initramfs is available, so it can thus use it to re-unlock the encrypted drive. Kind of a mind-twister, but it seems nobody has found a better way to avoid having to enter the password a second time yet (please correct me, if I am mistaken there).

Anyways, this problem is [solved].

Offline

#4 2019-09-28 18:50:46

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: [solved] Grub error 'lvmid/xxx' not found

Mox wrote:

This actually works. See https://wiki.archlinux.org/index.php/Dm … rase_twice. When the kernel is starting, the keyfile inside the initramfs is available, so it can thus use it to re-unlock the encrypted drive. Kind of a mind-twister, but it seems nobody has found a better way to avoid having to enter the password a second time yet (please correct me, if I am mistaken there).

Oh, I didn't think about it. Neat.

I am glad your problem is solved smile

Offline

Board footer

Powered by FluxBB