I’ve stumbled onto a work-around for the OS-Prober and grub2-mkconfig problem
on Rocky 8.9 —> both commands work PROVIDED they are invoked from a
basic terminal/non-DE environment.
I was achieving success on Almalinux-8.9 minimal, installed into /boot, /root, and
swap partitions on my HP Compaq DC5800 test machine, to which I had not added
a desktop environment.
I booted up my various Rocky 8.n test installations by editing the grub boot menu
by adding a blank-3 to the end of the boot command line in order to bring up a
terminal-only session. In all cases, os-prober brought up all the partitions with
other distros without fail.
I had one Rocky 8.n installation, with a separate /boot partition installed on my
Compaq Presario test machine, which also was configured with the Fedora 29
kernel in effect. Both os-prober and grub2-mkconfig worked fine, with one
peculiarity: the distros in the other partitions on the disk were both listed twice
by os-prober, and appeared twice in the boot chain list created in the /boot
partition by grub2-mkconfig. This redundancy did not cause any problems.
The following comments have some political overtones, but contain some
valid/important technical information:
Some viewers would wonder why I’ve been so preoccupied, almost obsessed, with
the os-prober functionality on Rocky 8.n.
A major impetus has been provided by the direction taken in the latest Ubuntu
(22.04) and Ubuntu-derivative releases as illustrated in the following two
excerpts from Ubuntu 22.04 documentation:
[document]
We will now create four partitions for our Ubuntu 22.04 installation.
Partition details are shown below:
Ubuntu 22.04 requires an additional partition called a Reserved BIOS boot area with 1MB. So, create this partition at the before /boot or EFI partition.
UEFI System:
Reserved BIOS boot area – 1 MB
EFI – 1 GB
swap – 4 GB
/home – 400 GB
/ – Remaining (100 GB)
Legacy BIOS:
Reserved BIOS boot area – 1 MB
/boot – 1 GB
swap – 4 GB
/home – 400 GB
/ – Remaining (400 GB)
UEFI and BIOS boot
Other operating systems are not displayed in the boot menu anymore, unless Ubuntu has been installed alongside another operating system. Once all other operating systems are removed from the machine, detection of other operating systems is disabled, and to re-enable if after installing another OS, you will have to delete /boot/grub/grub.cfg and immediately run update-grub again.
[/document]
Ubuntu and Ubuntu-derivatives, for many years, as mentioned earlier, have been a
favourite choice as boot-control distros on multi-partition PC’s. These latest
“features” will clearly destroy such a capability for Legacy BIOS systems.
It certainly not clear why the Reserved BIOS boot area approach was required,
because other modern distros moving strongly to UEFI, as far as I know, haven’t
done that. It’s obvious that needing a partition dedicated to this 1 MB area is
critically wasteful for Legacy BIOS systems.
With Ubuntu 20.04 and derivatives the “end of the line” for boot-control purposes,
Rocky 8, and Almalinux 8, and Springdale 8, as distros continuing the
CentOS 8.5.2111 heritage of support of Legacy BIOS systems (Rocky until May 31, 2029), will fill an important gap caused by Ubuntu vacating that role with
release 22.04.
Len E.