[Bug 1050940] Re: Ubiquity fails creating a correct Windows dualboot on EFI computers (grub-pc <-> grub-efi)

YannUbuntu yannubuntu at gmail.com
Mon Oct 15 23:25:48 UTC 2012


Following Steve comment #6 on Bug #1015211, here are my thoughts:

> It should be obvious that if the firmware booted the CD under UEFI,
the firmware is UEFI and we should install grub-efi to the install disk
too.

You forget that the fact that many UEFI firmwares can boot on the CD/USB in a different mode than on the HDD. I added some examples in https://help.ubuntu.com/community/UEFI#Setup_the_BIOS_in_EFI_or_Legacy_mode
So if the liveCD/USB is booted in UEFI mode (= /sys/firmware/efi exists when running Ubiquity), it does not always imply that the UEFI firmware is setup to boot the HDD in UEFI mode.
Among the Boot-Repair users, I saw some Windows installed in Legacy mode (UEFI is setup to boot the HDD in Legacy mode), but when the BootInfo report (created when booting the Ubuntu CD) showed that there was a /sys/firmware/efi folder (so the firmware was booting the CD in UEFI mode).
Eg, such situations can result from the fact that some UEFI firmware try to boot the HDD in UEFI mode by default, but if there is no EFI file it then tries to boot in Legacy(mbr) mode.
These are not "buggy firmwares".

> we could rearchitect the grub packages so that we are always
installing both grub-efi and grub-pc on all installs

This is a good idea, but IMHO not for all cases, let me explain:
The difficulty we have is that when installing Ubuntu (= when we are in live session), we can't know if the firmware is setup to boot the HDD in UEFI or in Legacy mode.
However, we know that:
1) if there is an ESP with Windows EFI file, and no Legacy Windows boot files (bootmgr+boot/BCD), the firmware is setup to boot the HDD in UEFI mode, so Ubiquity must install grub-efi
2) if there is an ESP without Windows EFI file, and Legacy Windows boot files (bootmgr+boot/BCD), the firmware is setup to boot the HDD in Legacy mode, so Ubiquity has to install grub-pc.
3) if there is an ESP with Windows EFI file, and Legacy Windows boot files (bootmgr+boot/BCD), the firmware is probably setup to boot the HDD in UEFI mode, so Ubiquity must install grub-efi. But here i think Ubiquity should also install grub-pc by security, in case the firmware is setup to boot in Legacy mode.

Hope this helps making Ubiquity better.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1050940

Title:
  Ubiquity fails creating a correct Windows dualboot on EFI computers
  (grub-pc <-> grub-efi)

Status in “ubiquity” package in Ubuntu:
  Confirmed

Bug description:
  Currently, Ubiquity sometimes fails creating a correct Windows dualboot when:
  - either it installs Ubuntu in EFI mode when Windows is installed in Legacy mode ( examples: Bug #908109 , Bug #959446 , Bug #956412
  http://ubuntuforums.org/showthread.php?p=12238420#post12238420 )
  - or it installs Ubuntu in Legacy (not-EFI) mode when Windows is installed in EFI mode. ( example: http://ubuntuforums.org/showpost.php?p=12246811&postcount=6 )

  In order to create a correct dualboot, Ubiquity should always install
  Ubuntu in the same mode as Windows.

  I think the deep problem is that Ubiquity only looks at /sys/firmware/efi (or dmesg | grep EFI) to determine if it is going to install in EFI mode or not. AFAIK, dmesg only indicates the mode in which the BIOS boots the live media, NOT the mode in which the BIOS boots the HDD.
  Remark: currently Ubuntu32bit is not EFI compatible (see Bug #1025555 ), so Ubiquity32bit will always install in Legacy mode (which allowed the OP of Bug #908109 to workaround the current bug).

  (this problem is more and more frequent as new computers generally
  come with EFI firmware)

  *************** WORKAROUND: using Boot-Repair to convert Ubuntu in the same mode as Windows.
  See https://help.ubuntu.com/community/UEFI

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1050940/+subscriptions




More information about the foundations-bugs mailing list