You are not logged in.

#1 2023-12-26 03:44:05

shuruper
Member
Registered: 2020-06-21
Posts: 67

[SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Hi,

I'm having a problem configuring GRUB to properly dual-boot Arch Linux and Win11, both on physically separate disk drives. First of all, I can boot both Linux and Win11 separately by setting GRUB or Windows boot manager in UEFI setup.
My problem is that after uncommenting a "GRUB_DISABLE_OS_PROBER=false" line in /etc/default/grub, running "os-prober" and updating grub I still do not see a separate line in GRUB for booting Win11 although it seems like the operations were successful.

sudo os-prober
/dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  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
Adding boot menu entry for UEFI Firmware Settings ...
done

I need to mention also, that I've just finished migrating Arch to the new ssd via file copying (per https://wiki.archlinux.org/title/Migrat … _hardware) and this is the only thing which isn't working.
Any help will be appreciated.

Last edited by shuruper (2023-12-28 20:57:00)

Offline

#2 2023-12-26 10:57:56

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Can we see the output of

$ efibootmgr -u
$ lsblk -o name,partuuid
# grub-mkconfig 2>/dev/null

Jin, Jîyan, Azadî

Offline

#3 2023-12-27 05:06:10

shuruper
Member
Registered: 2020-06-21
Posts: 67

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Here it is:

efibootmgr -u
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0005,0006,0003,0002,0001,0000,0004
Boot0000  Arch_boot     PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/USB(2,0)/HD(1,GPT,ac6ab73d-b148-4868-84b0-a8be0f296729,0x800,0x1dcf7df)/CDROM(1,0x1ac800,0x1e000)/File(\EFI\BOOT\BOOTx64.EFI)
Boot0001* UEFI RST PC801 NVMe SK hynix 1TB NB6N605510706J3I     HD(1,GPT,d1705b12-7594-4d69-8e01-d34d690848c4,0x800,0x78000)/File(\EFI\Boot\BootX64.efi)걎脈鼑䵙຅᫢ⱒ뉙
Boot0002* Linux Firmware Updater        HD(1,GPT,a2b3eb4a-347a-cb40-a0d9-f8afecd0e18c,0x800,0x100000)/File(\EFI\arch\fwupdx64.efi)
Boot0003* Linux Boot Manager    HD(1,GPT,0423bb2a-6083-490f-af8b-b795d6aabcad,0x800,0x100000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0004* UEFI HTTPs Boot       PciRoot(0x0)/Pci(0x1f,0x6)/MAC(000000000000,0)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()걎脈鼑䵙຅᫢ⱒ뉙
Boot0005* GRUB  HD(1,GPT,0423bb2a-6083-490f-af8b-b795d6aabcad,0x800,0x100000)/File(\EFI\GRUB\grubx64.efi)
Boot0006* Windows Boot Manager  HD(1,GPT,d1705b12-7594-4d69-8e01-d34d690848c4,0x800,0x78000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)䥗䑎坏S
lsblk -o name,partuuid
NAME        PARTUUID
nvme1n1     
├─nvme1n1p1 0423bb2a-6083-490f-af8b-b795d6aabcad
├─nvme1n1p2 67d1b4bd-d7a1-402b-b309-17ae20a949f4
└─nvme1n1p3 388b2737-4088-419c-876a-526d40c7e1ee
nvme0n1     
├─nvme0n1p1 d1705b12-7594-4d69-8e01-d34d690848c4
├─nvme0n1p2 9cd22e1b-4580-4c8a-8d54-2ed4957b352d
├─nvme0n1p3 23ea1a1b-ca73-4771-a6dc-c16218651682
├─nvme0n1p4 dfd1bf71-cada-47b6-84d0-8ec40172d53a
├─nvme0n1p5 fb566334-b038-4f17-ba7a-8921cd22ee20
├─nvme0n1p6 c925b1c7-7aa8-4c08-88e1-3ec69bbe4176
└─nvme0n1p7 08e3723d-a287-4fb1-b4f1-9cf87de1c8fa
sudo grub-mkconfig 2 > /dev/null
[sudo] password for rutkaf: 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  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
Adding boot menu entry for UEFI Firmware Settings ...
done

thanks for your help.

Offline

#4 2023-12-27 10:26:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

shuruper wrote:
sudo grub-mkconfig 2 > /dev/null

My command request did not include a space between "2" & ">". The lack of a space is important so please run the command again exactly as I posted. Copy&paste to avoid transcription errors.


Jin, Jîyan, Azadî

Offline

#5 2023-12-28 03:02:39

shuruper
Member
Registered: 2020-06-21
Posts: 67

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Apologies, here is the full output:

sudo grub-mkconfig 2>/dev/null
#
# 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 d3d625f8-0c9d-4915-952a-8242a980b099
    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_input console
terminal_output gfxterm
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 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d3d625f8-0c9d-4915-952a-8242a980b099' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root d3d625f8-0c9d-4915-952a-8242a980b099
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=UUID=d3d625f8-0c9d-4915-952a-8242a980b099 rw nvme_core.default_ps_max_latency_us=0 ibt=off quiet resume=/dev/nvme1n1p2 resume_offset=33386496 loglevel=3
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-d3d625f8-0c9d-4915-952a-8242a980b099' {
        menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-d3d625f8-0c9d-4915-952a-8242a980b099' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root d3d625f8-0c9d-4915-952a-8242a980b099
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=d3d625f8-0c9d-4915-952a-8242a980b099 rw nvme_core.default_ps_max_latency_us=0 ibt=off quiet resume=/dev/nvme1n1p2 resume_offset=33386496 loglevel=3
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux.img
        }
        menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-d3d625f8-0c9d-4915-952a-8242a980b099' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root d3d625f8-0c9d-4915-952a-8242a980b099
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=d3d625f8-0c9d-4915-952a-8242a980b099 rw nvme_core.default_ps_max_latency_us=0 ibt=off quiet resume=/dev/nvme1n1p2 resume_offset=33386496 loglevel=3
                echo    'Loading initial ramdisk ...'
                initrd  /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/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-38B2-CAC1' {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root 38B2-CAC1
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
        fwsetup --is-supported
        if [ "$?" = 0 ]; then
                menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
                        fwsetup
                }
        fi
fi
### 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 ###

Last edited by shuruper (2023-12-28 03:05:19)

Offline

#6 2023-12-28 03:06:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Sounds like you changed how the ESP or boot partition was mounted and didn't reinstall. grub-install hard-codes the location of the config file in the executable.

Offline

#7 2023-12-28 04:13:10

shuruper
Member
Registered: 2020-06-21
Posts: 67

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Not sure what you mean by that. I've reinstalled and reconfigured grub after migrating, don't know what else can be done.

Offline

#8 2023-12-28 10:42:11

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Run `set` from the GRUB command line to see where it's looking for grub.cfg.


Jin, Jîyan, Azadî

Offline

#9 2023-12-28 17:08:08

shuruper
Member
Registered: 2020-06-21
Posts: 67

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

So I did, here is the output:

grub> set
?='0'
cmdpath='(hd1,gpt1)/EFI/GRUB'
color_highlight='black/light-gray'
color_normal='light-gray/black'
default='0'
feature_200_final='y'
feature_all_video_module='y'
feature_default_font_path='y'
feature_menuentry_id='y'
feature_menuentry_options='y'
feature_nativedisk_cmd='y'
feature_ntldr='y'
feature_platform_search_hint='y'
feature_timeout_style='y'
font='unicode'
gfxmode='auto'
grub_cpu='x86_64'
grub_platform='efi'
lang=''
locale_dir=''
menuentry_id_option='--id'
net_default_ip=''
net_default_mac=''
net_default_server=''
pager=''
prefix='(hd1,gpt1)/grub'
pxe_default_server=''
root='hd1,gpt1'
secondary_locale_dir=''
timeout_style='menu'

I wish I knew how to send output from grub command line somewhere, but probably to have it secure is better ))

More to it, but not sure how important it is: it seems like /dev/ labels are intermittent. I.e., I can have /dev/nvme0n1 to be renamed into /dev/nvme1n1 (and the other disk to /dev/nvme0n1 of course) after a reboot. Entries in /etc/fstab and /etc/default/grub I made are via UUID, not /dev/nvme... though.

Offline

#10 2023-12-28 17:32:25

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Looks like it's reading grub.cfg from /grub/ on /dev/nvme1n1p1 (as listed in post #3, PARTUUID=0423bb2a-6083-490f-af8b-b795d6aabcad) so check that partition for the file, it won't have a Windows menuentry if I'm right.

The posted grub-mkconfig output doesn't look for a separate /boot/ partition so Scimmia is right, as usual.

Make sure all of your partitions are mounted as desired (use `findmnt` or `lsblk -f` to list them all) then run the grub-install command appropriate for your configuration and re-configure GRUB.

It can be confusing because "reinstall grub" can mean either reinstalling the package with pacman or reinstalling the core.img (grubx64.efi) to the disk. In this case we mean the latter.


Jin, Jîyan, Azadî

Offline

#11 2023-12-28 20:56:44

shuruper
Member
Registered: 2020-06-21
Posts: 67

Re: [SOLVED] GRUB entry doesn't show up for win11 when dual-booting

Thank you guys for helping out here. It is working as it should be right now.

Offline

Board footer

Powered by FluxBB