0

I installed Ubuntu 18.04 on a separate external drive along with my Windows 10. The Ubuntu installation is successful but I can no longer boot Windows 10, not even from the BIOS using boot override. The files seem to be intact since I can mount the drive and look through the files. It also doesn't show up in the GRUB menu.

I have tried the solutions given by GRUB does not detect Windows but the os-prober doesn't find my Windows installation. lsblk shows the partitions but there is no /boot/efi as shown in the following result.

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0  14,8M  1 loop /snap/gnome-characters/296
loop1    7:1    0   3,7M  1 loop /snap/gnome-system-monitor/100
loop2    7:2    0  65,9M  1 loop /snap/discord/101
loop3    7:3    0  42,8M  1 loop /snap/gtk-common-themes/1313
loop4    7:4    0 181,1M  1 loop /snap/spotify/36
loop5    7:5    0 136,9M  1 loop /snap/code/20
loop6    7:6    0     4M  1 loop /snap/gnome-calculator/406
loop7    7:7    0  1008K  1 loop /snap/gnome-logs/61
loop8    7:8    0 149,9M  1 loop /snap/gnome-3-28-1804/67
loop9    7:9    0  88,5M  1 loop /snap/core/7270
loop10   7:10   0  54,4M  1 loop /snap/core18/1066
sda      8:0    0 931,5G  0 disk 
├─sda1   8:1    0   128M  0 part 
└─sda2   8:2    0 931,4G  0 part 
sdb      8:16   0 232,9G  0 disk 
├─sdb1   8:17   0   450M  0 part 
├─sdb2   8:18   0    99M  0 part 
├─sdb3   8:19   0    16M  0 part 
├─sdb4   8:20   0 231,8G  0 part 
└─sdb5   8:21   0   517M  0 part 
sdc      8:32   0 931,5G  0 disk 
└─sdc1   8:33   0 931,5G  0 part /

Why am I unable to boot my Windows 10?

EDIT: As suggested by Paul Benson here are the outputs for grep -i -A10 windows /boot/grub/grub.cfg:

$ grep -i -A10 windows /boot/grub/grub.cfg
menuentry "Windows 10" {
   set root='{hd0,1}'
   chainloader + 1
}

### 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

And sudo fdisk -l|grep -A4 /dev/sd:

Partition 1 does not start on physical sector boundary.
Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
--
/dev/sda1      34     262177     262144   128M Microsoft reserved
/dev/sda2  264192 1953523711 1953259520 931,4G Microsoft basic data



Disk /dev/sdb: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
--
/dev/sdb1       2048    923647    921600   450M Windows recovery environment
/dev/sdb2     923648   1126399    202752    99M EFI System
/dev/sdb3    1126400   1159167     32768    16M Microsoft reserved
/dev/sdb4    1159168 487335654 486176487 231,8G Microsoft basic data
/dev/sdb5  487335936 488394751   1058816   517M Windows recovery environment


Disk /dev/sdc: 931,5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
--
/dev/sdc1  *     2048 1953456127 1953454080 931,5G 83 Linux


Disk /dev/loop8: 149,9 MiB, 157184000 bytes, 307000 sectors
Units: sectors of 1 * 512 = 512 bytes
Eliah Kagan
  • 119,640

1 Answers1

2

A common problem when setting up a dual boot with Windows/Ubuntu for the first time is that you find that you can only boot into one system or the other, in this case Ubuntu. There may be several reasons for this, but the most common one I've seen is where 2 disks are used to install each system respectively, and one disk is formatted to DOS and the other to GPT.

First thing to do if booted in Ubuntu or in Live Ubuntu is inspect your partitions. Run sudo fdisk -l|grep -A4 /dev/sd which will not only show you all the details of what is stored on your partitions but also whether the disk is formatted in GPT or DOS (which is the old MBR format of how disk partitions are arranged).

Here we know the computer is being run in Legacy Bios mode, but for Windows 10 we have disk sdb formatted to GPT. The 2 states are incompatible. W10 installed on a GPT disk must be run in UEFI mode, or the disk will not be recognised. However Ubuntu here set up on disk sdc is a DOS disk format. On it's own, even if run in UEFI BIOS it doesn't cause an issue. But with a dual boot, having one disk in DOS and another in GPT format usually ends up only allowing the user to boot to one system.

The best solution therefore would be to convert the Ubuntu DOS disk to GPT as it's the more modern format that allows more than 4 primary partitions to be made (DOS has a limit of 4). It does mean a re-install of Ubuntu as converting a disk to GPT wipes everything on it. There's no point in changing the Windows disk back to a DOS format and running in Legacy BIOS which is the older system as well as the added complication of re-installing W10 which is more involved and would take a much longer time to achieve.

So to do this have your Live Ubuntu USB drive ready. Go into BIOS and switch it to UEFI if in Legacy BIOS. Then boot into your USB and run Gparted. Choose sdc if that is shown as the disk containing the Ubuntu installation. You are now going to convert sdc to a GPT drive. Click on Device tab->Create Partition Table. Choose GPT. Everything on sdc will now be wiped. Then re-install Ubuntu making 2 primary ext4 partitions on sdc, one for Root, another for Home, and let the installation proceed, and reboot.

Paul Benson
  • 1,041
  • 2
  • 12
  • 21