How to Dual Boot Windows 10 and Ubuntu 16 off an External Drive
Dual Boot Windows 10 and Ubuntu 16 with Externally Via GRUB2
Part One - Overview
Abstract
This procedure designed to install a dual boot of Windows 10 and Ubuntu 16 with the addition of live ISOs to an external hard drive with Grub2 as the bootloader. This process includes installing windows 10 externally, changing the partition table to install Grub2, install Ubuntu 16, and to configure the bootloader to be able to boot live ISO files. This is my first how-to, so please feel free to edit this to be more beneficial.
Updates
05/07/16: Tutorial Uploaded to AskUbuntu.
09/07/16: Uploaded grub.cfg file.
11/16/16: Now on GitHub.
Materials
Tools Needed:
- External Hard Drive (128GB minimum)
- USB Flash Drive (4GB minimum)
- Grub2's grub.cfg file.
Software Used:
- Windows Media Creation Tool
- GImageX
- YUMI
- GParted
- CloneZilla (Recommend)
ISOs Needed:
- Windows 10
- Ubuntu 16
- Lubuntu 15
- Kali 2016
- Clonezilla 2.4
- DBAN 2.3
- OPRE 1.4
Part Two - Installing Windows 10
Introduction
We will be working in the Windows 10 operating system. This includes downloading the WIM file as well as formatting it to the external hard drive to be able to boot. We conclude with setting up Windows 10 on the external drive.
Steps
- Download the Windows Media Creation Tool with the button "Download tool now".
- Open the downloaded executable file and accept the terms and conditions.
- Select the option "Create installation media for another PC" followed by "Next".
- Uncheck "Use recommend options for this PC" and select what options you need, then select "Next".
- Choose the option "ISO file" and select "Next".
- Make a new folder on your desktop labeled "ISOs" and save the ISO file to the ISO folder on your desktop.
- Wait until the ISO file has successfully been created and close the program.
- Go to the ISOs folder on the desktop and mount the ISO by double clicking the file.
- Run Administrator Command Prompt.
- Navigate to the WIM file location by changing to volume and using the "cd" command.
D:
Note: Make sure you use the drive letter of your mounted iso.cd /sources
- Now we need to get information about the ESD file to convert it to a WIM file.
dism /Get-WimInfo /WimFile:install.esd
- Convert the ESD file to a WIM file using DISM and save it to the ISO folder.
C:\Users\youkergav\Desktop\ISOs
Note: Change "youkergav" to your username so the path is correctly specified. - Once the image export is successful, close command prompt.
- Plug in you external hard drive and launch "Disk Management"
- Locate the external hard drive and format the drive to NTFS with the label as "Portable Windows" Note: Be aware this will delete all the contents of the drive.
- Download and install GImageX.
- Open GImageX and go to the "Apply" tab.
- Browse for the source. This is the WIM file that is located on the desktop folder "ISOs".
- Browse for the destination. This will be the "Portable Windows" drive we just formatted.
- Select "Apply" and wait for GImageX to apply the image to the drive.
- Go back to Disk Management and make the partition active.
- Open Administrator Command Prompt and navigate to the external drive's System32.
D:
Note: Make sure the drive letter is the same as your external drive.cd /Windows/System32
- Make the drives boot entries.
bcdboot.exe D:\Windows /s D: /f ALL
Note: Make sure the drive letter is the same as your external drive. - After Command Prompt reads "Boot files successfully created.", boot to the external drive through the BIOS and set up windows just like you would for the first time.
- Once you setup everything set up to your liking, reboot back into the external drive to make sure all the data is clean.
Part Three - Installing Grub2
Introduction
In this part of the procedure, we will install grub2. We will do this by making a live version of Ubuntu and Clonezilla (Clonezilla is optional, but recommended). This objective will be completed by using Windows 10 to create a temporary bootloader for Ubuntu and CloneZilla via YUMI. The rest of this section will be done in Ubuntu 16 Live.
- Download and install YUMI.
- Download ISOs for Ubuntu and CloneZilla to ISOs folder.
- Insert flash drive (not external drive) and open YUMI.
- Select flash drive from dropdown and FAT32 the drive. Note: Formatting drive will erase contents.
- Select Ubuntu from dropdown and locate the Ubuntu ISO.
- Create the image.
- Select "Yes" when adding more ISOs and image the CloneZilla ISO. Note: Do not FAT32 drive.
- Boot to the flash drive from the BIOS.
- From the YUMI bootloader, select "Linux Distributions" and boot Ubuntu.
- Once Ubuntu is booted, open the program "Disks" and insert your external hard drive.
- Under devices, find the device location.
- Open the program "GParted" and select the device location of your external hard drive.
- Right click and select "unmount" on the partition.
- Right click on the partition and select "resize/move".
- Resize the partition to 50 GB (51200 MB).
- Right click on the unallocated space and select "new".
- Make the partition size 25 GB (25600 MB). Format the drive to FAT32 and label the filesystem "Bootloader".
- Click the check mark to apply changes.
- Open terminal and log in as sudo user.
sudo su
- Select the drive using fdisk.
fdisk /dev/sde
NOTE please make sure you use your device path. - Activate the drive on partition 2 and write the changes to the drive.
a
2
w
- Unmount the partition if it is mounted.
umount /dev/sde1
Note: Please use your specified device path. - Format the drive using mkfs.vfat.
mkfs.vfat -F 32 -n MULTIBOOT /dev/sde1
Note: Please use your specified device path. - Make the directory /mnt/USB and mount the device to that path.
mkdir /mnt/USB && mount /dev/sde2 /mnt/USB
- Install grub to the device path.
grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/sde
- Go to the directory grub and make folder for ISOs.
cd /mnt/USB/boot && mkdir images
- Download the grub.cfg file.
- Move the grub.cfg file to
/mnt/USB/boot/grub/
.
Part Four - Install Live ISOs.
Introduction
This part is a quick and easy way to install the live ISOs of CloneZilla, Lubuntu, and DBAN. Simply download the ISOs, rename the files, and place them to the right destination. This is made easy because the set up is already coded in the grub configuration file.
Steps
- Download the ISOs for CloneZilla, Lubuntu, and DBAN.
- Name the CloneZilla ISO "clonezilla.iso". Name the Lubuntu ISO "lubuntu.iso". Name the DBAN ISO "dban.iso"
- Move the ISOs to the folder /mnt/USB/boot/images
Part Five - Installing Ubuntu.
Introduction
This is the final piece to making the bootloader complete. We now have to create the partitions necessary to install Ubuntu. The only difference between this and a normal install is to install Ubuntu without Grub2. We also need to manually install the partitions for Ubuntu.
Steps
- Open Terminal and use the command to install Ubuntu without Grub2.
ubiquity -b
- Select your language and proceed.
- Select the option "Something Else"
- Find your external drive path and click the free space then "+".
- Add a swap partition with 8 GB (8192 MB). Make the partition a primary partiton
- Click on the free space again, followed by clicking "+".
- Add 20 GB (20480 MB) logical partiton, mounted on "/".
- Use the remaining space as portable storage.
- Install the Ubuntu system the the drive to
dev/sdc
. Note: Please use device path. - Use your bootloader.
Part 6 - Backup (Optional)
Background
I will not be going over this in detail. It is recommended that you clone the disk in case you lose it or need to restore it. This can be done in CloneZilla.
Steps
- Boot from flash drive though BIOS.
- Select "System Tools" and boot CloneZilla.
- Configure CloneZilla settings and select "Clone Disks"
- Clone the disk associated with the device path.
Conclusion
Thanks if you followed! :) Appreciate support... took a while to write. Please let me know if any errors or edit it yourself! Let me know if this works for you. This is how I did it for my bootloader.