You are not logged in.
I'm installing Arch for the first time and it's having some difficulty booting. I am installing on LVM with the entire OS on one volume (no separate /boot or /usr volumes). There are several other OSs on other lvs with GRUB set up to load each OS's config file (each OS has grub os prober disabled). In total there are about 17 logical volumes in two volume groups. Anyway, the problem has to do with the early boot failing to set up LVM properly. Specifically I see the following output after "loading initial ramdisk...":
:: running early hook [udev]
starting version 231
:: running early hook [lvm2]
:: running hook [udev]
:: triggering uevents...
Waiting 10 seconds for device /dev/mapper/osvg-arch ...
ERROR: device '/dev/mapper/osvg-arch' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/osvg-arch'.
You are being dropped to a recovery shell
I have added lvm2 to the mkinitcpio config (between "block" and "filesystem") and rebuilt as suggested elsewhere. In the recovery shell I see different things under /dev/mapper on each boot. Sometimes there is no /dev/mapper, sometimes it contains only a subset of volumes, at least once it contained all the volumes. In all cases I still get the error. Simply running "lvm vgscan" in the recovery shell allows me to exit and boot successfully. The one exception is if osvg-arch happens to be under /dev/mapper, then I can exit immediately without running lvm vgscan (I still get dropped into the recovery shell first though).
I tried adding "lvm vgscan" to the lvm2 initcpio script; this did not fix the problem. I also tried adding "sleep 5" in the hopes of avoiding a race but that didn't change anything either.
I'm guessing there is a race condition somewhere but I'm not super comfortable with how the boot sequence works. Any ideas?
Last edited by nathanp (2016-10-26 18:40:14)
Offline
I sort of solved the issue: switch to systemd-based initramfs (change "udev" to "systemd" and "lvm2" to "sd-lvm2" in /etc/mkinitcpio.conf)
Longer version:
The lvm2 initcpio hook script mentioned some race condition with non-systemd initramfs in a comment. It's supposed to spin for a while waiting for pvscan to finish but that obviously wasn't working. Switching to a systemd-based initramfs seemed to solve the issue but it seems to spend a lot of time waiting for lvm stuff during boot (it boots pretty slowly). I suspect what's happening is that lvm scanning is taking much longer than it should and systemd is better at waiting than udev.
Offline