I've installed Windows 10 on an external USB 3.0 HDD. Currently, the only way I can boot it is by going into my BIOS boot options and choosing it from the list.
I've installed Ubuntu 16.04 on an internal M.2 SSD, but the Ubuntu installer didn't automatically add an option for GRUB2 to boot the external drive like I expected.
I'm not sure how to add a menu entry which tells grub to boot from the external drive which has Windows 10 installed. I know I can use the search command with the external drive's uuid to set the root variable, but I'm not sure how to use the boot command after that, or which file to edit to add boot options.
UPDATE: I ended up doing something like the accepted answer, but much simpler
menuentry "Windows 10" {
set root=(hd0,msdos1)
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Try simply telling GRUB to attempt to detect other OSs.
Lauch a terminal (CTRL+ALT+T), and run the following command:
If that doesn't work, try booting from a live DVD/USB and running this command from the terminal:
Typically Grub runs
os-prober
on mounted partitions and adds entries automatically.For custom menu entries you can add your own configuration to
/etc/grub.d/40_custom
. I'd recommend this option because relying on os-prober requires that the partition of the other OS is always mounted whenever Grub's configuration is updated, which is the case when update manager installs a new Linux kernel or updates the grub package itself (e.g. security updates).For the next steps I assume your Ubuntu boots with UEFI and Windows 10 does the same, if that's not the case look here or in the MBR section of the the article in the Arch wiki where I borrowed the following code from:
Place this in your 40_custom and replace the
$hints_string
and$fs_uuid
variables with the output from thegrub-probe
commands. To do that you need to mount the EFI system partition (that's what ESP stand for) of the Windows To Go drive. The easiest way is to launchgnome-disks
, select your drive and the partition, then click the play button (‣) and note where it mounted the drive (usually /media/your_username) and replace$esp
with this string (add quotation marks if necessary) in the following commands: