0

Problem

I have a Windows 10 and Ubuntu 18.04 partition on my SSD. After installing Ubuntu, Grub2 does not provide an option to boot Windows 10.

Description

Output of various commands to help with troubleshooting.

update-grub

The current options shown in Grub2 at boot are these:

$ sudo update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.0.0-31-generic
Found initrd image: /boot/vmlinuz-5.0.0-31-generic
Found linux image: /boot/vmlinuz-5.0.0-23-generic
Found initrd image: /boot/vmlinuz-5.0.0-23-generic

boot-repair

I tried boot-repair, but to no avail.

Boot repair information available at http://paste.ubuntu.com/p/H54nGVBCjd/

os-prober

bash$ sudo os-prober
bash$

Editing Custom Grub Files

Per this question, I edited /etc/grub.d/40_custom to have these settings:

#!/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 10" {
    insmod ntfs
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set C4CEA0B0CEA09C64
    chainloader +1
}

grub-install

As par of troubleshooting, I've run this command:

$ sudo grub-install /dev/sda

Running against /dev/sda2 results in this error:

$ sudo grub-install /dev/sda2
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory. 

Following this post about EFI directories, I ran the following:

$ sudo mount | grep /boot/efi
$ sudo grub-install --efi-directory=/boot/efi
Installing for x86_64-efi platform.
grub-install: warning disk does not exist, so falling back to partition device /dev/sda5.
grub-install: error: disk `hostdisk//dev/sda5' not found.

blkid

Per this question

sudo blkid /dev/sda2
/dev/sda2: UUID="C4CEA0b0CEA09C64" TYPE="ntfs" PARTUUID="08efdbfd-02"

Question

What commands should we add to the custom Grub2 option so that it boots Windows?

0 Answers0