2

I'm facing an issue with Grub not detecting my Windows 10 installation. I have come across a similar question on this forum, but unfortunately, the suggested solutions haven't worked for me.

When I run sudo fdisk -l, the following output is displayed:

/dev/nvme0n1p1           2048    1187839   1185792   579M  7 HPFS/NTFS/exFAT
/dev/nvme0n1p2        1187840  832756596 831568757 396.5G  7 HPFS/NTFS/exFAT
/dev/nvme0n1p3      999071744 1000210431   1138688   556M 27 Hidden NTFS WinRE
/dev/nvme0n1p4      832757758  999071743 166313986  79.3G  5 Extended
/dev/nvme0n1p5 *    832757760  833808383   1050624   513M ef EFI (FAT-12/16/32)
/dev/nvme0n1p6      833810432  999071743 165261312  78.8G 83 Linux

I have already tried the following steps, as recommended in a similar question:

  • Reinstalling os-prober.
  • Updating Grub.
  • Disabling Secure Boot.

However, despite these attempts, Windows 10 is still not showing up in the Grub menu during boot.

I would greatly appreciate any further assistance or alternative solutions to resolve this issue.

5
  • 2
    You mixed up boot modes, Windows is installed inlegacy mode while Linux is installed in EFI mode. If you want Grub to detect Windows, both OS need to be installed in the same boot mode.
    – mook765
    Commented Jun 11, 2023 at 13:54
  • @mook765 So I'll solve it by reinstalling ubuntu in legacy mode, right? Is there a way to keep my current configurations etc when reinstalling? Thank you! Commented Jun 11, 2023 at 14:05
  • That's a possible way, use the something else option in the installer, choose the correct partition to install, do not format partition, installer gives all necessary options. Boot installer in legacy mode to install in legacy mode!!
    – mook765
    Commented Jun 11, 2023 at 14:20
  • @mook765 Can I just uninstall Ubuntu, will it put me back into Windows automatically so I can do it from there? I cant find options for linux to write only BIOS images Commented Jun 11, 2023 at 15:29
  • You don't need to write a BIOS only inamge, the installer provides both boot options, just chose the correct boot option. Or disable UEFI-boot in your firmware settings so you can't go wrong way.
    – mook765
    Commented Jun 11, 2023 at 15:42

1 Answer 1

0

add this menu entry to grub.cfg:

menuentry "Windows Recovery Environment" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  55DD0595418E5BFC
    else
      search --no-floppy --fs-uuid --set=root 55DD0595418E5BFC
    fi
    parttool ${root} hidden-
    drivemap -s (hd0) ${root}
    chainloader +1
}

Replace 55DD0595418E5BFC by your windows partition uuid that can be known from disk utility. save grub.cfg and reboot you will find Windows Recovery Environment menu entry in the boot menu which you can use it to login to windows Recovery Environment. you can add other menu entry to login to windows partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .