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:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
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
}

Revision history for this message
Pete Higgins (petehiggins-roadrunner) said (last edit ):
#3

Asif Khan are you still trying to help me with this issue?

Are you the Asif Khan from Linux Pathfinder?

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

Asif Khan replied to my question two weeks ago. I tried what he said but it gave me the same result I got when I tried it on my own. I want to bypass the Windows 11 boot loader and just use Grub2 to load my operating systems, like I've done for years with Grub.

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#6

The message from Asif Khan was just spam, copying some general advice related to grub from some foreign source, for the purpose of adding dubious web links.

If you are using UEFI, then you better use the boot device selection offered by UEFI.

For detailed diagnostics you might try running bootinfo (probably needs to be installed).

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

Manfred Hampl,

You’ve helped me in the past -thank you. I’m sorry somebody would hijack this help forum -you folks sure don’t deserve that.

You’d think at 80 years old I’d be smart enough to know “If it isn't broke, don’t fix it”. Ubuntu is my default OS (at the top), that's the one I mostly use. When I cursor to the Windows boot loader I can boot both Windows 10 or 11. As you suggested, I installed “boot-info-script in 22.04”
sudo add-apt-repository -c universe
sudo apt install boot-info-script
sudo bootinfoscript /home/pete/RESULTS.txt

Attached is my RESULTS file. Can GRUB2 boot these three operating systems directly or under UEFI we forced to only use the Windows boot loader for Windows 10 & 11?

                 Boot Info Script 0.78 [09 October 2019]

============================= Boot Info Summary: ===============================

 => Windows 7/8/2012 is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system: vfat
    Boot sector type: Windows 8/2012: FAT32
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files: /efi/Boot/bootx64.efi /efi/Boot/fbx64.efi
                       /efi/Boot/mmx64.efi /efi/ubuntu/grubx64.efi
                       /efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi
                       /efi/ubuntu/grub.cfg /efi/Microsoft/Boot/bootmgfw.efi
                       /efi/Microsoft/Boot/bootmgr.efi
                       /efi/Microsoft/Boot/memtest.efi

sda2: __________________________________________________________________________

    File system:
    Boot sector type: -
    Boot sector info:

sda3: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows 8/2012: NTFS
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files: /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows 8/2012: NTFS
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files: /Windows/System32/winload.exe

sda5: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows 8/2012: NTFS
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files:

sda6: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows 8/2012: NTFS
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files:

sda7: __________________________________________________________________________

    File system: ext4
    Boot sector type: -
    Boot sector info:
    Operating System: Ubuntu 22.04.3 LTS
    Boot files: /boot/grub/grub.cfg /etc/fstab

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disk /dev/sda: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: TEAM TM8PS7001T
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 1 2,000,409,263 2,000,409,263 ee GPT

GUID Partition Table detected.

Partition Attrs Start Sector End Sector # of Sectors System
/dev/sda1 B 2,048 206,847 204,800 EFI System partition
/dev/sda2 206,848 239,615 32,768 Microsoft Reserved Partition (Windows)
/dev/sda3 + 239,616 314,812,415 314,572,800 Data partition (Windows/Linux)
/dev/sda4 314,812,416 524,527,615 209,715,200 Data partition (Windows/Linux)
/dev/sda5 629,385,216 1,999,124,479 1,369,739,264 Data partition (Windows/Linux)
/dev/sda6 R 1,999,126,528 2,000,406,527 1,280,000 Windows Recovery Environment (Windows)
/dev/sda7 524,527,616 629,385,215 104,857,600 Data partition (Linux)

Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set

"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/loop1 squashfs
/dev/loop10 squashfs
/dev/loop11 squashfs
/dev/loop12 squashfs
/dev/loop13 squashfs
/dev/loop14 squashfs
/dev/loop15 squashfs
/dev/loop16 squashfs
/dev/loop2 squashfs
/dev/loop3 squashfs
/dev/loop4 squashfs
/dev/loop5 squashfs
/dev/loop6 squashfs
/dev/loop7 squashfs
/dev/loop8 squashfs
/dev/loop9 squashfs
/dev/sda1 7CC3-A53D vfat
/dev/sda2
/dev/sda3 AE62C85D62C82BC1 ntfs Kamrui-2 SSD Win 11
/dev/sda4 88C44EEBC44EDB58 ntfs Kamrui-2 SSD WIN 10
/dev/sda5 F4E66CF1E66CB590 ntfs Kamrui-2 SSD DATA
/dev/sda6 C060007F60007E82 ntfs
/dev/sda7 cf2ce86b-39ae-4ec2-8710-718acc6a1425 ext4

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root 9 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204 -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 Nov 2 15:29 ata-TEAM_TM8PS7001T_TPBF2210040010301204-part7 -> ../../sda7

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/sda1 /boot/efi vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda7 / ext4 (rw,relatime,errors=remount-ro)
/dev/sda7 /var/snap/firefox/common/host-hunspell ext4 (ro,noexec,noatime,errors=remount-ro)

========================== sda1/efi/ubuntu/grub.cfg: ===========================

