Hello
I am wondering if it’s possible to dual boot two separate rocky installations?
I am happily running windows and R9 menu entries in grub2 with UEFI
But I cant run two linux distributions. If I install rocky 9, say on sda, and then on a separate HD sdb I install another rocky, I can get both the menu entries by runnig grub2-mkconfig - but the second linux only boots into emergency mode - not the full x/gui system
The workaround is to hit F11 on boot and select either hard drive in the bios menu to boot into the rocky install I want.
Is there a way to have two rocky installs on two separate drives, working within the same grub menu?
Yes it is possible to dual boot the same version of Rocky9. But each install has to have its own esp partition otherwise the last one installed overwrites the previous same name rocky9 folder. Assuming you have separate esp’s then the next thing is that the menu listing in the grup menu for the second system in its list may list the rescue kernel as the first option. You can check each entry by entering “e” to see what kernel it is booting.
I only dual boot for testing purposes as kernel updates and maintaining the grub menu entries for each becomes very tedious.
Yes, the first point is the ESP. Each vendor has its own subdir in ESP, but two Rocky are not two different vendors. Having two drives allows two ESP, since each drive can have at most one.
The “F11 on boot” gives you list of entries recorded in UEFI, pointing to bootloaders on ESP(s).
That does not solve the OP issue, but is a necessity.
The next step is a /boot for each system. One holds kernel, initramfs, and GRUB config for one system.
What I would do is disable os-probing. We do not want grub2-mkconfig to sniff other installed systems if/when you use it to recreate grub.cfg. what I would do, is create custom.cfg in the same directory as the grub.cfg (the /boot/grub2/in el9) for the distro that is UEFI default. Then add GRUB menu entry that chainloads the bootloader of the other OS.
Summary: UEFI loads GRUB #1. GRUB #1’s menu has entry “Other” (in addition to other stuff for OS #1). If chosen, it chainloads GRUB #2. GRUB #2’s menu has the normal options of the OS #2.
I have 3 on the same drive that I use, 1) for windows, 2) for one fedora install, 3) for another fedora install. There is no limit to the number of esp’s you can have. The UEFI scans them all and aggregates them. Depending on your mother board having esp’s on separate partitions can be simple or painful. Creating a chain load setup is another option but I have never done it nor had the need.