Complete guide to dual boot your system

Shubhank Saxena
Google Developer Student Clubs TIET
9 min readJun 17, 2019

Why do you even need to dual boot your system? Why can’t we work on Virtual Machines? Why can’t we work with live systems?
Let’s try to dwell in into one of the most difficult stuff for a CS beginner

Why do we even care about the dual boot?

Someone great once said-

Linux is to root, Windows is to boot!

Well, if you are a Mac user, you don’t need to go further ahead. You already are using the best possible operating system(I sound biased, but I am not ashamed, MacOS is too seamless and beautiful !❤)
But if you are just like me, who bought a system with windows as it’s primary operating system, and want to dwell into programming,this article is your go to for the same!

Some of the reasons I feel that a programmer need to work on UNIX based OS:

a. No un-timed reboot: You have pretty control over upgrades. Thus, no fear to lose your valuable work.
b. Building up from source: Unlike in windows, where every application is installed from *.exe file, in UNIX based systems, you need to build the apps from the ground. This teaches you various application architectures and actual working of the application.
c. CLI gives you more power: Trust me, once you start using using cli, it makes you God over all your files and applications. You will be in total control.
d. Lot of tweaks and work around needed to make your stuff work: It’s not easy to work around with lot of stuff in UNIX based system. But hey, that will make you the best programmer around!.
Programming is nothing but figuring out how to make stuff work

Okay, what is dual boot even?

A dual boot system is a computer system in which two operating systems are installed on the same hard drive, allowing either operating system to be loaded and given control. When you turn the computer on, a boot manager program displays a menu, allowing you to choose the operating system you wish to use.

Now that you have a gist of what is dual boot, let’s dwell into some terminologies related to dual boot. Don’t worry, it will all make sense as we will try to fix in all together as a puzzle.

  1. Master Boot Record : The Master Boot Record (MBR) is the information in the first sector of any hard disk or diskette that identifies how and where an operating system is located so that it can be boot(loaded) into the computer’s main storage or random access memory. The Master Boot Record is also sometimes called the “partition sector” or the “master partition table” because it includes a table that locates each partition that the hard disk has been formatted into.
    In addition to this table, the MBR also includes a program that reads the boot sector record of the partition containing the operating system to be booted into RAM. In turn, that record contains a program that loads the rest of the operating system into RAM.
  2. Boot Loader: A boot loader, also called a boot manager, is a small program that places the operating system (OS) of a computer into memory. When a computer is powered-up or restarted, the basic input/output system (BIOS) performs some initial tests, and then transfers control to the master boot record (MBR) where the boot loader resides.

Now that you know these two stuff, let me simplify our end goal-

MBR is like a program, or set of first instructions, which guide the system to load the operating system. Our goal is to replace it with a new set of instructions which will tell the sytem that there are more than one OS present, and thus, giving us the choice to select either. This set of new instructions is known as Boot Loader

Teach me Senpai!

As Linus Torvalds famously said, “Talk is cheap, show me the code”, here we dwell in the process:

  1. Select the OS you want to dual boot with windows:
    There are many Linux distributions available out there. My suggestion for some beginner friendlly distros are-
    a. Ubuntu: https://ubuntu.com/
    b. Fedora: https://getfedora.org/
    c. Linux Mint : https://linuxmint.com/
    d. Elementary OS(my personal favourite): https://elementary.io/
  2. Download a burner application
    Now that you have selected and downloaded the OS disc, it’s time to burn it up on a portable device.For this, you need a burner software. I prefer Etcher for the same.

3. Burn the OS:
What the heck is even burning?

If you simply copy the .iso file to the CD, it will be stored on it but not be of any use for booting from. However, if you burn it, it allows it to be accessed directly from the CD with no copying needed.

Now that you know the differnce, let’s burn the OS. Select the .iso file that you donwloaded, and then select the destination drive.
Note-Selecting the drive will completly format it.

Etcher’s burning interface.

4. Make space for your partition:
In windows, type “partition” in the start bar and select the highlighted option. This will open up the Windows Disk Management System

Select the option highlighted
Windows Disk Management System

Now follow the following steps:
a.Shrink the volume: Select the desired drive and re-shrink it.

You can only shrink a volume if it has enough free space. For example, say you have a 1 TB disk that contains a single volume, but you don’t have anything stored on it yet. You could shrink the volume by up to nearly the full 1 TB.
In the example above, we’re shrinking an empty (no data stored on it) 1 TB volume by about 500 GB. Notice that the window shows the total size of the current volume, and the available space you have for shrinking (which in the case of our empty volume is close the total size).
And now that we’ve shrunk the volume, you can see that the disk contains our shrunken volume on the left and the new unallocated space we freed up on the right.

