The multitude of different Linux distributions available is simultaneously the operating system’s greatest strength and its greatest weakness. It is a strength because it offers users choice, diversity and freedom. It is a weakness as there is no standard distribution, which means that the same software needs to be compiled and packaged multiple times, once for each of the major distributions. Plus it leads to fragmentation which is probably the main reason Linux has not dominated on the desktop.
If you are a keen Linux user, you may find yourself wanting to install multiple Linux distributions on your PC and boot into which ever distro meets your current needs. If you can’t decide between one flavor or another, just install both and do a dual boot.
It is quite easy to install Linux in a dual-boot configuration. The key to a successful dual-boot system is to get the partitioning right. All hard disks can be divided up into multiple slices known as partitions. A partition can be used for an OS, like Linux and Windows, or it can be used for data.
Many PCs have just one hard drive that holds just a single partition, drive C: in Windows-speak or “/dev/sda1″ in Linux’s nomenclature. To install multiple operating systems in a dual-boot configuration, the hard disk needs to have multiple partitions. For a Linux distro like Ubuntu, the practical minimum number of partitions is 2. One for the OS and one for swap. For distributions like Fedora it can be more complex.
Fortunately, partitioning a hard drive is part of the Linux installation process and the installer makes the job quite easy. Here is an example of how to install both Ubuntu and Fedora on a single hard drive PC. This process will delete everything on the PC, so proceed with caution.
The first step is to install Ubuntu. Theoretically it doesn’t matter which Linux distribution is installed first, but experience has taught me that things just go easier if Fedora is the last OS installed. Boot your PC from the Ubuntu installation media and follow the installer steps until you get to the hard disk partitioning.
Select the “Something else” option so you can create a custom partition table. Click “New Partition Table…” to remove all current partitions. Read the warning message, and if you are sure you don’t have any valuable data on the hard disk, then click “Continue”.
Highlight the “free space” in the partition list and click “+” to add a new partition. Set the size (probably around half the size of the disk), select “Primary” as the partition type and set the mount point to “/” (meaning root). Then click “OK”.
Repeat the process to create some swap space. The size only needs to be a few gigabytes (even less if you have a small hard drive), and the partition type can be set to “Logical”. Select “swap area” from the “Use as:” drop down list.
You will now have a hard disk that is partitioned something like this:
It is important that there is sufficient free space left to hold the Fedora installation. Click on “Install Now” and follow the rest of the installation steps. Once the installation has finished, you can reboot into Ubuntu and check that the installation is working as expected.
To install Fedora, boot from the installation media and proceed through the installation until you get to the “INSTALLATION SUMMARY”. The “INSTALLATION DESTINATION” will likely be marked for automatic partitioning. Click on the “INSTALLATION DESTINATION” and choose the “I want to review/modify my disk partitions before continuing” option.
On the “MANUAL PARTITIONING” page, use the “Click here to create them automatically” link to get the installer to add the necessary partitions. Your disk should now look something like this:
The Fedora installation has three partitions: One for “/boot”, one for “/” (root), and the swap space. The other Linux installation section shows the two partitions that were created above. Click “Done”, accept the changes and wait for the “INSTALLATION SUMMARY” to process the changes. Click on “Begin Installation” and follow the rest of the installation steps.
Once Fedora is installed, reboot the PC and you will find a boot menu:
Select which OS you want to boot using the arrow keys and ENTER. Fedora will boot by default after a short timeout.
If you have any questions about dual-booting two Linux installations please feel free to ask questions in the comments below, and we will see if we can help.