Installing Linux side by side with another version of Linux
In some environments, you may be required to adapt to different Linux distributions. Instead of gutting your current Linux distribution, you can install another distribution without losing your current Linux distribution.
Let's use our existing Ubuntu system and install CentOS 7 alongside to demonstrate how we would dual boot:
First, we set our system to boot from the CentOS 7 ISO image:
From here, we select the first option and press Enter. This will launch the setup for CentOS 7:
We then choose our language and select Continue.
On the INSTALLATION SUMMARY page, the key important sections are SOFTWARE SELECTION and SYSTEM:
By default, CentOS 7 will do a Minimal Install. We want to do a full installation so select SOFTWARE SELECTION:
From the preceding screenshot, by default, the Minimal Install is selected. I've selected GNOME Desktop under Base Environment, and I've chosen the checked add-ons. Once I have finished making my selections, I will click Done.
You can choose to add some or all the add-ons for a particular base environment.
The next section of importance, particularly in a dual boot environment, is under the SYSTEM section: INSTALLATION DESTINATION.
Here is where we are going to partition the hard disk:
By default, the system will choose to partition the hard disk automatically. If we leave this option and allow the system to create the partitioning for us, then the system is going to create partitions based on the recommended size for each partition that it creates. For the purpose of this demo, we will select I will configure partitioning. This will illustrate the various steps involved in creating partitions within the CentOS 7 environment. Next, we will select Done. This will bring up the following partitioning screen:
From the preceding screenshot, we can see that the CentOS 7 installation has detected the Ubuntu installation.
For this CentOS 7 installation, we mount /boot to the /boot mount point for CentOS 7.
Be careful when removing partitions as this can have some adverse effects on the operational status of your system. In other words, you may accidentally remove some critical configuration files that were stored on a partition, or, even worse, your system may be unable to boot.
Next, we create the / partition for CentOS 7:
Then we create the /home partition:
Finally, we create our swap space, using up the remaining free space:
Once we're finished, we then select Done:
Now, we must confirm our changes by selecting Accept Changes:
When we select Begin Installation, the actual installation will begin. We will have to create a user account:
Then we need to see a root password:
We should set a difficult password that no one can guess:
Now, we are going to allow the CentOS 7 to perform the installation—give it some time. Finally, we are prompted to reboot, so we will select Reboot.
Finally, we are then greeted with our dual boot menu, displaying both CentOS 7 and Ubuntu, as shown in the following screenshot:
As you can see, we now have the options to choose which Linux distribution to load.