A Guide to Dual Booting

A step by step approach to achieve this dreaded task.

Dikshant Brahma
Zairza
10 min readAug 10, 2019

--

Today, dual booting has become a go-to procedure that a lot of developers opt for, be it due to having complete access over the system resources (as compared to a Virtual Machine), compatibility with programs or just the ease of working in your preferred OS. However, if you aren’t so sure if you should go for dual booting, you may click here to know if it’s the thing for you. To a lot of people, it seems like a challenging task to go through the installation procedure. So, I would like to cover most of the basic steps that you might face while dual booting your PC.

We can break the whole guide into the following sections:

  1. Prep work
  2. Disk Management
  3. Installation

Before we start with the steps mentioned above, there are a few prerequisites that you should be aware of. The very first thing is what OS are you currently using and whether is it installed in UEFI (Unified Extensible Firmware Interface) or Legacy ROMs (Popularly referred to as BIOS or Basic Input Output Systems). Legacy and BIOS are terms used interchangeably in this blogpost so both would refer to the same thing. UEFI was introduced by Intel as the replacement for BIOS(also known as legacy ROMs) way back in 2011. However, since the support for Legacy was way better in that time, the transition between the ROMs has been, to be honest slow. But now UEFI is much more preferred to Legacy as it has additional features like secure boot. To know more about the two you may refer to this article.

The key thing we want to know is what type of ROM is our current OS installed in because we would also have to install our second OS in the same type of ROM. This is a necessity to ensure proper functionality of both the OS (As stated in this article. This article is really old and now UEFI has become the default industry standard and support for it has increased tremendously as well).

To check which ROM type your OS is installed in following the steps as follows:

A. Windows Based Systems:

Launch Windows Run (Windows Key+r). Type msinfo32. In the following window that opens, check the label BIOS Mode. If it’s written Legacy, the OS is installed on BIOS and if UEFI, well, it’s installed on UEFI. (Screenshot attached).

System Information Window

B. Linux/Ubuntu based systems:

[ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "Legacy mode"

If “UEFI mode” is given as output, it’s installed in UEFI, otherwise in BIOS mode.
For convenience, we will be referring to the pre-installed OS as the first OS and the OS we are aiming to install as the second OS. Now that we are aware of what type of ROM our OS is installed in, we can continue with the three fundamental steps.

Prep work:

The very first step that we have to take is choosing the Operating System that we wish to install as the second OS. This may differ according to your requirements. As my personal favourite and also a very popular option for developers, I will be choosing the Ubuntu 18.04.02 LTS by Canonical in this tutorial. You may proceed with any other Linux family OS. Since we are installing this OS in a PC, we have to proceed with the Desktop version of the ISO image.

Once your ISO image has finished downloading, the next step will be using a pen drive and making it bootable with the second OS. To do this on Windows, we are going to a really small utility called Rufus. It provides a really simple interface to make the USB bootable with an ISO image of another OS. You can download the utility and follow the instructions. Remember, if you are using a pen drive for this, it has to be sufficiently sized to house the whole ISO image and it will lose all the data stored previously. So be careful. If you have another desktop with the corresponding second OS, you can also run the utility of “Startup Disk Creator” which makes a pen drive bootable with its OS.

Making a Bootable USB using Rufus

I hope by this time your bootable USB is prepped up and ready to use. Let’s begin with the next step i.e. booting with the USB.

Disk Management:

Our motive in this section is to check the existing partitions in Windows and shrinking one volume to get free space for the This section deals with freeing up of space from the windows created a partition for the second OS to be installed in. To do this, open Windows run(Windows key + R) and press the command diskmgmt.msc.

Windows Run

This, in turn, opens the Disk Management Window in Windows. Once the disk management window opens, we get to see a list of the partitions in windows.

Disk Management Window

We have to choose the partition that we plan on shrinking. We also have to take care that there is enough free space on this partition. Shrinking from more than one partition is also possible, however, it is recommended to use a single partition for this process. Here we will be choosing New Volume (D:) for this process.

Selecting the partition for shrinking

Once we press the Shrink Volume… option, we get a prompt box asking us the size of the shrinkage. We will be proceeding here 2,50,000 MB which roughly estimates to 244 GB. This amount of space varies according to the amount of space that will be needed as swap size(2 * Size of RAM), amount of space needed for the new OS (roughly 150–200 GB, subject to usage) and most importantly the amount of free space that is available. We are proceeding with a higher size over here to be on the safer side and because we have a lot of free space available. However, you can be assured that either way, the second OS can run on even as small as 25 GB of hard drive space. If you need serious details on how much space is needed, you may click here to check the exact minimum requirements.

Setting the space needed for the Second OS

Once you click on Shrink, you get a new unallocated partition space that can be utilised now for installing the second OS.

Installation — Booting with the USB:

We will begin this step by switching off the PC and inserting the USB(or restarting the PC with the USB inserted). Now as your computer starts the bootup process, we will press the boot key to select the USB as the booting device. This boot key is different on different manufacturers and is responsible for bringing up the boot menu(I have a Dell laptop so my boot key is F12). Pressing the boot key will provide you with a list of the available bootable devices or possible locations of an OS. As we have already learnt that the OS to be installed has to either be UEFI based or Legacy based(in the introduction), it is crucial to choose the correct option from the boot menu. The options can be different depending on the manufacturers but the basic premise of selection is the same. If the list mentions UEFI with the pen drive’s name, it installs it in UEFI. On the other hand, just the name of the pen drive is gonna open the legacy installation. However, it should be kept in mind that in advanced systems it automatically detects only UEFI installation as the primary type of installation and doesn’t display the legacy mode at all, so don’t panic.

A sample Boot Menu

On choosing any of the particular options, a screen appears and seeing this we can check if we have booted into the correct mode or not.

Types of boot up Screen for corresponding Modes

In case of Legacy, it automatically proceeds to the next screen. In UEFI mode, however, we have to select the Install Ubuntu option. With this, we have booted successfully with the USB drive. We can proceed to the steps of installation now.

Once you have pressed the Install Ubuntu option, the desktop of Ubuntu 18.04 would open up with an installation window. The first few steps will be completed in a jiffy. The first screen that we see asks for your respective keyboard input type and language settings. After which you will be prompted with connecting with WiFi or other networks. Later on, we will be asked about the apps to be installed, which you can either choose to be Normal Installation or Minimal Installation according to your needs. If you are unsure about which one is for you, click here. I would recommend you to Download updates while installing Ubuntu if you have a good network connection as it saves time later, however it might increase the basic installation time. The last option is optional as well.

Updates and other software Window

The most important step of the installation process comes after this when you choose the installation type, now a variety of tutorials would advise you to go with the first option, but we will be going with the last option Something else as it provides very advanced control over the storage management and press Continue.

Installation Type Window

This opens another window that shows the available free space on the computer. This window will also be instrumental in making the new partitions of the Ubuntu OS. To make a new partition the ‘+’ symbol has to be chosen. This will, in turn, open a sub-window where we will be setting the size of every partition and type of partition.

Installation Type Drive Allocation Window

Now we will have to make three major partitions, which are:

  1. Swap area (Use as: swap area): Swap area is a space on a disk that is used when the amount of physical RAM is full. When a Linux system runs out of RAM, inactive pages are moved from the RAM to the swap space. As a convention, we take the swap area to be twice the size of the RAM. For example, if you have 4 GB of RAM in your system, you take 8 GB of RAM as a swap area.
  2. Root Folder ( Mouse Point: /): If you are familiar with the usage of C Drive in the Windows Subsystem, the root folder is on similar terms with it. This partition is the position where the OS will be installed. Although there are no rules about how much space you should allocate for this folder, I generally make this folder have around 60 gigs of storage.
  3. Home area ( Mouse Point: /home): This is the area that stays apart from OS and can be used to store data. In case of any problems, which might lead to reinstallation of the second OS in future, this partition’s content will not be lost. Thus making it a really handy option in case you ever plan to delete your root partition and reinstall it, so that you won’t have to restore from the beginning. The amount of space for this partition depends on the kind of files you want to keep. We have used 120 gigs of storage for this partition.
Create Partition Window for Swap
Create Partition for /home Partition (for root folder the Mount Point has to be set at / only)

Once all these three essential partitions have been created, click continue in the window, which further generates a sub-window that shows the final changes and partitions that you created now. If, everything is done correctly the window will show three partitions and the partition number corresponding to it.

Final Window after Partition Creation

Pressing Continue, we can proceed to the next window. Wow, the majority of the work is already done. Let’s proceed with the last two steps now.

The next step happens to be the window to select your location which you can select either by clicking on your country or selecting a city from your country in the drop-down window.

Location Window

The next window is about your username and password and your computer’s name. the user name and password should be memorable because they have to enter a lot of times when you work in the terminal so choose accordingly.

User Credentials Window

After, you are done press Continue and voila, the installation begins.

Installation Window

Once the installation is complete the computer will start and bootable pen drive can be removed. So there we have it, the PC is successfully dual booted. Hope this helps you out in doing the same.

--

--