Tutorial: Installing Linux alongside an existing Windows Installation (Dual Boot)

Background

A friend of mine requests a tutorial of installing Linux alongside an existing Windows installation so here you go. It is not hard but can be tricky at times. No one wants to spend a day troubleshooting the dual boot setup.

The Big Picture

Assume that you have a disk (HDD or SSD, doesn’t matter) 100% allocated to a partition (NTFS or whatever) with Windows installed.

We need to prepare the installation USB drive, shrink the partition, then boot from the USB drive and install your favorite Linux distro, in this case, Linux Mint or Ubuntu.

Preparing the USB

Nothing special. Download your favorite distro’s iso file, and create a bootable USB with it. In Windows, either Rufus or UNetbooin will work just fine. In Linux Mint, I can simply right click on an iso and choose “Make a bootable USB stick”. In other Linux distros, you may use dd or UNetbootin.

Shrinking partition

Problem of shrinking in Windows

This may be trickier than expected. My common sense tells me to shrink it in Windows to make sure it doesn’t corrupt the Windows partition, but this is actually a bad idea.

As mentioned here:

Do not use Windows’ Disk Management tool to create new partitions for Linux!!!!!

This program has the unfortunate tendency to turn partitions into “dynamic disks” (aka Logical Disk Manager, or LDM, volumes) with little or no warning given to the user. The trouble is that LDM is a Microsoft-only technology. Although Linux has some basic LDM support, you can’t modify LDM volumes in Linux, and installing Linux to an LDM volume is difficult or impossible.

I bumped into this problem once. It is extremely hard to convert dynamic disk back to basic and it requires to install some 3rd party Windows disk management software with free trial. It is not only troublesome but also risky.

Therefore, the better idea is to shrink the NTFS partition during Linux installation using GParted or standalone GParted Live on USB.

Shutting down Windows properly

If you simply shutdown the Windows system, you can’t mount and shrink the Windows partition in GParted. This is because Windows (since Windows 8) uses hybrid shutdown / fast startup by default.

To perform a full shutdown, start cmd, type in shutdown /s /t 0 and hit enter. After the full shutdown, you may proceed to booting from the USB.

If you want to mount the NTFS partition in Linux later, you may want to disable fast startup completely.

Installing Linux

Boot from the USB.

With Ubuntu / Linux Mint, the system installation should be easy with the GUI. Just make sure you don’t use the default option to wipe the disk.

If there is such an option, installing the 3rd party drivers and codecs is a good choice as it will save you the time of pulling your hair out when things don’t work.

Misc. problems

Wrong system time after dual boot

System time in either of the systems may be wrong after dual boot. The solution is here. It can be fixed from either side.

Tags// , ,