Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual boot / Better support in Anaconda for existing EFI setup #284

Open
richard-gravy opened this issue May 19, 2022 · 13 comments
Open

Dual boot / Better support in Anaconda for existing EFI setup #284

richard-gravy opened this issue May 19, 2022 · 13 comments
Labels
bug Something isn't working f39 Related to Fedora 39 f40 Related to Fedora 40 upstream Issue reported, fixed or related to upstream projects

Comments

@richard-gravy
Copy link

richard-gravy commented May 19, 2022

This issue tracker is intended only for Silverblue specific issues. We would like to ask you to try to reproduce the issue on a relevant Fedora Workstation release. If you will be able to reproduce there, then please report it in Red Hat Bugzilla or in upstream (preferred for GNOME projects) and not in this issue tracker.

Describe the bug
Though this is a known issue, after hoping against hope that some progress might have been made on this since F34, anaconda once again fails to install Silverblue F36 onto a computer with one or more existing operating systems properly and stops before the EFI boot configuration is correctly written.
I have tried to repair the boot configuration myself, but I was not certain what layout anaconda would have used. At the moment, the root mount is a btrfs subvol ("root-0"). There are no other subvols. I can manually copy the GRUB boot commands from another machine to boot, but hit another problem as the root is mounted read only, which includes the /boot directory. Subsequent updates to the boot entries fail for this reason.

Is there a reference somewhere that I can use to understand the default mount layout in Silverblue? Do I need another subvol to mount /boot rw?

To Reproduce
Please describe the steps needed to reproduce the bug:

  1. Download F36 image and write to USB flash memory storage.
  2. On a computer with EFI firmware and an existing OS, boot from the storage.
  3. Start the installation.
  4. Press Ctrl+F2 to access a shell and do not attempt automount.
  5. Mount the EFI partition in a directory under /mnt, rw.
  6. Rename the 'EFI' directory to 'EFI2'. (This is a suggested mitigation for the issue)
  7. Unmount the partition and press Ctrl+F5 to return to the anaconda GUI.
  8. Manually configure a new btrfs partition and subvol from free space in blivet-gui, assigning the mount point '/'. Set the existing EFI partition as mount point '/boot/efi'.
  9. Press 'Done' and continue the installation.

Expected behavior
Congratulations! Silverblue is successfully installed. Instead of a dialog box indicating a fatal error completing an "ostree admin" command.

@travier travier changed the title [BUG] anaconda Fails to Update Existing EFI Configuration [RFE] Dual boot / Better support in Anaconda for existing EFI setup Aug 21, 2022
@travier travier added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Aug 21, 2022
@jkonecny12
Copy link

https://bugzilla.redhat.com/show_bug.cgi?id=2167086 -- tracking this in BZ. The old bug from a duplicate have different error raised.

@travier
Copy link
Member

travier commented Feb 6, 2023

This is likely to be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1575957

@travier travier added bug Something isn't working f37 Related to Fedora 37 f36 Related to Fedora 36 rawhide f38 Related to Fedora 38 upstream Issue reported, fixed or related to upstream projects and removed enhancement New feature or request labels Feb 6, 2023
@travier travier pinned this issue Mar 1, 2023
@travier travier changed the title [RFE] Dual boot / Better support in Anaconda for existing EFI setup Dual boot / Better support in Anaconda for existing EFI setup Mar 1, 2023
@travier travier added f39 Related to Fedora 39 and removed f36 Related to Fedora 36 rawhide labels May 15, 2023
@00sapo
Copy link

00sapo commented Jul 28, 2023

Same issue with Fedora Kinoite. I even tried to format the existing EFI partition but it failed in the same way. Also tried the other tricks about moving the fedora and/or EFI folder before running the installation but didn't work.

@firefoxlover
Copy link

I can reproduce this too, on Kinoite and also ublues ISO installer

@biscotty666
Copy link

Unable to install the latest SB 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.

@travier travier added f40 Related to Fedora 40 and removed f37 Related to Fedora 37 labels Nov 24, 2023
@LukeShortCloud
Copy link

This issue seems to be specific to existing non-Windows installations. I was able to install Fedora Silverblue after installing Windows. Tested with all combinations of: Fedora Silverblue 37 and 39, Windows 10 21H2 and Windows 11 23H2. Both manual partitioning (re-using the "EFI System Partition" from Windows as /boot/efi ) and automatic partitioning works.

@fedora-mahdi
Copy link

This issue seems to be specific to existing non-Windows installations. I was able to install Fedora Silverblue after installing Windows. Tested with all combinations of: Fedora Silverblue 37 and 39, Windows 10 21H2 and Windows 11 23H2. Both manual partitioning (re-using the "EFI System Partition" from Windows as /boot/efi ) and automatic partitioning works.

@LukeShortCloud : Could you please elaborate on how you succeeded to install Silverblue after installing Windows (or with Windows 10/11 already installed)
I have SecureBoot on and couldn't get it done

If you could please detail your partitionning scheme either manual (what you meant by re-using the "EFI System Partition" from Windows as /boot/efi ?) or automatic partionning.

Thank you for your insights

@fedora-mahdi
Copy link

fedora-mahdi commented Feb 12, 2024 via email

@LukeShortCloud
Copy link

By manual format, I mean that I selected the 260 MiB FAT32 partition from Windows (used to store the EFI partition) and assigned it to the manual mount point of /boot/efi during installation on Fedora Silverblue. Alternatively, selecting the automatic partitioning in the Fedora Silveblue installer also worked.

I tested using Virtual Machine Manager (virt-manager) with the QEMU KVM back-end. TPM 2.0 and UEFI Secure Boot were both enabled for the virtual machine. Windows was installed first. Then Silverblue second.

@latenightdef
Copy link

I successfully installed Kinoite in a dual boot with Windows 11, using a second ESP.

Starting with a machine with an existing Windows 11 installation, here's the partition layout I have.

  • 100MB ESP
  • 16MB Microsoft reserved partition
  • 200GB NTFS for Windows C:\
  • [free space]

I used Fedora Media Writer to create a bootable Kinoite installation media - which also works with secure boot enabled.
Here's my working partition layout:

  • 100MB ESP
  • 16MB Microsoft reserved partition
  • 200GB NTFS for Windows C:\
  • 500MB ESP mounted at /boot/efi
  • 1GB ext4 mounted at /boot
  • 50GB btrfs mounted at /
  • [free space]

This way, the installation was successful, but Windows did not show up in GRUB yet. I had to run sudo grub2-mkconfig -o /etc/grub2-efi.cfg to update the GRUB configuration and this time it found my Windows installation.

At this point I have a working Kinoite + Windows 11 setup with secure boot enabled.

@andrabt
Copy link

andrabt commented Apr 27, 2024

Hi there!

I have installed Silverblue 40 dualboot with NixOS, and it works after 4th trial with automatic configuration from Anaconda. 😊

@travier travier added f41 Related to Fedora 41 and removed f38 Related to Fedora 38 f41 Related to Fedora 41 labels Apr 29, 2024
@f0nzie
Copy link

f0nzie commented May 7, 2024

I have my MSI laptop, originally with Windows 11, booting three OSes: Windows 11, Ubuntu 22.04, and Fedora Silverblue Bluefin-DX, all from one physical 2 TB Nvme SSD.

Before I installed Silverblue, I read the documentation which specifically recommends to install it in a different disk. But it did not satisfactorily explain why. So, I decided to install Silverblue anyway. With UEFI is much easier because during the manual installation (manual partitioning) you are given the choice to create the EFI partition for Silverblue (350 MB), as well as boot (1024 MB). Additionally, I created separate Btrfs partitions for /root (40 GB), /home, and /var.

The only difference with my previous Ubuntu 22.04 installation is that Fedora Silverblue requires to be selected as the boot manager in the UEFI setup, which is fine with me. I still have the boot options for Windows 11 and Ubuntu 22.04 in the Silverblue/Bluefin-DX boot menu.

Another OS that I tried in the same MSI laptop, and also requires to be the boot manager, is Manjaro. After some tests I removed the OS. The instructions to install Manjaro in a dual-boot disk is well explained in YouTube videos. It is somewhat different to an Ubuntu installation because Manjaro and Silverblue call for the creation of an EFI partition.

My Bluefin-DX is very stable after installing it as a second-boot OS. It was actually the third try at installing and testing the Fedora Silverblue installer until I got it right, partition size-wise, volume type (fixed vs automatic), and type (Btrfs). The installer is very friendly.

@mahdiaqallal
Copy link

Thank you for detailled answers , regarding partitionning @LukeShortCloud @latenightdef and @f0nzie

As I understand I, when installing Silverblue/Kinoite as second OS after Windows 10/11 there are two possibilities using Anaconda:

  1. Using the existing EFI/ESP partition managed by Windows, described in @LukeShortCloud 's comment

By manual format, I mean that I selected the 260 MiB FAT32 [size might by more 600MiB nowadays] partition from Windows (used to store the EFI partition) and assigned it to the manual mount point of /boot/efi during installation on Fedora Silverblue. Alternatively, selecting the automatic partitioning in the Fedora Silverblue installer also worked.

Which options in Anaconda blivet @LukeShortCloud have to be activated to that the mount point of /boot/efi is assigned to the existing EFI without erasing/formatting it's existing Windows content ?

  1. Creating a new EFI/ESP described in @latenightdef 's comment

I successfully installed Kinoite in a dual boot with Windows 11, using a second ESP.

and

run sudo grub2-mkconfig -o /etc/grub2-efi.cfg to update the GRUB configuration and this time it found my Windows installation.

Could you please @latenightdef share the relevant updated grub.cfg menuentry configuration ? Specifically on how Windows gets jump started from GRUB ?

With SecureBoot on and TPM on, (and Bitlocker in Windows is also on) I get an SecureBoot error from by EFI firmwre boot setup.
The following boot sequence is accepted:
Power on => UEFI firmware => UEFI Boot NVRAM variables => Windows EFI => Windows is booted

But this sequence fails:
Power on => UEFI firmware => UEFI Boot NVRAM variables => GRUB => grub.cfg => Menuentry for Windows => UEFI error for SecureBoot policy violation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working f39 Related to Fedora 39 f40 Related to Fedora 40 upstream Issue reported, fixed or related to upstream projects
Projects
None yet
Development

No branches or pull requests