Dual Boot

Share

What is Dual Boot?

Dual boot refers to the practice of installing Windows and Linux—two operating systems—on the same computer, instead of uninstalling Windows completely to start using Linux.

Note: "dual" means "two" so technically this could mean installing any two operating systems, such as a Linux and a BSD, or a BSD and Windows, or Windows XP and Windows 11, but generally it just means Windows and Linux. Also, you could have more than 2 operating systems installed, e.g. Windows, Linux Mint, and Ubuntu, but people would still say they are "dual booting" to mean that they have both Windows and some Linux-based operating system installed on their computer.

How to Dual Boot

There are two different ways to dual boot: installing Windows and Linux on the same mass storage media (not recommended) or in separated media (recommended). You could also install one system inside a virtual machine, but while that doesn't count as a "dual boot" even though you would have access to both systems in one computer.

When your computer starts, the program inside the motherboard loads a program it finds in the Master Boot Record (MBR) of the default mass storage media (a hard disk or SSD). This program is very small and its only purpose is to start loading the rest of the operating system.

We say that a media is bootable if it has a MBR. So when you create a bootable USB stick, for example, that means the USB stick has a MBR.

A single media device may be split into multiple partitions, and each partition may have its own filesystem (NTFS, FAT, EXT4, BRTFS, etc.). The process to initialize this filesystem is called "formatting." When you buy a new hard disk, you would have to format it which means creating a NTFS partition to house the Windows' files, or an EXT4 partition to house the Linux files.

First Method: One Disk, Two OS's

The first way to dual boot would be to use one media, e.g. one SSD, and create 2 partitions in it, one for Windows, and one for Linux.

Most issues people have with dual-booting stem from using this method.

Creating 2 partitions can be difficult if you already had created a partition for Windows that occupied the whole disk. In that case, you would need to change the partition size to make space for Linux, and that sounds a bit risky.

For example, if you're using 300 GB of a 500 GB SDD, and you want to split it so it's 250/250, that means there won't be enough space in the Windows partition to house all its 300 GB of data. What will happen then? Will the program that repartitions the disk issue a warning?

Partitions have to be contiguous, but the data inside a partition can be spread around. This is called fragmentation. If you have a bit of data at the end of the partition, and you resize it, will the program that repartitions move that data to within the new boundaries, or is it just going to erase it?

Let's say that you do succeed in partitioning the disk 250/250. You still have one problem: you have two operating systems, but only one MBR. How do you choose which operating system should be loaded, then?

In this case, what happens is that the MBR should point to neither operating system, but to a completely different program whose purpose is only to let you choose which system to boot. This program is often GRUB.

The main reason why doing things this way is a bad idea and causes a lot of people new to Linux a lot of trouble is that Windows doesn't seem to support being loaded by GRUB at all. Windows may overwrite the MBR in an update, for example, or stop being loadable when an update happens. You can end up not being able to load Windows, or not being able to load Linux because GRUB just disappeared.

Second Method: Two Disks, One per OS

The second method is to use different media for different operating systems. In this case you would have one SSD for Windows, and one separate SSD (or even a HDD) for Linux. Because they're installed in separate media, you now have two MBRs so you won't have conflicts between the systems sharing the same disk.

Again, you will need a way to choose which system gets loaded. This method depends on your motherboard.

Before the motherboard loads the MBR, there's a short period of time after you power your computer where you can press a key to bring up the boot menu that lets you choose which media to boot. This key could be one of the F keys, e.g. F11, it could be the Delete key, it depends on the motherboard.

There is also often a different key that shows you a program to configure the motherboard. In this program, you're able to choose, for example, the media boot order. Let's say you want to boot Linux by default instead of Windows, but the motherboard keeps booting Windows by default. That's because the motherboard is configured to give the media where Windows is installed priority over the one where Linux is installed. You should be able to reorder the media so that it checks if the other disk has an MBR first, and if it does, it tries to load that. Then it will boot Linux by default.

This method is safer because it doesn't depend on GRUB. Both systems are perfectly bootable and independent of each other because they're in separate disks. You could just remove one disk from your PC and place it in another PC and it will work without having to do anything.

The drawback is that you have to purchase and install a separate disk. Although this is fairly easy to do with minimal training, opening your tower may void your warranty if you bought a pre-built PC, and in some cases you may need to purchase a new power supply unit to install a new disk, which can complicate things.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *