[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GRUB -- Debian overrides? Or maybe I just don't understand it well...



Hello

I need help with a problem configuring grub. My main OS on the system
concerned is bookworm (was probably originally installed as bullseye,
might even have been earlier, and then has been upgraded over the
years, now at bookworm). That system is the system that has installed
grub and grub's configuration gets updated whenever a kernel update
happens in the Debian stable ecosystem.

I have now set up an LFS (Linux from Scratch) installation on the same
box, on a brand new SSD installed into the machine for the purpose. So
I want to be able to dual-boot. I have been able to get a grub.cfg
including the LFS system but the root of the LFS system is being
specified by device name and that is a problem.

There are also a couple of existing, older SSDs in the machine, one of
which contains an older installation of Debian which I don't use any
more but haven't quite brought myself to delete (although will
eventually), and one is mounted as /opt in my main system.

Because I want to dual-boot with the LFS system I turned on the
os-prober in /etc/default/grub. Running update-grub then duly finds
the LFS system and sets up configuration in grub for it (it also finds
the old Debian system, which I'd prefer to keep out of grub but that's
not a big deal for now).

Both old and current Debian installations use LVM and initrd. The LFS
instance uses neither.

I just don't seem to be able to persuade update-grub to put
root=UUID=<blah> or root=PARTUUID=<blah> into the linux command line
for the LFS system. Because update-grub is going to be run every time
there is a kernel update in Debian, I need it to work and just
overriding it by hand isn't a solution.

Instead it is using root=/dev/sdX2. The problem is over the last few
boots I have seen the SSD containing the LFS system come up as
/dev/sda, /dev/sdb and on this boot now, /dev/sdc.

According to the grub-mkconfig documentation[1], if I make sure
GRUB_DISABLE_LINUX_UUID and GRUB_DISABLE_LINUX_PARTUUID are both set
to false, in the absence of an initrd it should use "root=PARTUUID=<>"
in the linux command line, but when I run update-grub that is not
happening, and the device identifier is being used instead.

Can anyone explain why, and how I can fix this in a way that will
still work the next time the bookworm kernel gets an update?

Thanks

Mark

[1] https://www.gnu.org/software/grub/manual/grub/html_node/Root-Identifcation-Heuristics.html#Root-Identifcation-Heuristics


Reply to: