Windows-Ubuntu Dual-Boot

Ismet Handžić
5 min readJan 18, 2023

--

Dual-booting is a popular method for running multiple operating systems on a single computer. It allows users to switch between Windows and Ubuntu Linux, depending on their needs.

Image design by Author

In this article, I will guide you through the process of setting up a Ubuntu dual-boot configuration on your Windows computer. This will include creating a bootable USB drive, partitioning your hard drive, and installing Ubuntu.

By the end of this article, you will have a fully functional dual-boot system, giving you the flexibility to switch between Windows and Ubuntu at will. This can be great for getting familiar with and making the switch to Linux.

These instructions can be used for Windows 10/11 and with Ubuntu 18.04 and above. However, this very same step process can be applied to other Linux distros such as Elementary OS or Pop_OS.

It is best to follow these instructions on a separate device such as a different computer, tablet, or a mobile device

Create Ubuntu Boot USB Drive

  1. Download and install Belana Etcher
    https://www.balena.io/etcher/
  2. Download the Ubuntu Linux ISO image
    https://ubuntu.com/download/desktop
  3. Insert a USB drive that is at least 8 GB in size. Note that this USB drive will be erased.
  4. Open Belana Etcher
  5. Select the inserted USB drive you inserted and also the Ubuntu Linux ISO image you just downloaded
  6. Flash the USB drive

Shrink the Windows Partition

Here you must decide on how much space to allocate to Ubuntu from your physical hard drive. Note that you should leave plenty of room for your windows partition as well.

  1. Make sure to back up anything irreplaceable
  2. Press the windows key and type “optimize drives” and press enter
    — Analyze and optimize the “C:” drive
  3. Press the windows key and type “disk management” and press enter
    — Most likely, the “C:” drive will be the largest, and will be the drive you will be shrinking to fit Ubuntu
  4. Right click on the “C:” drive and select “Shrink Volume …
  5. Set and note how much to shrink the volume
    — Enter the amount of space to shrink in MB: <MB TO SHRINK DRIVE>
    You can use a calculator to shrink the right amount you want
    — Make sure to leave reasonable space fore both operating systems (At least 60 GB for Ubuntu)
    Do not shrink over over existing data. For example, if you have a 100 GB C: drive partition, and are using 40 GB of it, you do not want to shrink more than 60 GB
  6. Press “Shrink

This will result in a “Unallocated” free space partition ready to be utilized by Ubuntu.

Boot Into Ubuntu Installation

  1. In Windows, stop all open applications and ensure your work is saved
  2. Insert the bootable USB drive into the computer
  3. Get into your computer’s BIOS menu
    — You can simply reboot and press the BIOS key repeatably at system startup. Find and note which keyboard key to press to enter BIOS at startup. Different computers use different keys, so a quick google search will do
    — OR
    you can simply execute the following command in Administrator PowerShell or CMD: Shutdown /r /fw /f /t 0
  4. Once in the computer BIOS, search for the “Boot Order”, “Boot Configuration” menu, or something that sounds like it
  5. Set your boot order to boot from the inserted USB drive. Often times, this is simply moving the USB drive into the first boot order position
  6. Safe and exit BIOS -OR- select boot device

At this point the system will boot from the USB drive and into the Ubuntu installation menu. Within Ubuntu’s installation menu, select “Try or Install Ubuntu”. After this selection, the Ubuntu Install window will appear

Ubuntu Installation Window

This describes the steps during Ubuntu installation

  1. Select Install Ubuntu
  2. Select Keyboard layout
  3. Connect to the internet via WiFi with proper credentials -OR- plug active Ethernet cable into Ethernet port
  4. Select Normal or Minimal installation
    — Normal gives you all the bells and whistles, which is great for beginners
    — Minimal gives you more control of what programs to install
  5. Select Download updates while installing
    — This will take longer, however is recommended
  6. Installation Type
    Something else

Set the Partitioning Table for Ubuntu

This is where things get a little hairy. This probably the most complicated step in this whole thing.

At this point we are in the “Installation Type” section of the Ubuntu installation. Here we will be partitioning the free space (Unallocated) that was previously created within Windows.

  1. Select the “free space” that was shrunk (Unallocated) in the previous section
    — Be careful not to select any other “free space”. The one you want will be relatively large and obviously very close to what you have shrunken.
  2. Add each of the following partitions to the “free space”. For partition table, each row is a partition entry.
    Partition table reference link
    — Right-click on that “free space” and select “Add…”
    — Enter the row information from the partition table
    — Note that here 1 GB = 1000 MB
  3. After you are done adding each partition to the “free space”, double check the added partitions and press “Install Now”
  4. Enter your location time zone
  5. Enter Computer and Login information
    — Note, the computer name is also your hostname so maybe don’t enter something super long or super complicated

At this point Ubuntu is being installed. After installation, the system will reboot into the startup GRUB menu giving you the option to select Ubuntu or Windows.

Post-Install

The following steps are performed within Ubuntu

  1. Install any updates suggested by Software Updater
  2. Open Ubuntu Software, go to Updates, and update all applications
  3. Update apt packages
    — Open a terminal
    sudo apt update && sudo apt upgrade -y
  4. (Optional) Change the boot GRUB menu boot order to default to Windows instead of Ubuntu
    — Open a terminal
    sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    sudo apt install grub-customizer -y
    — In Ubuntu Dekstop click on “Activities” on top left, and search for “grub”, open grub-customizer
    — Among other things, here you can move the GRUB order to start Windows by default

That’s it! Now install stuff, tinker, have fun, and enjoy Linux!

Note on Undoing All This

Undoing all this is far simpler. If in the end you want to remove Ubuntu and regain that used space, simply remove the Ubuntu allocated partition in Windows Disk Manager. Then grow the C: partition over the new “Unallocated” free space.

--

--

Ismet Handžić
Ismet Handžić

Written by Ismet Handžić

I’m currently a DevOps engineer / Python developer at Capital One trying to be as creative as possible.

No responses yet