4

I've had a look at a few other questions here (such as GRUB does not detect Windows), however, many of the options that have been voted up don't work.

Currently my 40_custom file looks like the below (after a few different attempts):

#8AEC5322EC5307B9
menuentry "Windows 10" --class windows --class os {
   insmod ntfs
   search --no-floppy --set=root --fs-uuid 88F44DC9F44DB9E8
   #chainloader +1
   ntldr /bootmgr
}

When using this this I get the error cannot find command ntldr. if i comment out the above and change to chainloader +1 i get the error invalid efi file path.

I suspect the problem is that when I installed Windows 10, it was "kind" enough to use a different storage device to one I installed Windows on for the System Reserved location. I won't lie, I wasn't frilled at it's choice, but nevermind. As a result the boot files are on /dev/sda1 (with the ID 88F44DC9F44DB9E8) and Windows 10 itself is on /dev/sdb1. Ubuntu is installed on a nvme device.

os-prober doesn't detect Windows 10 (yes, both the partitions are mounted in ubuntu when I run it) and update-grub doesn't detect it either.

I can still boot to Windows 10 at least, however, to do it I need to hit Esc in grub and then type exit in the command line. I'll then be greeted with the Windows 10 logo.

Anyone any ideas here? I'm guessing I need to use a command like set root='(hd0,1)', but I'm honestly not sure which values need to go in for the parameters.

PasteBin link for boot-repair logs.

Relevant boot-repair section:

=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to unsign) and reinstall the grub2 of nvme0n1p2 into the MBRs of all disks (except live-disks and removable disks without OS).
Grub-efi would not be selected by default because: no-win-efi
Additional repair would be performed: unhide-bootmenu-10s   fix-windows-boot


=================== Blockers in case of suggested repair
GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.
Alternatively, you can retry after activating the [Separate /boot/efi partition:] option.


=================== Advice in case of suggested repair
EFI detected. You may want to retry after activating the [Separate /boot/efi partition:] option.
Do you want to continue?


=================== Final advice in case of suggested repair
Please do not forget to make your BIOS boot on nvme0n1 (WDS500G2X0C-00L350) disk!


=================== User settings
The settings chosen by the user will not act on the boot.
11
  • Install and run boot-repair: askubuntu.com/questions/1104855/… – WinEunuuchs2Unix Jul 20 '19 at 17:09
  • Will that have an adverse effects on the Ubuntu install? What does the above actually do? – Larnu Jul 20 '19 at 17:12
  • 2
    We want the report, not any fixes. Just post link to the Summary report it gives. Boot-Repair may suggest fixes, but until reviewed do not run any. Almost all fixes are for Ubuntu as most Windows fixes need your Windows repair flash drive. – oldfred Jul 20 '19 at 17:21
  • As @oldfred alludes you can run boot-repair to do a report only with no fixes. Run this option. I'm hoping the report will tell us why Windows 10 is not being added to grub menu. The report will also list the fixes it would perform if the option to fix grub (and other issues) was chosen. – WinEunuuchs2Unix Jul 20 '19 at 17:32
  • Thanks both. @oldfred , you can find the logs on PasteBin – Larnu Jul 20 '19 at 17:37
2

You should convert your Windows disk (sdb) to a GPT format. Here, Windows is using an MBR disk, which as it is, needs to run in Legacy BIOS. Ubuntu is running in your M.2 drive (nvme0n1) in a GPT format in UEFI mode (L.308 suggests this). UEFI is like the modern equivalent of the old BIOS system and has replaced it, but you can still switch to Legacy BIOS, except Windows will not support a computer running in UEFI mode with an MBR disk, which is the case here.

To convert your green SSD drive to GPT format is easy enough in Ubuntu, using Gparted. Except it will wipe everything on that drive so you would need to re-install Windows. You'd lose any data files on that disk too. Alternatively there is some free software, by EaseUs Partition Master which claims it can convert without loss of any files. I haven't used it so I cannot confirm whether it works OK, but it would save a lot of time and trouble if it does.

There's also the issue of your Windows MSR partition residing on sda. Why it's not on your main Windows sdb disk, I don't know, but for the time being I'd leave it where it is, but you will probably need to convert sda also to make everything UEFI compatible across the board. Just make sure you back-up all data files residing on sda/sdb first before converting said disks to GPT.

1
  • 1
    Reinstalling Windows is something i heavily want to avoid. Unfortunately internet speeds are terrible here, so to redown updates would mean i'd lose the best of a day to get things back to where they were. I have, however, managed a "work around". – Larnu Jul 21 '19 at 10:18
1

This is how I "solved" the problem, but from the comments, there does appear to be an underlying issue with the way that Windows decided to install itself (if the fact that it nicely put the boot partition on a different disc wasn't obvious enough).

As i mentioned, in my question when I hit Esc and then typed exit the machine booted to Windows 10. As a result I added to following to the 40_custom file:

menuentry "Exit to Windows 10"{
    exit
}

I then ran update-grub. When I select the option, this then has grub "boot" to Windows.

0

Have you tried to install os-prober?

sudo apt-get install os-prober

reinstall your grub:

grub-mkconfig
grub-install
grub-mkconfig -o /boot/grub/grub.cfg
1
  • From my question "os-prober doesn't detect Windows 10 (yes, both the partitions are mounted in ubuntu when I run it) and update-grub doesn't detect it either." – Larnu Jul 21 '19 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.