You are not logged in.

#1 2024-01-05 15:50:45

Alan McKinnon
Member
Registered: 2024-01-05
Posts: 3

Grub can't find root file-system on initial boot after installation

Hi everyone,

Long-time Linux user here returning to Arch after some years away.
I'm installing Arch on 2 laptops - my own old Dell Precision and the new HP Elitebook that belongs to work.

For the Dell I followed the installation guide in the Wiki, one small hiccup with mkinitcpio not having XFS available. Easily solved with "pacman -S xfsprogs" after arch-chroot
No further issues, this Dell booted first time and we're good.
Setup:
150G SSD, LVM, esp is first partition, 1G, mounted at /boot, fs is vFAT
root and swap are LVM lv's
root FS is XFS
Bootloader is Grub2

The new HP will not complete booting, saying it cannot find the root fs on /dev/vg0/<vol_name>
Setup is very similar to the Dell except that the SSD is NVMe.
Installation went great, each step in the wiki followed and succeeded without errors,
Configs are very much the same as the Dell, compared side-by-side to ensure they were the same as the working Dell.
Boot fails after loading kernel and initramfs, displays this on the console:

:: running early hook [udev]
Starting systemd-udevd version 255.2-1-arch
:: running hook [udev]
:: Triggering uevents...
:: Loading keymap,,,done
Waiting 10 seconds for device /dev/mapper/vg0-root ...
:: mounting '/dev/mapper/vg0-root' on real root
mount: /new_root: no valid filesystem type specified

followed by message of being dropped into emergency boot.

All configs seem correct, fstab is good, mkinitcpio.conf is good - systemd, lvm2 HOOKS added,
for fun: modules=(xfs) added to /etc/default/grub

As said above this is almost identical to the setup on the Dell except for NVMe

Any hints?

I'll gladly answer questions and provide screen output, didn't want to post everything up front as it's a wall of text.

Alan

Offline

#2 2024-01-05 17:13:20

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,808

Re: Grub can't find root file-system on initial boot after installation

That's not grub, that's the initramfs. You say you've got the hooks, did you regenerate it after adding those hooks? If so, was the /boot partition mounted, both when you set up grub and when you regenerated it?

Offline

#3 2024-01-05 18:31:54

Alan McKinnon
Member
Registered: 2024-01-05
Posts: 3

Re: Grub can't find root file-system on initial boot after installation

Yes to all questions.

After every edit to e.g. mkinitcpio.conf I would regenerate the initramfs,
and I made sure that the esp was always mounted when it should be.

I did just notice though, the rescue shell provided does not have an LVM user tools or drivers, that is obv the problem.
I will check it all once again.

Meanwhile here is my mkinitcpio.conf:


[root@archiso etc]# grep -E -v '^$|^#' mkinitcpio.conf
MODULES=(xfs)
BINARIES=()
FILES=()
HOOKS=(base systemd udev autodetect modconf kms keyboard keymap consolefont block lvm2 filesystems fsck)


Alan

Offline

#4 2024-01-05 20:44:16

Alan McKinnon
Member
Registered: 2024-01-05
Posts: 3

Re: Grub can't find root file-system on initial boot after installation

Update:

mkinicpio spits out a grub stanza for each kernel plus a fallback.
My setup boots on the second kernel entry and on it's fallback.

Now to compare those grub stanzas closely and see what's up there.

Alan

Offline

#5 2024-01-14 19:38:01

storestyggeulv
Member
From: Denmark
Registered: 2024-01-13
Posts: 3

Re: Grub can't find root file-system on initial boot after installation

It seems you are using xfs file system.  Maybe grub has no xfs module, so you may want to try and add xfs to the list of preloads in /etc/default/grub
GRUB_PRELOAD_MODULES="xfs"
and then do a grub-mkconfig -o /boot/grub/grub.cfg

Offline

Board footer

Powered by FluxBB