You are not logged in.

#1 2022-09-14 03:16:38

dojero
Member
Registered: 2011-11-26
Posts: 36

udev does not see root device UEFI boot [SOLVED]

I have created a bootx64.efi file with mkinitcpio. My root drive is identified in the /etc/kernel/cmdline file (PARTUUID). This is all on an external SSD drive.

When I boot using the bootx64.efi directly, there is no problem. And my /proc/cmdline correctly shows the /etc/kernel/cmdline.

But when I try to boot choosing the SSD from the boot list, I get dropped into the rootfs. It says that udev hook runs, that the error is that it cannot find a root device, cannot mount root device '' to new_root, and drops to the rootfs.

Once in rootfs, I can mount the /dev/sda2 (the root partition) to new_root, exit from rootfs and boot properly. But the /proc/cmdline than show VRY.

My question is, is there a way to use the SSD boot option (in which case, I thought it would automatically seek the bootx64.efi on /boot/EFI/BOOT/...which it seems to be doing), but not finding the root partition. How do I make it find the root partition?

SOLUTION: I am now using systemd-auto-gpt-generator. In order for it to work, the GPT types for root and EFI partitions must be specific (8304 for root and EF00 for EFI). Then replace base and udev  with systemd in the mkinitcpio.conf. Once that's done, selecting the boot device from the boot menu of the computer will initiate the auto-gpt-generator, which will look for the EFI partition on the device, seek the BOOTx64.EFI file in the EFI partition's EFI/BOOT/ directory, mount the GPT partition labeled root as root, and boot. Using this auto-gpt-generator eliminates the need for initramfs. It also eliminates the need for fstab. But if you want fstab, anything in it will override the initial mounts that the generator performs.

Last edited by dojero (2022-09-23 20:06:07)

Offline

Board footer

Powered by FluxBB