How can I install 2 versions of Fedora on one hard drive?


I have a hard drive with just Fedora 38 on it currently. It has an /boot/efi partition, /boot partition, and a btrfs root partition. I would like to shrink the root partition. If I want to install Fedora 39 in the new free space, would I tell the installer to use the existing /boot/efi (don’t format it) and the existing /boot (don’t format it), and create a new BTRFS root partition in the free space? Ideally Fedora 39 would not control grub and I would go back to Fedora 38 and update grub there.

I’ve seen reports that grub gets confused with that configuration. It might be better if you can switch to using systemd-boot.

Also, I haven’t tried it, but in theory both Fedora installations should be able to share the same Btrfs filesystem. Just set them to install to separate subvolumes. Then you wouldn’t need to mess with resizing partitions at all.

Sharing /boot is probably not a great idea. Sharing /boot/efi is correct. In general my advice on dual boot remains “don’t”, though.

One problem you’ll run into with multiple Fedora UEFI installs is they’ll both want to call their EFI boot manager entries “Fedora”, the consequences of which depend on your firmware implementation. It may just be confusing, or it may mean whichever one you installed first disappears from the menu entirely. You can try renaming the entry for the F38 install to e.g. “Fedora 38” before you install Fedora 39, using efibootmgr or your firmware UI (if it allows renaming entries).

honestly, though…if I were you I’d just put it in a VM…dual boot is always a headache. :stuck_out_tongue:

It would be a lot easier to run Fedora 39 in a virtual machine. You can use gnome-boxes or you can use libvirt/kvm. It is also possible to run it with nspawn.

From man systemd-nspawn

       Example 2. Build and boot a minimal Fedora distribution in a container
           # dnf -y --releasever=37 --installroot=/var/lib/machines/f39 \
                 --repo=fedora --repo=updates --setopt=install_weak_deps=False install \
                 passwd dnf fedora-release vim-minimal util-linux systemd systemd-networkd
           # systemd-nspawn -bD /var/lib/machines/f39

       This installs a minimal Fedora distribution into the directory /var/lib/machines/f39 and then boots that OS in a
       namespace container. Because the installation is located underneath the standard /var/lib/machines/ directory, it is
       also possible to start the machine using systemd-nspawn -M f39.

If you will do a regular install, you would need to share both the /boot and the /boot/efi file system, as the configuration file in /etc/efi must refer to the /boot file system.

We had a case a some time ago where someone installed a second Fedora and after that could not boot into the first instance. Be careful.


Thanks for the replies everyone. I’m happy to test Fedora 39 beta in a VM but that will limit how much testing I can really do since the hardware aspect will be removed. But I will take the advice and not try to dual boot!

If you have USB3 or USBC ports you can install Fedora in an external SSD for testing. I use an old iMac with a laptop grade internal sata drive and find the external USB3 SSD drive is faster than the internal drive.

1 Like

Yeah, I was gonna say the same. This is what I do for a lot of HW testing. You may still have the problem with clashing EFI bootloader entries, but that at least should be recoverable by disconnecting the external drive and booting the existing Fedora install via the UEFI fallback path (that should happen automatically if nothing else is bootable on the system, otherwise tell the firmware to just boot from the drive where Fedora is installed).

It just so happens I have a 1TB USB3 drive laying around, I’ll give that a shot!

Update: That was a great suggestion, I am now running Fedora 39 beta from an external drive and had no issues! :slight_smile: