You are not logged in.

#1 2018-12-12 06:20:41

NaeSLaS
Member
Registered: 2018-12-12
Posts: 2

[SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

So I'm running through the installation guide on the Wiki, setting up LVM on LUKS.  Everything went fine, until I was installing the bootloader.

When I run

grub-mkconfig -o /boot/grub/grub.cfg

my computer just hangs for a while.  I let this go for about 15 minutes (when this step usually takes about 15 seconds), finally went and modified /usr/bin/grub-mkconfig and removed all of the 2> /dev/null lines.

Now I figured out the problem - grub-mkconfig will run grub-probe, and then i get the following:

WARNING: Device /dev/loop0 not initialized in udev database even after waiting 10000000 microseconds.

I will get this warning for every device in dev after a 10 second delay, including the ones with my root and home in LVM (/dev/MyVolGroup/root). 

For the record, my partition layout is as follows:

/dev/sda1: /boot/efi, type EFI system partition, formatted to FAT32
/dev/sda2: /boot, type Linux Filesystem, formatted to EXT4
/dev/sda3: LUKS2
/dev/MyVolGroup/root, 32G formatted to EXT4
/dev/MyVolGroup/swap, 8G, formatted as swap
/dev/MyVolGroup/home, the rest of the drive, formatted to EXT4

Read somewhere that it might be due to my fstab, but my fstab has the UUIDs listed on it properly (made with genfstab -U /mnt >> /mnt/etc/fstab)

Not sure where to go from here, any thoughts? What other information do you need? I've never had this problem installing GRUB before.

EDIT: Not sure this is specifically a grub problem.  Running vgscan -v gives the same results:

WARNING: Failed to connect to lvmetad. Falling back to device scanning.
Reading all physical volumes. This may take a while...
WARNING: Device /dev/loop0 not initialized in udev database even after waiting 10000000 microseconds.

etc. with all of my /dev devices.

Last edited by NaeSLaS (2018-12-12 08:07:33)

Offline

#2 2018-12-12 07:49:57

leonshaw
Member
Registered: 2012-01-11
Posts: 19

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

I run into the same problem. It's caused by some upstream change in lvm2, probably this one:

commit a063d2d123c56c4ccead986625a260df16556b9f
Author: David Teigland <teigland@redhat.com>
Date:   Mon Dec 3 11:22:45 2018 -0600

    devs: use udev info to improve md component detection

    Use udev info to supplement native md component detection.

It would wait for 10 seconds for every device before falling back, which is extremely slow.

Despite the upstream change, there's a way to fix it during installation. That is provide /run/lvm access to chroot environment. See this post
https://unix.stackexchange.com/question … n-lvm-disk

Also can limit access to only /run/lvm:

mkdir /mnt/hostlvm
mount --bind /run/lvm /mnt/hostlvm
arch-chroot /mnt
ln -s /hostlvm /run/lvm

I think it's better to be added in arch-chroot script.

Offline

#3 2018-12-12 08:07:16

NaeSLaS
Member
Registered: 2018-12-12
Posts: 2

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

Yep, that fixed it.  Thank you very much. 

What'd you search for to find that stackexchange post?  I looked far and wide trying to find the problem.

Offline

#4 2018-12-12 08:16:34

leonshaw
Member
Registered: 2012-01-11
Posts: 19

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

NaeSLaS wrote:

Yep, that fixed it.  Thank you very much. 

What'd you search for to find that stackexchange post?  I looked far and wide trying to find the problem.

grub lvmetad sock, or so.

It's quite some time I've been seeing the "failed to connect" message and searched for the answer. Arch wiki says it's because /run is not available inside the chroot, and is not an issue. Only recently it becomes so slow.

Last edited by leonshaw (2018-12-12 08:26:11)

Offline

#5 2018-12-12 08:41:44

koalaeagle
Member
Registered: 2018-12-12
Posts: 1

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

I was pulling my hair out due to the same issue on a new arch install with LVM. Thanks for figuring out the solution.

Offline

#6 2018-12-13 19:02:19

mdecheser
Member
Registered: 2018-12-13
Posts: 1

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

I'm installing to LVM w/o LUKS.  The following solution provided by leonshaw worked for me as well.

mkdir /mnt/hostlvm
mount --bind /run/lvm /mnt/hostlvm
arch-chroot /mnt
ln -s /hostlvm /run/lvm

For safe measure, I re-ran grub-reinstall again, but prior to retrying grub-mkconfig.

Offline

#7 2018-12-14 21:15:01

QvidnamHicEst
Member
Registered: 2018-12-14
Posts: 1

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

This solution worked on my new install as well (LVM on LUKS). Thank you!

Offline

#8 2018-12-14 21:25:57

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

Welcome to the forums koalaeagle, mdecheser and QvidnamHicEst. smile

Please make the time to read the forum Code of Conduct, especially the section regarding empty posting.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2018-12-15 01:48:53

kitus
Member
Registered: 2017-03-11
Posts: 4

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

It works for me also... thnks guys, i almost hit my laptop... xD

Offline

#10 2018-12-15 08:26:35

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] LVM on LUKS, grub-mkconfig hangs - grub-probe gives error

Did you not see my last post kitus? This thread now contains more 'me to' than useful information and is quickly becoming worthless.

Closing this thread before it devolves any further.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB