How do I use GRUB2 to directly boot UEFI Win 11, 10 & Ubuntu 22.04?

Asked by Pete Higgins

I have a 1 TB SSD with three operating systems and a large data partition installed.

/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 239615 32768 16M Microsoft reserved
/dev/sda3 239616 314812415 314572800 150G Microsoft basic data (Win 11)
/dev/sda4 314812416 524527615 209715200 100G Microsoft basic data (Win 10)
/dev/sda5 629385216 1999124479 1369739264 653.1G Microsoft basic data (Data)
/dev/sda6 1999126528 2000406527 1280000 625M Windows recovery environment
/dev/sda7 524527616 629385215 104857600 50G Linux filesystem (Ubuntu 22.04)

Note: Partition table entries are not in disk order.

GRUB2 currently shows both Ubuntu and the Windows Boot Manager (on /dev/sda1).

I want to use GRUB2 and not the Windows Boot Manager (BCD Store) to boot into Windows 11 and 10. When I first boot, I have to cursor to the Windows Boot Manager, hit enter and then wait for the Boor Manager to load. The Windows Boot Manager appears to reset the “default” flag when I select Windows 10 and then shutdown the computer and when it reboots I have to cursor to the Windows Boot Manager again and hit Enter to load Windows 10. I’m hopping that GRUB2 will let me boot into the selected OS directly from it’s menu, similar to what GRUB has always done.

UUID of the EFI partition
sudo blkid /dev/sda1
/dev/sda1: UUID="7CC3-A53D" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="57615f54-bf72-443d-8f10-39606b9b77d6"

sudo blkid /dev/sda3
/dev/sda3: LABEL="Kamrui-2 SSD (WIN 11)" BLOCK_SIZE="512" UUID="AE62C85D62C82BC1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="57fcd13e-2a2a-4cf7-87cf-306b753df420"

sudo blkid /dev/sda4
/dev/sda4: LABEL="Kamrui-2 SSD WIN 10" BLOCK_SIZE="512" UUID="88C44EEBC44EDB58" TYPE="ntfs"
PARTUUID="5f9372ec-6ff0-4a0e-b8e1-4a0a03946b56"

I added the following to the grub.cfg file
sudo -H gedit /etc/grub.d/40_custom

menuentry 'Windows BootMgr' {
    search --fs-uuid --no-floppy --set=root 7CC3-A53D
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
sudo update-grub

This worked and loaded the Windows Boot Manager but it takes me directly to the Windows Boot Manager file and ends up working just like I’d selected it originally. But it does allow me to boot into Windows 10, it just takes forever.

I added the UUID of the Windows 10 partition to the 40_custom file but when I select it I get “Error: file EFIMicrosoft/Boot/bootmgfu.efi not found.”

sudo -H gedit /etc/grub.d/40_custom

menuentry 'Windows 10' {
    search --fs-uuid --no-floppy --set=root 88C44EEBC44EDB58
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
sudo update-grub

Do I need to install the “bootmgfu.efi” to the root of the Windows 11 & 10 partitions? I can’t find it.

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Asif Khan (asifkhan07) said :
#1

To boot UEFI Windows 11, 10, and Ubuntu 22.04 using GRUB2:

Get the UUID of the EFI partition with sudo blkid /dev/sda1.

Obtain the UUIDs for Windows 11 and Windows 10 partitions.

Add Windows 11 and Windows 10 entries to your 40_custom file with the UUIDs.

Save and update GRUB.

Ensure you use the correct UUIDs and paths. "bootmgfw.efi" is typically in the EFI partition and doesn't need separate installation. GRUB2 will then allow you to select and boot your preferred OS.

Revision history for this message
Pete Higgins (petehiggins-roadrunner) said :
#2

Thanks for getting back to me so quickly. If I did it right, your solution didn’t work. I pasted the entries into my grub.d/40_custom file and ran sudo update-grub. Thank you for correcting “bootmgfw.efi “. I’m 80 years old and sometimes have trouble reading the small screen error messages. The following is a copy my grub.d/40_custom file. When I select the new Windows 11 or 10 entries I get the “Error: file EFIMicrosoft/Boot/bootmgfw.efi not found.”

sudo blkid /dev/sda1 = UUID="7CC3-A53D"
sudo blkid /dev/sda3 = UUID= UUID="AE62C85D62C82BC1"
sudo blkid /dev/sda4 = UUID="88C44EEBC44EDB58"

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows BootMgr' {
    search --fs-uuid --no-floppy --set=root 7CC3-A53D
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry 'Windows 11' {
    search --fs-uuid --no-floppy --set=root AE62C85D62C82BC1
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry 'Windows 10' {
    search --fs-uuid --no-floppy --set=root 88C44EEBC44EDB58
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

Can you help with this problem?

Provide an answer of your own, or ask Pete Higgins for more information if necessary.

To post a message you must log in.