LukeShortCloud / rootpages

Root Pages is a collection of easy-to-reference tutorials and guides primarily for Linux and other UNIX-like systems.
Other
55 stars 6 forks source link

[unix_distributions][fedora] How to dual-boot rpm-ostree distros on the same drive #1060

Open LukeShortCloud opened 7 months ago

LukeShortCloud commented 7 months ago

The official Fedora installer uses Anaconda which, for Silverblue, is hardcoded to reformat existing EFI partitions making other operating systems (ex., Windows) unbootable. This is not an issue on Fedora Workstation. As a workaround, configure a new EFI partition specifically for Fedora Silverblue. This was tested as working on either Fedora 37 (more likely) or Fedora 36 (less likely).

1024 MB, vfat, mounted at /boot
512MB, efi, mounted at /boot/efi
The rest of the drive, whatever format you want (I went with the recommended btrfs), Mounted at /

Even though the drive already had an existing EFI Partition, mounting that at /boot/efi did not work. I needed to make another one for Fedora.

https://www.dvlv.co.uk/how-to-install-fedora-silverblue-alongside-windows-dual-boot.html

Although, there is at least one report that the workaround no longer works on Fedora 39.

Unable to install the latest SB [39] without reformatting efi, which nixed my NixOS install. The workaround of creating a new efi failed, although I used that approach effectively in the past with Kinoite.

https://github.com/fedora-silverblue/issue-tracker/issues/284


https://bugzilla.redhat.com/show_bug.cgi?id=1575957 https://bugzilla.redhat.com/show_bug.cgi?id=2167086

LukeShortCloud commented 7 months ago
This is how I am dual booting Fedora and Silverblue 34:

Requirement: UEFI booting, GPT disk layout

High level steps:

1. Install Silverblue first
- sda1 EFI
- sdb2 boot
- sdb3 btrfs FS_TREE, with subvols
- rootsb as /
- home as /var/home

2. Boot with Fedora Installation Media
- once the GUI is up, switch to text console, mount /dev/sda1 (EFI), rename EFI/fedora to EFI/sb

3. Install Fedora using the following layout
- /dev/sda1 as /boot/efi, do not format
 - create new subvols in /dev/sda3
- boot, for boot volume
- rootfwks as /
- mount home as /home
  Proceed to install

4. After reboot, create EFI boot entry for Silverblue by using efibootmgr
`sudo efibootmgr -c -d /dev/sda -l "EFI\sb\shix64.efi" -L Silerblue -p 1 -v`

5. Use efibootmgr to choose which EFI entry to boot from:
`efibootmgr -n <boot number>` for next boot, or
`efibootmgr -o ,

Or, we can use the Boot Menu of the UEFI interface to choose booting Fedora or Silverblue.

https://discussion.fedoraproject.org/t/dual-boot-fedora31-and-silverblue-fedora31/11980/2

LukeShortCloud commented 6 months ago

I tested installing Windows 10 21H2 first and then Fedora Silverblue 39 in a virtual machine with UEFI using these settings:

It worked! GRUB shows Fedora Silverblue 39 and Windows 10. Both are bootable, even after updating Fedora Silverblue 39 to the latest minor update.

LukeShortCloud commented 6 months ago

Tests done so far:

Windows Version Fedora Version Manual Dual-Boot Works?
10 21H2 Fedora Silverblue (GNOME) 37 Yes
10 21H2 Fedora Silverblue (GNOME) 39 Yes
10 21H2 Fedora Kinoite (KDE Plasma) 39 Yes
10 21H2 Fedora Onyx (Budgie) Rawhide/40 Yes
11 23H2 Fedora Silverblue (GNOME) 39 Yes

As a bonus, Fedora 40 introduces a new installer framework. I can confirm that dual-boot now works automatically with no manual configuration required (besides having to resize the C: drive right now to free up some space)!

LukeShortCloud commented 6 months ago

I tested automatic partitioning and it also worked with Windows 10 21H2 and Fedora Silverblue 37.