b. Create a New Volume:
Now that you have created an un-allocated space, let’s try to create a new volume.
Right click on the un-allocated drive

New Drive Wizard
This size will pop out automatically
Assign a drive letter (or accept the default assignation) and then click the “Next” button.
Go ahead and format the disk, pick a file system to use, and assign a volume label. Click “Next” when you’re ready.
And then click the “Finish” button to have Windows get started creating the volume and — if you chose to — formatting it.
When it’s done, you’ll see your new partition listed in the Disk Management tool and you should see it if you pop open File Explorer, as well.

Well done. Majority of the work is done. Now all we need to do is, install the OS. Before that, some tweeks to your system.

5. Tweaking BIOS Menu:
Switch off your system. And then as soon as you turn on you system, open BIOS menu. Here is a list of various manufacturers and their BIOS keys. Go through it and press the applicable key

Now in the Boot Manager(or BIOS menu) go to “Sysyem Configuration” and disable secure boot. After that, save the configuration and exit!

Disable Secure BOOT

Wait! What did you made me do that spooky screen?
Secure boot forces both Windows and Ubuntu to require that all system level drivers are “signed”, proving that they approved as authentic software. The idea is fairly good, and on Windows, Microsoft signs most of the drivers.

However, on Ubuntu, the user may require special drivers for their wireless card, video card, or specialty hardware. These drivers are normally unsigned, as they can come from a number of different sources. If secure boot is enabled, and the drivers are not signed, these drivers will not load. In order for them to load, each driver must be “signed”. This process of signing the drivers is not extremely difficult, but it can be a hassle… especially if you change/update the driver, or change/update the kernel software that is a part of Ubuntu. Each change will require that you resign the driver.

So, imagine this… your system is running fine… you have secure boot enabled… your drivers are all properly signed… and you use Ubuntu’s Software Updater and it installs a new kernel… or you install a new driver… and you reboot the system only to find that your wireless card may no longer work, your video card doesn’t display properly, or your specialty hardware no longer works. Now you must recompile and resign all of the modules again. Not fun.

6. Going on the with the OS
Finally, now we can install our desired second operating sysytem.

a. Insert the flashed pen-drive and switch on the pc.
b. Press the boot menu(refer from the above link) and select the pendrive.

Select your listed Pendrive

c. Select the installation option and proceed with these screens

Click on Install Ubuntu(or any other OS in your case)
Select Something Else

Select the windows partition that we made and press the — to delete the partition.

Press the — to delete the partition.

Once you have some free space on your hard drive, its time to install Ubuntu on it. Now, there are several ways to do it. But I prefer to to have a Root, a Swap and a Home.

Create a root partition first. Choose the free space available and click on +.

Choose the free space available and click on +.

Here, choose the size of root directory, choose ext4file system, and mount point as / (i.e. root):

Next step is to create swap partition. It is advised by many that Swap should be double of your system’s RAM size(8 Gb is more than enough though). You can choose the swap size accordingly.

Keep it 8 GB. That would be more than enough!

Wait! Why the Swap?

Your system uses Random Access Memory (aka RAM) when it runs an application. When there are only a few applications running your system manages with the available RAM.

But if there are too many applications running or if the applications need a lot of RAM, then your system gets into trouble. If an application needs more memory but entire RAM is already in use, the application will crash.

Swap acts as a breather to your system when the RAM is exhausted. What happens here is that when the RAM is exhausted, your Linux system uses part of the hard disk memory and allocates it to the running application.

The next step is to create Home. Try to allocate the maximum size to Home because this is where you’ll be downloading and keeping the files.

This is where all of your personal files would be kept!

Once you have created Root, Swap and Home partitions, click on Install Now button.

This is how your final screen should look like!

6.Follow the trivial instructions

If you successfully created the partitions as mentioned above, you have almost won the battle. Rest is just some trivial steps to follow. You will be taken through a number of screens to select options like keyboard layout, login credentials etc. You don’t have to be a genius to figure out what to do here afterwards.

Voila! You have dual booted your PC!!

This is how your pc should look like on next boot:

Select the desired OS in which you want to Boot!

I hope this article helped you in dual booting the system. Feel free to drop your suggestions in the comments! Thanks for the read!

--

--