--------------------------------------------------------------------------------
search.fs_uuid cf2ce86b-39ae-4ec2-8710-718acc6a1425 root hd0,gpt7
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
--------------------------------------------------------------------------------

=========================== sda7/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${initrdfail}" = 2 ]; then
   set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
   set next_entry="${prev_entry}"
   set prev_entry=
   save_env prev_entry
   if [ "${next_entry}" ]; then
      set initrdfail=2
   fi
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function initrdfail {
    if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
      if [ -z "${initrdfail}" ]; then
        set initrdfail=1
        if [ -n "${boot_once}" ]; then
          set prev_entry="${default}"
          save_env prev_entry
        fi
      fi
      save_env initrdfail
    fi; fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 cf2ce86b-39ae-4ec2-8710-718acc6a1425
else
  search --no-floppy --fs-uuid --set=root cf2ce86b-39ae-4ec2-8710-718acc6a1425
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=10
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 10 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/blue
set menu_color_highlight=black/light-gray
set color_normal=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
 set gfxpayload="${1}"
 if [ "${1}" = "keep" ]; then
  set vt_handoff=vt.handoff=7
 else
  set vt_handoff=
 fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-cf2ce86b-39ae-4ec2-8710-718acc6a1425' {
 recordfail
 load_video
 gfxmode $linux_gfx_mode
 insmod gzio
 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
 insmod part_gpt
 insmod ext2
 set root='hd1,gpt7'
 if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 cf2ce86b-39ae-4ec2-8710-718acc6a1425
 else
   search --no-floppy --fs-uuid --set=root cf2ce86b-39ae-4ec2-8710-718acc6a1425
 fi
 linux /boot/vmlinuz-6.2.0-36-generic root=UUID=cf2ce86b-39ae-4ec2-8710-718acc6a1425 ro quiet splash $vt_handoff
 initrd /boot/initrd.img-6.2.0-36-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-cf2ce86b-39ae-4ec2-8710-718acc6a1425' {
 menuentry 'Ubuntu, with Linux 6.2.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-36-generic-advanced-cf2ce86b-39ae-4ec2-8710-718acc6a1425' {
  recordfail
  load_video
  gfxmode $linux_gfx_mode
  insmod gzio
  if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  insmod part_gpt
  insmod ext2
  set root='hd1,gpt7'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 cf2ce86b-39ae-4ec2-8710-718acc6a1425
  else
    search --no-floppy --fs-uuid --set=root cf2ce86b-39ae-4ec2-8710-718acc6a1425
  fi
  echo 'Loading Linux 6.2.0-36-generic ...'
  linux /boot/vmlinuz-6.2.0-36-generic root=UUID=cf2ce86b-39ae-4ec2-8710-718acc6a1425 ro quiet splash $vt_handoff
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd.img-6.2.0-36-generic
 }
 menuentry 'Ubuntu, with Linux 6.2.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-36-generic-recovery-cf2ce86b-39ae-4ec2-8710-718acc6a1425' {
  recordfail
  load_video
  insmod gzio
  if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  insmod part_gpt
  insmod ext2
  set root='hd1,gpt7'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 cf2ce86b-39ae-4ec2-8710-718acc6a1425
  else
    search --no-floppy --fs-uuid --set=root cf2ce86b-39ae-4ec2-8710-718acc6a1425
  fi
  echo 'Loading Linux 6.2.0-36-generic ...'
  linux /boot/vmlinuz-6.2.0-36-generic root=UUID=cf2ce86b-39ae-4ec2-8710-718acc6a1425 ro recovery nomodeset dis_ucode_ldr
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd.img-6.2.0-36-generic
 }
 menuentry 'Ubuntu, with Linux 6.2.0-35-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-35-generic-advanced-cf2ce86b-39ae-4ec2-8710-718acc6a1425' {
  recordfail
  load_video
  gfxmode $linux_gfx_mode
  insmod gzio
  if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  insmod part_gpt
  insmod ext2
  set root='hd1,gpt7'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 cf2ce86b-39ae-4ec2-8710-718acc6a1425
  else
    search --no-floppy --fs-uuid --set=root cf2ce86b-39ae-4ec2-8710-718acc6a1425
  fi
  echo 'Loading Linux 6.2.0-35-generic ...'
  linux /boot/vmlinuz-6.2.0-35-generic root=UUID=cf2ce86b-39ae-4ec2-8710-718acc6a1425 ro quiet splash $vt_handoff
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd.img-6.2.0-35-generic
 }
 menuentry 'Ubuntu, with Linux 6.2.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-35-generic-recovery-cf2ce86b-39ae-4ec2-8710-718acc6a1425' {
  recordfail
  load_video
  insmod gzio
  if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  insmod part_gpt
  insmod ext2
  set root='hd1,gpt7'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 cf2ce86b-39ae-4ec2-8710-718acc6a1425
  else
    search --no-floppy --fs-uuid --set=root cf2ce86b-39ae-4ec2-8710-718acc6a1425
  fi
  echo 'Loading Linux 6.2.0-35-generic ...'
  linux /boot/vmlinuz-6.2.0-35-generic root=UUID=cf2ce86b-39ae-4ec2-8710-718acc6a1425 ro recovery nomodeset dis_ucode_ldr
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd.img-6.2.0-35-generic
 }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-7CC3-A53D' {
 insmod part_gpt
 insmod fat
 set root='hd1,gpt1'
 if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 7CC3-A53D
 else
   search --no-floppy --fs-uuid --set=root 7CC3-A53D
 fi
 chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
 fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# 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.

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda7/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda7 during installation
UUID=cf2ce86b-39ae-4ec2-8710-718acc6a1425 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=7CC3-A53D /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
--------------------------------------------------------------------------------

=================== sda7: Location of files loaded by Grub: ====================

           GiB - GB File Fragment(s)

 279.079589844 = 299.659427840 boot/grub/grub.cfg 1
 275.002105713 = 295.281262592 boot/vmlinuz 1
 276.900539398 = 297.319690240 boot/vmlinuz-6.2.0-35-generic 2
 275.002105713 = 295.281262592 boot/vmlinuz-6.2.0-36-generic 1
 276.900539398 = 297.319690240 boot/vmlinuz.old 2
 291.421226501 = 312.911159296 boot/initrd.img 1
 290.866535187 = 312.315564032 boot/initrd.img-6.2.0-35-generic 1
 291.421226501 = 312.911159296 boot/initrd.img-6.2.0-36-generic 1
 290.866535187 = 312.315564032 boot/initrd.img.old 1

======================== Unknown MBRs/Boot Sectors/etc: ========================

/dev/sda3: unknown GPT attributes
8000000000000000

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

What I see from your output is:

chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi (EFI in caps)
/efi/Microsoft/Boot/bootmgfw.efi (efi in small characters)
“Error: file EFIMicrosoft/Boot/bootmgfu.efi not found.” (a slash character missing between EFI and Microsoft)

I do not know whether that is just a typo error in this question document, of if that causes the boot process not working as desired.

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

Manfred Hampl,

I couldn’t find that error in the RESULTS file I posted. As you can see from the posts above, that error appeared when I selected either of the new Windows 11 or 10 GRUB2 entries. I got the “Error: file EFIMicrosoft/Boot/bootmgfw.efi not found.” showing the missing slash mark

This entry worked and took me to the same boot manager that was already displayed.

menuentry 'Windows BootMgr' {
    search --fs-uuid --no-floppy --set=root 7CC3-A53D
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
If I use the menu entry this provides or the original boot menu entry, I can boot into Windows 11 or 10 just fine, it just takes forever.

When I pasted either of the following (or both) two entries into my “grub.d/40_custom” file and ran “sudo update-grub” and tried to use one of them to boot, that produced the error message your seeing “Error: file EFIMicrosoft/Boot/bootmgfw.efi not found.” with the missing slash.

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
}

I want to be able to boot directly into Windows 11 or 10, bypassing the slower Windows UEFI boot manager. If this isn’t possible with the new UEFI GRUB2 then I’ll close out my request for help. In either case, thanks for trying to help me.

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

Have you tried replacing .../EFI/Microsoft/... by .../efi/Microsoft/... (small "efi" instead of caps) in the modifications that you did in the grub files (e.g. grub.d/40_custom)?

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

Manfred Hampl,

I edited my 40_custom file to look like this and ran sudo update-grub:

40_custom file (from sudo -H gedit /etc/grub.d/40_custom)
#!/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
}

