Two Fedora versions onto one disk, or two Fedora versions on two disks

How can I have one grub menu that shows two different Fedora systems? Currently It is not possible.

The situation is even worse if one tries to install the second system on the same device as the first, in an entirely different area. In this latter situation, the second system wipes out the /boot/efi from the first. Again, Only one Fedora shows.
I ran into this problem with migration from Fedora 33 to Fedora 34 and Fedora 34 to Fedora 35, and Fedora 35 to Rawhide (Fedora 36).
I do not want to boot VM versions, I want to run the Fedora onto the hardware that makes up my computer system.
For what it is worth, I am currently using the bios to boot Fedora35 Gnome, located on /dev/nvme and Fedora 35 KDE located on /dev/sda. To run Rawhide (Future Fedora36), I had to install it on /dev/sdb.

In general, I usually download the day’s updates for Fedora 35, onto one system, and if that system boots cleanly, I redo the download to my “live” system.

It is possible.

As a start, I will create a partition layout like this:

/dev/sda1 UEFI
/devlsda2 boot
/dev/sda3 btrfs

Create btrfs subvols

  • f35 (for Fedora 35)
  • rawhide (for rawhide)
  • home ( one home if shared between two Fedoras, or dedicated home for each)

After installation if f35, backup the content of boot .

Then install rawhide, copy the backup of boot back to boot. ( As UUID of different installations are different, there will be no conflicts)

Another way is, from a working Fedora installation, create a read/write snapshit of the relevant btrfs subvols. Then manual adjust the UUID and boot entries.

1 Like

Hi,

Another ways, we could use bellow partition layout:
/dev/sda1 UEFI
/dev/sda2 bootworkstation /boot
/dev/sda3 rootworkstation /
/dev/sda4 bootrawhide /boot
/dev/sda5 rootrawhide /

First we install any Fedora version and after finished then install another version again.

As we know, the second installation will overwrite the first on UEFI folder /EFI/fedora/grub.cfg. But since the this file only pointing to other grub.cfg on /boot/grub2/grub.cfg we can rebuild it.

Make copy fedora directory on EFI and give different name, let say Workstation. Then edit grub.cfg inside Workstation folder and change the UUID to pointing the boot partition of first installation.

Then using efibootmgr command to register it to UEFI firmware list sudo efibootmgr -c -d /dev/sda -L Workstation -l \\EFI\\Workstation\\shimx64.efi.

Then on BIOS we’ll get two different list Fedora and Workstation

Edit:

Below are default grub.cfg inside /EFI/fedora/grub.cfg.

[rizal@fedora sh]$ sudo cat /boot/efi/EFI/fedora/grub.cfg
search --no-floppy --fs-uuid --set=dev 222222-uuid-boot-partition-33333
set prefix=($dev)/grub2

export $prefix
configfile $prefix/grub.cfg
2 Likes

Yes, this also works for me and we can use the UEFI boot menu to select which one to boot as well.

1 Like

use efibootmgr-gui

# git clone https://github.com/Elinvention/efibootmgr-gui.git
# cd efibootmgr-gui/
# ./efibootmgr_gui.py
# or python3 efibootmgr_gui.py
  1. first fedora start and add new menu element fedora35-ds or fedora35-kde …
  2. Test, works new menu element fedora35-ds
  3. old menu element deaktivate
  4. Works all? Install other fedora.

2 Likes

Even when two versions are on separate disks, I am not able to have a single grub menu that would allow me to list both.
What gets listed is the Fedora version that the bios will boot.

Regards

Leslie

Leslie Satenstein

Montréal Québec, Canada

| Sampson sampsonf
November 24 |

  • | - |

It is possible.

As a start, I will create a partition layout like this:

/dev/sda1 UEFI
/devlsda2 boot
/dev/sda3 btrfs

Create btrfs subvols

  • f35 (for Fedora 35)
  • rawhide (for rawhide)
  • home ( one home if shared between two Fedoras, or dedicated home for each)

After installation if f35, backup the content of boot .

Then install rawhide, copy the backup of boot back to boot. ( As UUID of different installations are different, there will be no conflicts)

Another way is, from a working Fedora installation, create a read/write snapshit of the relevant btrfs subvols. Then manual adjust the UUID and boot entries.

Hi, there are two way to easily switch between two fedora.

Note: If I’m writing some basic stuff here, I’m not intended to offense anyone as newbie. I just trying to explain as detail as possible if there any new linux user randomly landing here.

First we can create script with efibootmgr to change the boot order. Let’s say rawhide.sh.

#!/bin/bash

sudo efibootmgr -o 0002,0003,0000,0001,0004,0017,0014,0015,0016,0018,0019,001A,001B,001C
systemctl reboot

Then run bash rawhide.sh. Please refer to result of $ efibootmgr to create the boot order.

Another ways and please read until the important part in the end of this post

Edit /etc/grub.d/40_custom and add new line with:

#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Click Me First" {
    insmod part_gpt
    insmod ext2
    search --no-floppy --fs-uuid --set=root 1111-uuid-of-rawhide-boot-partition-2222
    configfile /boot/grub2/grub.cfg
}

Change 1111-uuid-of-rawhide-boot-partition-2222 with /boot partition UUID of your second Fedora installation (find it with lsblk -apf).

Mount your /boot of the second Fedora to /mnt then go to sudo cd /mnt/boot/loader/entries (since loader directory belong to root, we need sudo).

Copy all content of /mnt/boot/loader/entries to current Fedora in/boot/loader/entries with sudo cp /mnt/loader/entries/* /boot/loader/entries.

Update the bootloader with sudo grub2-mkconfig -o /boot/grub2/grub.cfg then reboot.

IMPORTANT:

On boot list entries, before clicking any second Fedora installation (let’s say Rawhide), select and click first Click Me First on the menu list (should be on the bottom) and this will look like do nothing but in the background will load the config. Then continue to select the boot list of your second Fedora installation.

If you’re not select the Click Me First it will fail to boot your second Fedora installation. No need to select and click Click Me First for current installation.

Easiest way:

Edit file /etc/grub.d/40_custom add:

menuentry 'Other Linux' {
	search --no-floppy --fs-uuid --set=dev 1111-uuid-to-2nd-boot-partition-5555  
	set prefix=($dev)/grub2
	export $prefix
	configfile $prefix/grub.cfg
}

Update grub with grub2-mkconfig.

When click on the “Other Linux” list on boot list, t will change current boot list with other boot list from other Fedora installation. If need go back to first menu, press esc or ctrl+alt-del.