You are not logged in.

#1 2020-03-17 14:08:15

scippie
Member
Registered: 2019-06-07
Posts: 136

grub-install (EFI, LVM): error: disk ... not found

I am trying to install arch on a machine with two disks (/dev/sd[ab]) in an LVM configuration containing a raid0 logical volume.
I created an EFI partition (300MiB) on both disks (/dev/sd[ab]1) so that the LVM partitions (/dev/sd[ab]2) would be the same on both drives which are obviously the same too.
I formatted the EFI partition(s although that is not necessary) to FAT32.
I created two physical disks for LVM, a volumegroup (name=vg0) for these two, and then a logical volume (lvArch) with raid0: # lvcreate --type raid0 -n lvArch -L 256G vg0
I mounted it, created an efi directory on it, mounted the /dev/sda1 partition to it and created an efi/EFI subdirectory (not sure if that's necessary).
I pacstrapped Arch, chrooted to it, installed grub, intel-ucode and lvm2, updated the mkcpio configuration so that it loads lvm2.
I edited /etc/default/grub.cfg to add lvm to it.

# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
Installing for x86_64-efi platform.
File descriptor 4 (/dev/sda1) leaked on vgs invocation. Parent PID 3975:
File descriptor 4 (/dev/sda1) leaked on vgs invocation. Parent PID 3975:
File descriptor 4 (/dev/sda1) leaked on vgs invocation. Parent PID 3975:
File descriptor 4 (/dev/sda1) leaked on vgs invocation. Parent PID 3975:
File descriptor 4 (/dev/sda1) leaked on vgs invocation. Parent PID 3975:
File descriptor 4 (/dev/sda1) leaked on vgs invocation. Parent PID 3975:
grub-install: error: disk `lvmid/r1nLot-...hy160q/cv9kkX-jC9S...' not found.

The /efi/EFI/GRUB directory is created but nothing is in there. I found that the File descriptor leaked notifications are nothing to worry about... Is that correct?
But the final error prevents the creation of the bootloader on the EFI partition.

# grub-mkconfig ... works fine and actually finds the kernels but also claims that the disk is not found.

# ls /dev/disk/by-id shows a dm-uuid-LVM-... with a same looking id as the one that grub can't find, grub adds - and / signs inside, but the alphanumeric characters are the same. This is inside the chrooted environment.

I have done lots of searching around and found lots of info, mostly about this error happening during boot, but never during installation of grub, and I found no solutions.

Any insights?

Offline

#2 2020-03-18 09:17:55

scippie
Member
Registered: 2019-06-07
Posts: 136

Re: grub-install (EFI, LVM): error: disk ... not found

I created a separate /boot partition, non-LVM, and that helped for installing grub. I don't see why it needs to be as grub is configured to load the lvm module.
Now the system boots into the first part but then fails because it can't find the /dev/mapper/lvm volume.

Offline

#3 2020-03-18 10:26:25

edacval
Member
From: .LT
Registered: 2008-10-23
Posts: 89

Re: grub-install (EFI, LVM): error: disk ... not found

Guess you are missing RAID modules for grub:

(chroot )# cat /etc/default/grub
....
GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm mdraid09 mdraid1x"
....

Offline

#4 2020-03-18 10:27:53

scippie
Member
Registered: 2019-06-07
Posts: 136

Re: grub-install (EFI, LVM): error: disk ... not found

But I'm not using md for raid... I am using lvm raid.
Or does lvm use md?
(The wiki page doesn't mention it: https://wiki.archlinux.org/index.php/LVM#Setup_RAID )

Last edited by scippie (2020-03-18 10:44:51)

Offline

#5 2020-03-18 11:01:40

edacval
Member
From: .LT
Registered: 2008-10-23
Posts: 89

Re: grub-install (EFI, LVM): error: disk ... not found

LVM uses md  in background for their raid volumes, they switched to md from custom  raid implementation over 5 years ago. You can see this in `lvs -avvv` output. More on this : https://access.redhat.com/documentation … al-volumes

Last edited by edacval (2020-03-18 11:14:48)

Offline

Board footer

Powered by FluxBB