GRUB2 fails to detect/add Windows entries on a UEFI system

Bug #807801 reported by skotadopsyxos
152
This bug affects 33 people
Affects Status Importance Assigned to Milestone
os-prober
Confirmed
Undecided
Unassigned
grub2 (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Quantal by Phillip Susi
Precise
Won't Fix
High
Unassigned

Bug Description

HOW TO REPRODUCE:
1) install Ubuntu on a computer with UEFI firmware
2) Reboot the PC, boot into Ubuntu, open a terminal and check that the 'sudo os-prober' command does not return any Windows entry.

REMARK: if it returns some Windows entry, but those entries are invalid, you may be affected by Bug #1024383 instead.

*********************** WORKAROUND **************************

either boot Windows from the (EFI) BIOS menu, or add valid Windows entries via Boot-Repair.

***** Original description:
running a fresh uefi (software uefi) system and the grub-update fails to detect windows boot entry/efi files and add them automatically
microsoft folder is present in both the efi system partition as well as the /boot folder/partition

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Strandman (nejsimon) wrote :

I have the same problem on a laptop based on AMD's E350 platform. Grub does not show by default and if I press esc during boot to display the bootloader list I have no option to boot windows.

Revision history for this message
Simon Strandman (nejsimon) wrote :

I forgot to mention that I'm running 12.04 x86_64 with the latest updates as of today.

Revision history for this message
Gijs Peskens (gijspeskens) wrote :

Affected to ;)

Revision history for this message
Rasmus Pedersen (rasmuslp) wrote :

I just installed the 12.04 beta 2 x64 on a PC that already has Win7 x64 EFI booting. When booting, the Grub menu is not show, as is standard, if there are no other OS'es to select. Manually running an update-grub does not detect Windows.

The /boot/efi/EFI/ folder containts 'Boot', 'Microsoft', and 'ubuntu' entries. Both the Boot and ubuntu folders has .efi files in them, the Microsoft folder, however, has a 'Boot' folder, that containts a whole bunch of file (among them, some .efi files).

Revision history for this message
Rasmus Pedersen (rasmuslp) wrote :

My guess is that these two are similar: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/957277 and https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/969767
No GRUB menu (cause no other OS is detected), and whether Ubuntu or Windows boots is dependent on ones boot order.

Revision history for this message
Rasmus Pedersen (rasmuslp) wrote :

I have solved this temporarily.

The GRUB menu can be unhidden by commenting out the two lines regarding GRUB_HIDDEN in /etc/defaults/grub and running update-grub as root.

Next, the entry for windows can be manually added by appending the following lines to /etc/grub.d/40_custom:
menuentry "Windows" {
    search --fs-uuid --no-floppy --set=root YOUR-EFI-PARTITIONS-UUID-HERE
    chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}

Find your EFI partitions UUID by running 'ls -la /dev/disk/by-uuid/'. As the EFI partition is a FAT32 partition, the UUID is of the form XXXX-XXXX. If you have more than one FAT partition, you can verify if one is the EFI partition by checking the partition map with gdisk (not installed by default). Run gdisk on the device, 'sudo gdisk /dev/DEVICE', press 'p' to print the partition table, and then 'q' to quit. DON'T make any changes to the partition table. The EFI partition will have the code type 'EF00' and most likely a name/label that says it is a EFI system partition.

Revision history for this message
Rasmus Pedersen (rasmuslp) wrote :

Regarding #7 > Then you ofcourse need to run 'update-grub' after editing the 40_custom file for this change to take effect.

Revision history for this message
leveldog (hadubya) wrote :

i am having problem booting into ubuntu and just get a black screen. i have 12.04 x86_64 on gateway desktop with uefi/gpt. i typed grub in terminal & i was informed that grub was not installed.

Revision history for this message
oldfred (oldfred) wrote :

It used to not create an entry at all, but now creates the standard BIOS/mbr entry when it needs to be a different UEFI/gpt type entry.

See this:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1024383

YannUbuntu (yannubuntu)
description: updated
YannUbuntu (yannubuntu)
description: updated
summary: - grub-update fails to detect windows bootloader on a uefi system
+ GRUB2 fails to detect/add Windows entries on a UEFI system
Changed in os-prober:
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

See proposed patches to add such support in os-prober on the debian-boot mailing list:
http://lists.debian.org/debian-boot/2012/10/msg00185.html

Revision history for this message
YannUbuntu (yannubuntu) wrote :

Thanks Dimitrijs for pointing to this patch.
See also comments #3 and #5 of Bug #1017880 : Newubunti proposed a way to 'read' the windows efi file.

I think we should mix those 2 patches because they are complementary.

Revision history for this message
Michael Marineau (mike-marineau) wrote :

FYI, grub2_2.00-14 and os-prober_1.58 from Debian include the previously mentioned patches. I built and installed them for raring and can confirm that update-grub properly creates the menu item for the Windows bootloader now.

Revision history for this message
Phillip Susi (psusi) wrote :

If that is true, then this should be fixed in saucy, can you try that?

Revision history for this message
Michael Marineau (mike-marineau) wrote :

Ah, I didn't notice they were updated in saucy yet since packages.ubuntu.com isn't working for saucy yet. Just updated grub and os-prober to 2.00-14ubuntu1 and 1.61ubuntu1 respectively and looks good.

Revision history for this message
Phillip Susi (psusi) wrote :

That's good to hear, FYI you can click the overview link on this page to see what versions are in what release instead of packages.ubuntu.com. I'm marking this as fixed for saucy, and will ask a release manager to target a task at 12.04 for an SRU.

Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
Phillip Susi (psusi)
Changed in grub2 (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-12.04.3
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in grub2 (Ubuntu Precise):
status: Triaged → Won't Fix
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.