Existing bios mode Windows install left unbootable after installing in EFI mode

Bug #1786992 reported by Phillip Susi
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Triaged
Critical
Armaan
partman-auto (Ubuntu)
Triaged
Critical
Armaan
partman-efi (Ubuntu)
Triaged
Critical
Unassigned
ubiquity (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

Bugs #1668148 and #1766945 changed the installation process to install grub-efi instead of grub-pc when the installer is booted in EFI mode but the existing OS on the disk is in bios mode. Currently, this renders the existing Windows or FreeDOS install unbootable. Windows installs at least may be able to be salvaged by patching os-prober to generate a grub.cfg that still has the windows bios mode chainloader command when interpreted by grub-pc ( if the user tells their firmware to boot in legacy mode ), or to chainload the windows EFI boot loader when booting grub-efi. Normally os-prober looks for the windows bootmgr in the ESP, but in the case of a bios mode install, a copy can also be found in the windows\boot directory and at least in theory should be loadable to boot Windows even though it was originally installed in bios mode.

As things currently stand, this will be a major breakage for users in 18.10 and 18.04.1, so unless the changes to os-prober can be made in time, the other two changes should be reverted and simply stick with grub-pc in the case where the existing OS is in bios mode.

Phillip Susi (psusi)
Changed in os-prober (Ubuntu):
milestone: none → ubuntu-18.04.1
Changed in partman-auto (Ubuntu):
milestone: none → ubuntu-18.04.1
Changed in partman-efi (Ubuntu):
milestone: none → ubuntu-18.04.1
Changed in ubiquity (Ubuntu):
milestone: none → ubuntu-18.04.1
Changed in os-prober (Ubuntu):
status: New → Triaged
Changed in partman-auto (Ubuntu):
status: New → Triaged
Changed in partman-efi (Ubuntu):
status: New → Triaged
Changed in ubiquity (Ubuntu):
status: New → Triaged
Changed in os-prober (Ubuntu):
importance: Undecided → Critical
Changed in partman-auto (Ubuntu):
importance: Undecided → Critical
Changed in partman-efi (Ubuntu):
importance: Undecided → Critical
Changed in ubiquity (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Phillip Susi (psusi) wrote :

To clarify, if Ubuntu is booted in EFI mode, os-prober will currently assume that grub will continue to boot in EFI mode and so refuse to add a bios Windows chainloader stanza to the menu since it will not work. It will only add a windows entry if it finds the windows efi loader in the ESP. It may be able to come up with sufficient logic to have a bios chainloader entry that is only displayed by grub-pc and hidden in grub-efi, and a corresponding EFI mode that is hidden vice versa.

That would get us out of this mess at least with Windows, though bare metal FreeDOS installs are still going to be left out in the cold.

Changed in partman-efi (Ubuntu):
assignee: nobody → Khoob Ram Bains (khoobram)
Changed in os-prober (Ubuntu):
assignee: nobody → Khoob Ram Bains (khoobram)
Changed in partman-auto (Ubuntu):
assignee: nobody → Khoob Ram Bains (khoobram)
Changed in ubiquity (Ubuntu):
assignee: nobody → Khoob Ram Bains (khoobram)
Changed in os-prober (Ubuntu):
assignee: Khoob Ram Bains (khoobram) → nobody
Changed in partman-auto (Ubuntu):
assignee: Khoob Ram Bains (khoobram) → nobody
Changed in partman-efi (Ubuntu):
assignee: Khoob Ram Bains (khoobram) → nobody
Changed in ubiquity (Ubuntu):
assignee: Khoob Ram Bains (khoobram) → nobody
Changed in ubiquity (Ubuntu):
status: Triaged → New
Changed in ubiquity (Ubuntu):
status: New → Triaged
Armaan (armaan2896)
Changed in os-prober (Ubuntu):
assignee: nobody → Armaan (armaan2896)
Changed in partman-auto (Ubuntu):
assignee: nobody → Armaan (armaan2896)
Changed in ubiquity (Ubuntu):
status: Triaged → Fix Released
assignee: nobody → Jaber Rahimifard (jaberbk)
assignee: Jaber Rahimifard (jaberbk) → nobody
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

I think this is pretty important ( Tested in 22.04 ) because even if ( like I do ) Force the install of Ubuntu in Legacy mode ( By selecting the right boot option in boot menu )

Your 2016-era computer will Boot in EFI mode in priority and as Ubuntu now create an EFI partition even in Legacy mode ( which is a great idea if you move your disk ) , But selecting the Windows entry in the grub2 menu will obviously fail as Windows is installed in Legacy mode.

if there is a way to let Windows boot in legacy although grub2 is launched in EFI , this would be a great help when we create the dual Boot

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.