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

Bug #807801 reported by skotadopsyxos on 2011-07-09
This bug affects 33 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Nominated for Quantal by Phillip Susi

Bug Description

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

Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
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.

Simon Strandman (nejsimon) wrote :

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

Gijs Peskens (gijspeskens) wrote :

Affected to ;)

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).

Rasmus Pedersen (rasmuslp) wrote :

My guess is that these two are similar: and
No GRUB menu (cause no other OS is detected), and whether Ubuntu or Windows boots is dependent on ones boot order.

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.

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.

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.

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:

YannUbuntu (yannubuntu) on 2012-09-14
description: updated
YannUbuntu (yannubuntu) on 2012-09-14
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
Dimitri John Ledkov (xnox) wrote :

See proposed patches to add such support in os-prober on the debian-boot mailing list:

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.

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.

Phillip Susi (psusi) wrote :

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

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

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 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) on 2013-05-23
Changed in grub2 (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-12.04.3
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers