CompTIA Linux+ Certification Guide
上QQ阅读APP看书,第一时间看更新

Installing a Linux distribution side by side with a Windows OS

In most environments, you may come across a system that has an existing installation of another operating system such as Windows. Ideally, you would not remove the Windows installation completely as you may require some software that runs only on a Windows installation, or maybe it's the company policy to have a Windows installation on the system. In this case, you can install a Linux distribution alongside Windows without wiping the Windows partition. This is made possible because Linux has the ability to recognize a Windows partition type, such as NTFS. Linux would not in any way alter the Windows partition.

Let's boot up an existing Windows system and configure the system to start from a Ubuntu ISO image to see how we implement a dual boot installation:

  1. From here, the Ubuntu installation recognizes the Windows 10 operating system. Here, we will choose the last option, Something else:

  1. Next, we will create the /boot partition:

  1. After this, we will create the / partition:

From the preceding screenshot, we can see that we have just successfully created the / partition. You may have noticed the pattern with which we are creating the partitions. It's always a good idea to separate your system files from the user files.

  1. Next, we will create the /home partition:

  1. Finally, we will create the swap space and use the remaining free space:

  1. The last step is to select Install Now:

From the preceding screenshot, we will have to confirm that we would like to write the changes to the disk. We are going to select Continue.

We can always go back and make changes to the partition table by selecting Go Back.

Now we have to fill in the location settings, similar to doing a fresh installation. I will again choose Guyana.

Next, we have to create a user account as we did before. The necessary Linux files are going to be installed onto our dual boot system.

  1. After that, we will be prompted to reboot the system and will be greeted with our dual boot menu using GRUB2, as shown in the following screenshot:

In some cases, if we have Linux as the first OS and then install Windows, sometimes Windows will remove the Linux boot entry. The best way to remedy this is to run grub-install.