Dual boot Windows Ubuntu separate drives

Want to use Linux but can’t fully abandon the Windows ship? Here’s how to dual boot on Ubuntu Linux and Windows 10 in your modern machine with two disk drives (C:\ and D:\).

Before you go ahead and tinker with your devices, it is always a good idea to create recovery drives and backups. Here are some of the things that you should consider before doing the next steps.

  • Windows 10 recovery drive
    This will be very helpful if something if at some point you cannot boot to Windows. Here’s a guide from Windows.
  • Full data backup
    Your important files should be copied to a different storage (external drives or thumb drives or cloud) to avoid data loss if something goes wrong.
  • Full disk image
    You can also opt to create a full disk image to help you go back to the same state before you decided to tinker with your device. Macrium is the recommended software over the internet. It’s free but I never used it so use it with caution.

If you have successfully considered and made your backups, we can now proceed with preparing our machines for the dual boot. We’ll have to change some settings in BIOS and in Windows Advanced Power Options.

You can access the BIOS by pressing a key combination during bootup repeatedly. Mine is “F2” but the hotkey depends on the manufacturer of your PC.

  • Disable Secure boot
  • Disable Intel Rapid Start (if available)
  • Disable Fast boot

Windows Fast boot (Fast Startup) is different from the BIOS Fast boot option. This too should be disabled to avoid problems during bootup. You can access this option in Advanced Power Options in Windows 8/10. Here’s a guide on how to disable it.

If so happens you cannot see the Fast Startup option and wanted to make sure that it is off, you can disable the hibernate file via Command Prompt. This will subsequently disable Fast Startup as it uses the same hibernate file for its operations. To do this,

Click start > Type CMD > right-click on Command Prompt > Run as Administrator

Then type the following:

powercfg -h off

These are all the platform preparation pre-requisites that you need if you are to use the entire second hard disk (D:\) for Ubuntu. However, if you are planning to put it in a partition on the second driver (D:\), you need to perform additional steps below.

Dual boot Windows Ubuntu separate drives
powercfg -h -off

We need to prepare the partition first before running the installation. We must shrink and create an unallocated space on the second drive for our partition. To do this,

Open Disk Management > Right click the second disk drive > Shrink

You can put your desired “Shrink space” in the next window that will appear.

Dual boot Windows Ubuntu separate drives
Unallocated space in Disk 1 (second disk drive) to be used for Ubuntu installation
Dual boot Windows Ubuntu separate drives
Cannot shrink free space due to fragmentation issues

If for some reason you cannot shrink the disk space further, you need to do a disk defragmentation first before doing the shrinking. I highly recommend to use either Defraggler or PerfectDisk for this task instead of the default built in Windows defragmenter.

Dual boot Windows Ubuntu separate drives
PerfectDisk

After defragmenting the system files found in the second disk drive (boot-up defrag) together with defraging non-system files, you can now proceed to shrink the free space in the second disk drive.

Now its time to prepare the installation media that we are going to use to install Ubuntu. To do this you need the following:

  • Minimum 8GB thumb drive with 8GB unused space or more
  • Ubuntu ISO
  • Rufus or any other bootable media creator

We’ll be using Rufus to create the bootable media. To do this,

Open Rufus > Select Device / Drive > Select ISO > Set Partition scheme to MBR and Target system to BIOS or UEFI > Start

This will create the bootable media in your thumb drive using the ISO provided. For reference here is what I used in my thumb drive.

Dual boot Windows Ubuntu separate drives
Rufus settings

This can be achieved by changing the boot order in your machine’s BIOS. This differs per manufacturer to its best consult your product manual on how to do this.

Follow on screen instructions to install Ubuntu. If you want to put Ubuntu in a partition on the second disk drive, best create your own partitions just like below.

Otherwise, you can use the whole second disk drive for Ubuntu installation.

In my case, I partitioned the second disk drive to two since I plan to put Ubuntu on and it functions as my data repository. Using the Ubuntu setup partition tool, I divided my second hard disk as follows:

NVME (main disk drive - SSD) <- Windows OS SDA (second disk drive) /sda1/ <- This is where my data are located. This is in NTFS /sda2/ <- this is where Ubuntu will reside - Formatted this in ext4 and mount as "/"

Install the Grub bootloaded to /sda/ (not /sda1/ or /sda2/). Installing in /sda/ will avoid overwriting the default Windows bootloader located in the first disk drive.

Don’t worry about putting the bootloader in the second hard disk. Grub bootloader is intelligent enough to pick up other resident OS so you won’t have any problems booting to Windows afterwards

And last but not the least, finish installing Ubuntu. Afterwards you can reboot and you will be greeted by Grub bootloader with entries automatically populated to include your Windows 10 installation.

Cheers!

I have a UEFI-based system. I want to have a Windows–Fedora dual-boot configuration such that both systems are isolated from each other. Here is what I mean by the term isolation:

  • Both systems should be independent of each other. If I remove the Windows drive, my Fedora system should work fine and vice-versa.
  • GRUB on my Fedora drive should not interfere with my Windows drive. I prefer not to have the GRUB menu ask me which OS I want to boot. I want to handle this thing in my UEFI boot menu. My Windows drive will be the default, and I can boot my Linux drive whenever I want using the UEFI boot order menu (F12). This behaviour should not change even after kernel upgrades (as they may trigger the update-grub command, thus causing GRUB to become aware of my Windows installation).

