How to Dual Boot Fedora with Ubuntu or Another Linux Distribution

You can dual boot Fedora with Ubuntu or another Linux distribution by installing Fedora first to set up the GRUB bootloader, then installing the second distribution while ensuring it detects and adds Fedora to the boot menu, or by manually updating GRUB after both are installed.

Dual Booting Fedora with Another Linux Distribution

You installed Ubuntu alongside Fedora, rebooted, and now the GRUB menu is gone. Or you see the Ubuntu boot menu, select Fedora, and get dropped to a grub rescue> prompt. This happens when two distributions fight over the EFI System Partition or when the second installer overwrites the bootloader configuration without detecting the first. The fix is usually a matter of regenerating the GRUB config from the distro that controls the boot process, or manually pointing the bootloader to the correct kernel. A botched bootloader update can leave you unable to access either system. Run these steps from a live USB or a backup VM if you are already stuck.

What's actually happening

Think of GRUB as the building concierge. When you have one OS, the concierge knows exactly which apartment to direct you to. When you install a second Linux distribution, you now have two concierges trying to manage the same lobby. The second installer often assumes it is the only tenant and replaces the concierge's directory with its own. If the new directory doesn't list the first apartment, you can't get in.

On UEFI systems, the firmware loads an EFI binary from the EFI System Partition (ESP). The ESP is a small FAT32 partition that holds bootloader binaries for all operating systems. It is not owned by any single OS. Fedora creates a directory /EFI/fedora/. Ubuntu creates /EFI/ubuntu/. The firmware loads the EFI binary based on the boot order stored in the NVRAM. If Ubuntu's installer overwrites the default boot entry, it might point to /EFI/ubuntu/grubx64.efi. Fedora is still there, but the firmware ignores it. You can fix this by updating the boot order or by having Fedora's GRUB take over the default entry.

Fedora disables os-prober by default in recent releases. This speeds up GRUB configuration generation and reduces the attack surface. It also means Fedora will not automatically detect other operating systems when you run grub2-mkconfig. You must explicitly enable probing or add manual entries.

The fix

The most reliable recovery path is to boot into Fedora, enable OS detection, and regenerate the configuration. If Fedora is not booting, boot from a Fedora live USB, mount your root partition, and chroot into the system to run these commands.

Identify the partitions

You need to know the UUID of the EFI partition and the root partition of the second distribution. The UUID is the stable identifier that survives disk reordering.

# List block devices with filesystem labels to identify the EFI partition and root partitions
lsblk -f

The output shows the device hierarchy and filesystem types. Look for the vfat partition mounted at /boot/efi. That is the EFI System Partition. Note the UUID of the second distribution's root partition if you plan to add a manual entry later.

NAME   FSTYPE LABEL UUID MOUNTPOINT
nvme0n1
β”œβ”€nvme0n1p1 vfat   ESP   <fedora-esp-uuid> /boot/efi
β”œβ”€nvme0n1p2 xfs            <fedora-root-uuid> /
└─nvme0n1p3 ext4  ubuntu  <ubuntu-root-uuid>

Enable OS probing

Fedora's GRUB configuration lives in /etc/default/grub. Edit this file to enable os-prober. Never edit files in /usr/lib/grub/. Those files ship with the package and get overwritten on updates. User modifications belong in /etc/.

# Open the GRUB defaults file to enable OS probing
sudo nano /etc/default/grub

Add or modify the line below. If the line exists and is set to true, change it to false.

# Enable os-prober to scan for other operating systems during config generation
GRUB_DISABLE_OS_PROBER=false

Save the file. The change takes effect only after you regenerate the GRUB configuration.

Regenerate the GRUB configuration

Fedora distinguishes between BIOS and UEFI GRUB configs. Check which file is active before overwriting. Running grub2-mkconfig with the wrong output path can break the boot.

# Check which GRUB configuration file is active on your system
ls -l /boot/grub2/grub.cfg /boot/efi/EFI/fedora/grub.cfg

Run the regeneration command pointing to the active file. The grub2-mkconfig script scans the disks, runs os-prober, and writes a new menu.

# Regenerate the GRUB configuration for UEFI systems
# Replace the output path if your system uses BIOS mode
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

If the second OS appears in the output, the configuration succeeded. If you see a warning about os-prober not being installed, install the package first.

# Install os-prober if it is missing from the system
sudo dnf install os-prober

Run grub2-mkconfig again after installing the package.

Add a manual entry

If os-prober fails to detect the second OS, or if you prefer precise control, add a manual entry. Chainloading is the robust approach for dual Linux setups. Direct booting requires you to specify the kernel version and initrd path. When the second distribution updates its kernel, the version number changes. Your GRUB entry points to the old version. The boot fails. Chainloading delegates to the second OS's bootloader, which handles its own updates.

# Open the custom GRUB menu file for manual entries
sudo nano /etc/grub.d/40_custom

Add a menu entry that chainloads the second distribution's bootloader. Replace the UUID with the UUID of the EFI partition, not the root partition. The EFI partition holds the bootloader binary.

menuentry "Ubuntu 22.04" {
    # Search for the EFI partition by UUID and set it as the root device for GRUB
    search --no-floppy --fs-uuid --set=root <UUID-OF-EFI-PARTITION>
    # Chainload the Ubuntu bootloader binary from the EFI directory
    chainloader /EFI/ubuntu/grubx64.efi
}

Save the file and regenerate the configuration. The 40_custom file runs after the automatic detection scripts, so manual entries appear at the end of the menu.

# Regenerate the GRUB configuration to include the new manual entry
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Verify it worked

Reboot the system. The GRUB menu should list both distributions. Select the second OS and confirm it boots. If the menu does not appear, the firmware boot order might be pointing to the wrong entry.

# List EFI boot entries and their order to ensure Fedora is prioritized
sudo efibootmgr

The output shows the boot order and the description of each entry. If Fedora is not first, change the order.

# Set the boot order to prioritize Fedora
# Replace the hex codes with the Boot#### values from efibootmgr output
sudo efibootmgr -o 0001,0000

Check the boot journal for errors after a successful boot. The -xe flags add explanatory text and jump to the end of the journal.

# Check the boot journal for GRUB or kernel errors after a successful boot
journalctl -b -p warning

Reboot to test. The menu should list both distributions. Trust chainloading. Manual kernel paths drift on every update.

Common pitfalls

The grub rescue> prompt appears when GRUB cannot find its core image or configuration file. This usually means the EFI partition UUID changed, or the bootloader was installed to the wrong partition. Boot from a live USB, mount the Fedora root and EFI partitions, and reinstall the bootloader.

# Mount the root partition
sudo mount /dev/nvme0n1p2 /mnt
# Mount the EFI partition
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
# Chroot into the system
sudo chroot /mnt
# Reinstall GRUB to the EFI partition
grub2-install /dev/nvme0n1

Secure Boot can block unsigned bootloader binaries. If you see a security violation error, disable Secure Boot in the firmware setup, or enroll the keys for the second distribution. Fedora ships with signed kernels and bootloader. Ubuntu also ships with signed binaries. Secure Boot should not block either if the firmware database is up to date.

Installing the bootloader to a separate EFI partition breaks the boot. The firmware only checks the EFI partition listed in the NVRAM boot entries. If the second installer creates a new EFI partition and installs there, the firmware never sees it. Always install the bootloader to the existing EFI partition shared by all distributions.

Check efibootmgr. The firmware boot order overrides GRUB on many machines. If the second OS changed the boot order, Fedora might not boot by default.

When to use this vs alternatives

Use os-prober when you want automatic detection and don't mind the slight delay during GRUB config generation. Use a manual entry in /etc/grub.d/40_custom when os-prober fails to detect the second OS or when you want precise control over the boot parameters. Use chainloading in the manual entry when the second distribution uses a different bootloader like systemd-boot or when you want to avoid maintaining kernel paths manually. Use efibootmgr to change the boot order when the firmware boots the wrong distribution by default.

Where to go next