Grub Windows Boot Manager automatically goes straight to recovery mode

If I put EndeavourOS on the top of boot priority, and try to boot windows from Grub, it brings me straight to recovery mode. Not sure what is causing this as I am able to boot into windows perfectly fine if I change the boot order in BIOS. Both my Windows and Linux are EFI.

I have tried:
turning off fast boot in windows
changing grub’s config to use os-prober to check for other boot managers
turning on and off os-prober check in the config
rebuilding the config
using os-prober to detect my windows boot manager, and it does detect it

I am basically out of ideas, any help is appreciated.

Please post the output from the following commands.

Copy the output as text, paste it into your reply, highlight it and press Ctrl-E to format

sudo parted -l

efibootmgr -v

sudo grub-mkconfig -o /boot/grub/grub.cfg 

cat /boot/grub/grub.cfg
1 Like

Also post output of this:

sudo os-prober
sed -n '\%menuentry .*windows %,\%}%p' /boot/grub/grub.cfg 

The 2nd command is enough, for grub.cfg info, instead of the full grub.cfg file :wink:

1 Like

Here are my outputs:
sudo parted -l

Model: ATA TOSHIBA HDWD130 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  16.8MB  16.8MB               Microsoft reserved partition  msftres
 2      16.8MB  600GB   600GB   ntfs         Basic data partition          msftdata
 3      600GB   1200GB  600GB   ntfs         Basic data partition          msftdata
 4      1200GB  1800GB  600GB   ntfs         Basic data partition          msftdata
 5      1800GB  2400GB  600GB   ntfs         Basic data partition          msftdata
 6      2400GB  3001GB  600GB   ntfs         Basic data partition          msftdata


Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  106MB  105MB   fat32        EFI system partition          boot, esp
 2      106MB   123MB  16.8MB               Microsoft reserved partition  msftres
 3      123MB   500GB  499GB   ntfs         Basic data partition          msftdata
 4      500GB   500GB  523MB   ntfs                                       hidden, diag


Model: Samsung SSD 970 EVO Plus 1TB (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  106MB   105MB   fat32        EFI system partition          boot, esp
 2      106MB   123MB   16.8MB               Microsoft reserved partition  msftres
 3      123MB   892GB   892GB   ntfs         Basic data partition          msftdata
 4      892GB   1000GB  108GB   ext4         root
 5      1000GB  1000GB  523MB   ntfs                                       hidden, diag

efibootmgr -v

BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0004,0001,0000
Boot0000  Windows Boot Manager  HD(1,GPT,c17765a0-b8c6-4bb4-9b9d-36913e78e9f6,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d0000004d000100000010000000040000007fff0400
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 03 00 00 00 00 00 a0 65 77 c1 c6 b8 b4 4b 9b 9d 36 91 3e 78 e9 f6 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 4d 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* Windows Boot Manager  HD(1,GPT,fb397dd1-b891-4856-8031-9a087c8bbf1a,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 03 00 00 00 00 00 d1 7d 39 fb 91 b8 56 48 80 31 9a 08 7c 8b bf 1a 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0004* endeavouros-7290      HD(1,GPT,fb397dd1-b891-4856-8031-9a087c8bbf1a,0x800,0x32000)/File(\EFI\ENDEAVOUROS-7290\GRUBX64.EFI)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 03 00 00 00 00 00 d1 7d 39 fb 91 b8 56 48 80 31 9a 08 7c 8b bf 1a 02 02 / 04 04 48 00 5c 00 45 00 46 00 49 00 5c 00 45 00 4e 00 44 00 45 00 41 00 56 00 4f 00 55 00 52 00 4f 00 53 00 2d 00 37 00 32 00 39 00 30 00 5c 00 47 00 52 00 55 00 42 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00

sudo grub-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  amd-ucode.img initramfs-linux-fallback.img
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/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Windows Boot Manager on /dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

cat /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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
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 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
search --no-floppy --fs-uuid --set=root d777e07b-e1e2-4a4f-8da0-3e0db275f68a
    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_SG
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root d777e07b-e1e2-4a4f-8da0-3e0db275f68a
insmod gfxmenu
loadfont ($root)/boot/grub/themes/EndeavourOS/unifont-regular-16.pf2
insmod png
set theme=($root)/boot/grub/themes/EndeavourOS/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'EndeavourOS, on linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-d777e07b-e1e2-4a4f-8da0-3e0db275f68a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root d777e07b-e1e2-4a4f-8da0-3e0db275f68a
        echo    'Loading kernel linux ...'
        linux   /boot/vmlinuz-linux root=UUID=d777e07b-e1e2-4a4f-8da0-3e0db275f68a rw  loglevel=3 nowatchdog nvme_load=YES nvidia-drm.modeset=1
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-ucode.img /boot/initramfs-linux.img
}
menuentry 'EndeavourOS, on linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-d777e07b-e1e2-4a4f-8da0-3e0db275f68a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root d777e07b-e1e2-4a4f-8da0-3e0db275f68a
        echo    'Loading kernel linux ...'
        linux   /boot/vmlinuz-linux root=UUID=d777e07b-e1e2-4a4f-8da0-3e0db275f68a rw  loglevel=3 nowatchdog nvme_load=YES nvidia-drm.modeset=1
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-ucode.img /boot/initramfs-linux-fallback.img
}

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

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-D26C-7C8F' {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root D26C-7C8F
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-D26C-7C8F' {
        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  D26C-7C8F
        else
          search --no-floppy --fs-uuid --set=root D26C-7C8F
        fi
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### 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 ###

Here is the output:

menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-D26C-7C8F' {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root D26C-7C8F
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-D26C-7C8F' {
        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  D26C-7C8F
        else
          search --no-floppy --fs-uuid --set=root D26C-7C8F
        fi
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}

Do you have two Windows installations on your system?

No, but theres two because I upgraded from a SATA SSD to an NVME SSD and forgot to wipe the SATA SSD partitions

Do you have two boot entries on the Grub boot menu for Windows?
If positive, are both of them non-functional?

Also, could you boot your Windows installation on the NVME drive (which I suppose is the one you want to use) when you bring up the BIOS on-shot boot menu?

Yes it does show up as 2 entries and both do the same thing, go straight to Recovery Mode, although I am not sure what an on-shot boot menu is, however going into BIOS, changing the boot order lets me use windows/endeavouros perfectly fine.

Depending on the system, pressing down one of the function keys while the system is booting up, will bring up BIOS boot menu where you can choose the boot device. This is kind of a “shortcut” for going into BIOS and change the boot device each time.

This is good because then we know both your systems are bootable.

The question is then why Grub creates a “non-bootable” boot entry for Windows :thinking:

If you are sure that your migrated Windows system (the one on the NVME drive I suppose) is bootable and fine, I would wipe the other one or at least disconnect the other drive to eliminate one potential cause for “Grub confusion”.

Afterwards, I would regenerate the grub.cfg ad check if it will get it right this time.

2 Likes

Ok I will disconnect the old ssd, and regen grub.cfg and see what happens

1 Like

I cant believe it. It was the SATA SSD all along. Now I gotta go wipe that drive. Thanks for the help!

1 Like

You are welcome!
Glad you got it sorted out!

:enos_flag:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.