For this, I have thought of a solution after following this guide:

  • Install Windows 10 on my primary SSD (without connecting any other drive)
  • Install Linux on my secondary SSD after disconnecting my Windows 10 drive.
  • Plug in both drives.
  • Set Windows drive as the default boot option from the UEFI setup.
  • Will this solution work in the long run? In other words, will the systems remain isolated?
  • Should I make any changes to my approach?

This should work for most systems that use UEFI and which have two HDD.
Update: Be careful with newer Windows systems like Windows 10/11 which may depend on a single UEFI bootloader partition to work properly, see 1 and 2

Specification used for the tutorial below:

Dell Inspiron E5440:

  • Main HDD - 256GB Samsung SSD (Windows 10 installed)

  • Secondary HDD - 64GB Transcend mSATA SSD (Mint 18 was installed to this drive)

A) UEFI/BIOS

  1. Set to "UEFI mode only" (no legacy/CSM).

  2. Disable "secure boot"

  3. Disable "Intel Rapid Start" (if equipped)

  4. Disable "fast boot" in UEFI (note this is different than the "fastboot" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Advanced Power Options (Fastboot)

Disable fastboot in Windows 8/10 under "advanced power options". Restart computer to ensure that this subsequent boot and the next reboot/shutdown will be in "normal" mode.

Optional:

Install Macrium Reflect (free) and create a backup image and reinstallation media should something go wrong with Windows 10.

C) Rufus / Bootable USB stick

Use Rufus to create a bootable USB stick with your choice of Ubuntu based distro. Make sure in Rufus that you CHOOSE the option UEFI/GPT only. This ensures the Linux environment boots only into UEFI mode during your install.

D) Boot Menu

Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

Note:

Make sure it says UEFI in front of the USB stick in the boot menu.

If not, return to Windows and recreate your USB stick with Rufus ensuring you choose the UEFI/GPT (only) option.

E) Boot into USB Stick

Boot into Linux live environment and begin install.

F) Installation type

When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.

G) Create partitions

Find your secondary HDD that you will be installing Linux to.

In my case it was listed as /dev/sdc (with /dev/sda being the windows drive and /dev/sdb the USB drive [which was invisible in the installer]).

So basically:

+--------------+--------+---------------------------+--------------------------------+ | Device path | Device | Operating System (OS) | Visible in Ubiquity installer? | +--------------+--------+---------------------------+--------------------------------+ | /dev/sda | HDD | Windows 10 | yes | | /dev/sdb | USB | Ubuntu 16.04 (Live Stick) | no | | /dev/sdc | HDD | None | yes | +--------------+--------+---------------------------+--------------------------------+
  1. Select your target drive (in my case /dev/sdc)

  2. Select "Make New Partition Table"

  3. Partition the target drive as follows:

  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Use as: EFI (this will be listed as /dev/sdc1 efi in the partitioning tool once you create it)
  1. Select "free space" under your target drive (in my case /dev/sdc)

  2. Select "+"

  3. Partition the target drive as follows:

  • Size: min. 10 GB (20+GB better)
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  1. Select "free space" under your target drive (in my case /dev/sdc)

  2. Select "+"

  3. Partition the target drive as follows:

  • Size: min. 2 GB (20+GB better)
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Use as: swap (if you wish to use hibernation, the swap needs to be just slightly larger than your total amount of RAM - example I have 8 GB so the size of this parition was set at 9000 MB)
  1. Select "free space" under your target drive (in my case /dev/sdc)

  2. Select "+"

  3. Partition the target drive as follows:

  • Size: remainder of space on drive
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Mount point: Choose "/home"

H) Boot loader Device

  • BEFORE clicking "Install Now", from the "device for boot loader installation" option button, select the 650MB EFI partition you just created as the target for the bootloader. (example /dev/sdc1 in my case).
  • Click "Install Now".

I) Installation & Reboot

  • Finish installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

J) Upon reboot

After UEFI/BIOS reads the new bootloader entry that Linux has added to it, you will be presented with the grub menu with a listing of your Linux distro as well as a listing to boot Windows 10.

  1. Boot into Linux

  2. Install any updates and then reboot and attempt to enter Windows 10 from the grub menu to make sure that grub correctly handles the hand-off to the Windows 10 bootloader.

What you have done:

You have installed the Linux EFI bootloader to the newly created EFI partition. In the process of this, Linux has added an entry to your UEFI listings in your systems UEFI/BIOS. Linux has also automatically detected your Windows 10 install and added a grub menu item to boot it. Your computer at this point will now automatically boot to Linux unless you choose to boot to Windows (from the Grub menu).

What you have not done:

You have not in any way altered your Windows 10 install or its bootloader or even so much as touched the Windows 10 EFI partition. Everything is reversible simply by removing the Linux UEFI listing from your UEFI/BIOS settings. How to do so varies from each vendor.