When I rebooted and tried to boot into the newly added Windows 11 menu item I got the essentially the same error message (“Error: file efi/Microsoft/Boot/bootmgfu.efi not found.” ), but notice efi is in lower case and there is a slash between efi and Microsoft.

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

Manfred Hampl,

For your information, when I selected the menu item added buy
menuentry 'Windows BootMgr' {
    search --fs-uuid --no-floppy --set=root 7CC3-A53D
    chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
I was able to use the windows boot manager to load Windows 11 & 10, so using lower case "efi" didn't change the way that worked.

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

What you didn't show is the output that you receive when you run
sudo update-grub
please paste it here

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

pete@Kamrui-2:~$ sudo update-grub
[sudo] password for pete:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-36-generic
Found initrd image: /boot/initrd.img-6.2.0-36-generic
Found linux image: /boot/vmlinuz-6.2.0-35-generic
Found initrd image: /boot/initrd.img-6.2.0-35-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
pete@Kamrui-2:~$

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#15

The update-grub output looks normal.

I am running out of ideas. I do not see anything wrong on Ubuntu or grub side. Your problem seems related to booting Windows, so maybe you better refer to support sites for WIndows.

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

Manfred Hampl,

Thank you for trying to help me. I haven't been able to figure it out either. The SSD has separate partitions for the Windows Boot Manager (2), Windows 11, Windows 10, Ubuntu 22.04 and a Data partition. If I go thru the boot manager I can boot either of the Windows operating systems. GRUB2 gives me the choice of Ubuntu or the Windows Boot Manager -it defaults to Ubuntu, but I know how to change the default boot order. Theirs got to be something we're missing to configure GRUB2, but like you I haven't been able to figure it out. I'll follow your suggestion to try the support sites for Windows. Again, thanks for all your help.

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

Thanks Manfred Hampl, that solved my question.