1

Disclaimer: My tech skills are limited. I can follow instructions found online, but I'm not a programmer.

After installing Ubuntu 18.04 LTS on my PC, I can no longer access Windows 10: it does not show up in Grub. The Windows 10 partition is mounted and still accessible via nautilus. Please help.

EDIT 2: Someone asked me to paste a boot info summary from Boot Repair. Here it is. Thanks for replying.

What I've Tried

EDIT: This did not help either, so, following the logic of that post, one of the following must be false:

  1. That Windows is installed and configured to boot via UEFI.
  2. Ubuntu is installed and configured to boot via UEFI.
  3. You're currently seeing the grub menu at boot.

I am currently seeing the grub menu at boot. When I use the above solution, a menu option does appear in grub ('Windows (UEFI)'). Activating that options returns

error: no such device: /EFI/Microsoft/Boot/bootmgfw.efi
error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found.

Press any key to continue...

I've tried sudo os-prober, which returns

/dev/sda5:elementary OS 0.4.1 Loki (0.4.1):elementary:linux

and sudo update-grub, which returns

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-30-generic
Found initrd image: /boot/initrd.img-4.15.0-30-generic
Found linux image: /boot/vmlinuz-4.15.0-29-generic
Found initrd image: /boot/initrd.img-4.15.0-29-generic
Found elementary OS 0.4.1 Loki (0.4.1) on /dev/sda5
Adding boot menu entry for EFI firmware configuration
done

I've tried running Boot Repair's "Recommended repair" option, following the instructions and pasting things into the terminal. That didn't help.

I tried following the steps in the answer to this similar question, which had me fiddling with the 40_custom file under /etc/grub.d/, trying to paste certain values that I got from running sudo blkid, which returns

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: LABEL="System Reserved" UUID="98DC74BDDC74976A" TYPE="ntfs" PARTUUID="cf469219-01"
/dev/sda2: UUID="62FA7667FA76377F" TYPE="ntfs" PARTUUID="cf469219-02"
/dev/sda3: UUID="5852645F526443BA" TYPE="ntfs" PARTUUID="cf469219-03"
/dev/sda5: UUID="613bbe7f-5979-483b-a9f5-8f9451c17cb0" TYPE="ext4" PARTUUID="cf469219-05"
/dev/sda6: UUID="f1088132-e83e-41bb-8e66-451243ec4fbc" TYPE="swap" PARTUUID="cf469219-06"
/dev/sda7: UUID="b8906912-62d7-465c-b672-77a38295c35e" TYPE="ext4" PARTUUID="cf469219-07"
/dev/sda8: UUID="DF4A-DF38" TYPE="vfat" PARTUUID="cf469219-08"
/dev/sda9: UUID="f8786617-7440-4a64-9699-6d4d3e1ad3a4" TYPE="ext4" PARTUUID="cf469219-09"
/dev/sdb1: LABEL="Ewok1" UUID="96F046F4F046DA5F" TYPE="ntfs" PARTUUID="6b53319e-01"

His steps involved pasting a script into the 40_custom file (this script is reproduced in full below). The instructions were to then "Change UUID (SPX7ZJUBC2EN7FAH) and position ('hd0,msdos1') of Windows", presumably with the values obtained from sudo blkid.

#!/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.

# Windows 10 Pro 64-bit (loader) (on /dev/sda1)
menuentry 'Windows 10 Pro 64-bit (loader) (/dev/sda1)' --class windows --class os 
$menuentry_id_option 'osprober-chain-SPX7ZJUBC2EN7FAH' {
     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  SPX7ZJUBC2EN7FAH
 else
        search --no-floppy --fs-uuid --set=root SPX7ZJUBC2EN7FAH
     fi
     parttool ${root} hidden-
     drivemap -s (hd0) ${root}
     chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
   set timeout=10
fi
# End of Windows 10 Pro 64-bit (loader) (on /dev/sda1)

I pasted the UUID value for my /dev/sda1/ partition, which I found using sudo blkid, but I could not determine what to replace 'hd0,msdos1' with. It did not work in the end: when updating grub, it still did not find Windows. (I also replaced part of the label for the boot entry, since I have Windows Home edition and not Pro, but I can't see why changing the labelling should cause the script to stop working).

What I did when I installed Ubuntu

I already had a Windows 10/elementaryOS dualboot. So the Ubuntu installer only detected elementaryOS to begin with. It asked me if I wanted to install Ubuntu alongside that. I thought, no. So I picked the 'Something else' option, downsized the ElementaryOS partition, and installed Ubuntu on the new partition.

This first attempt failed. I got an error message that, for unrelated reasons, I did not have time to look at closely. It was something like 'Cannot override grub. Installation will cancel', although the message was longer than that. I aborted, confirmed that I still had access to Windows (which I did), and shut down.

The next day, having more time on my hands, I wanted to replicate that error. So I did the same, only this time there was no error message. Ubuntu installed, and when I booted up, I could choose between Ubuntu and elementaryOS.

Jasdk
  • 11

0 Answers0