Bug 2351559

Summary: Grub cannot boot Windows on a dual boot installation.
Product: [Fedora] Fedora Reporter: Lukas Ruzicka <lruzicka>
Component: grub2Assignee: Nicolas Frayer <nfrayer>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 42CC: awilliam, kparal, lbrabec, lkundrak, lsandova, mlewando, nfrayer, pjanda, pjones, robatino
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: AcceptedBlocker
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-03-27 20:46:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2291265    
Attachments:
Description Flags
Screenshot of Grub entry none

Description Lukas Ruzicka 2025-03-12 11:08:18 UTC
When I try to perform a dual boot with Windows, everything seems to work normally, but Grub cannot boot Windows. When the Windows is selected, it changes into a black screen with a non-blinking cursor in the upperleft corner. So, the system stays for quite a long time until the user's patience wears off. 

Fedora, on the other hand, can boot without any issues.

I have seen this on an EFI machine.

Reproducible: Always

Steps to Reproduce:
1. Install Windows on the entire disk.
2. Restart the computer and check that Windows boots.
2. Install Fedora Workstation Beta 1.3 RC using WebUI to resize the Windows disk and create the dualboot. 
3. Check that Windows boot -> they don't
Actual Results:  
Windows cannot be booted when dual boot installation is performed.

Expected Results:  
Windows should boot.

Comment 1 Fedora Blocker Bugs Application 2025-03-12 11:27:28 UTC
Proposed as a Blocker for 42-final by Fedora user lruzicka using the blocker tracking app because:

 This violates the Windows Dual Boot criterion.

https://fedoraproject.org/wiki/Fedora_42_Final_Release_Criteria#Windows_dual_boot

Comment 2 Marta Lewandowska 2025-03-12 12:34:19 UTC
Fix is on the way: https://bodhi.fedoraproject.org/updates/FEDORA-2025-22620dca9b

Comment 3 Kamil Páral 2025-03-17 08:28:16 UTC
The fix is now stable.

Lukas, can you please verify whether it fixes your setup?

Comment 4 Lukas Ruzicka 2025-03-17 15:35:46 UTC
I will give it a try. Will update when I am ready.

Comment 5 Lukas Brabec 2025-03-17 17:45:31 UTC
Discussed during the 2025-03-17 blocker review meeting [1]:

* AGREED: 2351559 - AcceptedBlocker (Final) - this is accepted as a violation of "The installer must be able to install into free space alongside an existing clean Windows installation. As long as the Windows installation does not have BitLocker enabled, the installer must also install a bootloader which can boot into both Windows and Fedora"

[1] https://meetbot-raw.fedoraproject.org/blocker-review_matrix_fedoraproject-org/2025-03-17/f42-blocker-review.2025-03-17-16.00.log.html

Comment 6 Lukas Ruzicka 2025-03-17 17:52:16 UTC
With the fix, I am still experiencing the issue on my EFI based VM. Unfortunately, I am not able to obtain any Linux logs because the system is not running per se. After I select to boot the Windows, I end up with a black screen with a white cursor. That situations stays for a long time. If I try and boot Fedora, it's ok. If I boot Windows from the EFI menu, it works, too. I just cannot boot from Fedora Grub.

I have taken a screenshot of the grub entry that loads Windows in case you want to check that.

Comment 7 Lukas Ruzicka 2025-03-17 18:07:09 UTC
I will try to run this on bare metal again and see how that goes.

Comment 8 Lukas Ruzicka 2025-03-17 18:43:51 UTC
Created attachment 2080630 [details]
Screenshot of Grub entry

Comment 9 Lukas Ruzicka 2025-03-18 12:34:30 UTC
On bare metal, I am not experiencing any problems. Everything works as expected. It is just the VM that is affected.

Comment 10 Nicolas Frayer 2025-03-18 12:59:19 UTC
Hi Lukas,

Just to leave an update here after our conversation:
On a UEFI VM, I've installed Win10, resized the ntfs partition with the fedora installer and installed fedora with this ISO [0].
Windows and Fedora boot fine for me. I've verifier the grub version installed/used and it's the latest (grub2-2.12-26.fc42).

I am not sure what could be the issue.

Can you please enable some debug when you reach the grub menu by pressing 'e' on the entry you want to boot, then add "set debug=all" and finally press Ctrl+X to execute the entry ?
Maybe we can spot something.

Thanks,

Nicolas

[0] https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-42/compose/Workstation/x86_64/iso/Fedora-Workstation-Live-42-20250317.n.0.x86_64.iso

Comment 11 Lukas Ruzicka 2025-03-18 15:38:26 UTC
Sure. Where do I add it? Can I add it on an extra line below the set root? Or behind the set root command on the same line?

Comment 12 Nicolas Frayer 2025-03-18 16:04:42 UTC
You can add it at the top it's fine.

Comment 13 Kamil Páral 2025-03-21 10:10:34 UTC
We mostly care about bare metal here, so I'll set this as VERIFIED.

Lukas, do you have time to add the VM debug output?

Comment 14 Petr Janda 2025-03-21 13:36:41 UTC
To add my "discoveries"

I can reproduce failure with F42 used as a hypervizor. I cannot reproduce it on F40
I suspect some OVMF change causing chainloading in grub to fail.

what I tried
- install F40 with edk-ovmf-20241117-5.fc40.noarch
- use virt-manager to create a UEFI VM with 70GB HDD, firmware OVMF_CODE_4M.secboot.qcow2
  - install W10Education edition VM
  - reboot VM  - Win boots
  - shutdown VM
  - start VM in a way it boots from F42 DVD
  - install Fedora in VM, shrinking W10 partition to 50GB
  - reboot
    system starts into grub, when Windows is chosen it displays a white cursor in
    left top corner, but also a spinner in middle bottom and boots correctly

- then I replaced content of /usr/share/edk2/ovmf by content from edk2-ovmf-20250221-8.fc42.noarch
  - fedora in VM starts without any issues
  - Windows is possible to start via bootmanager from firmware
  - Windows start fails when chosen in the grub - white cursor in top left corner, black screen, nothing else.

It is similar in F42 hypervizor.
- with edk2-ovmf-20250221-8.fc42.noarch chainloading windows fails
- with edk-ovmf-20241117-5.fc40.noarch chainloading windows is successful


I'll create a bug to OVMF.

Comment 15 Petr Janda 2025-03-21 14:39:05 UTC
bug 2354064 is created to follow on EDK (OVMF) side as it does not look as a bug caused by a grub2 change

Comment 16 Adam Williamson 2025-03-27 20:46:23 UTC
since the update that fixed this is stable, it should be closed, not VERIFIED. closing. if I misunderstood and there is still an outstanding blocker issue here, please re-open.