Installing Ubuntu Linux after windows

Sarath Pillai's picture
installing ubuntu after windows

This post is dedicated to one of our friend "Kingsley Andrew Uzoma". Installing Ubuntu or any other Linux distribution after you already have the windows operating system installed on your machine can be quite tricky at times.

The main problem people face in doing this are as follows.

  1. They only have 1 single partition on their hard disk. And windows is installed on it. So where to install
  2. How to make a new partition out of that single partition for installing a Linux distribution.
  3. Will my windows operating system be safe after the linux is installed?
  4. Will i be able to easily switch between operating systems?

 

So lets begin by assuming that we have only one single partition on the windows 7 machine and we will be installing windows 7 on top of it.

The first thing that we need to make clear is that if we are going ahead with Ubuntu Linux as the second operating system then you don't need any tool to resize the windows partition for installing Ubuntu. Hats off to Ubuntu for including the partition resize tool in their installer.

Installing Ubuntu by resizing a partition through Ubuntu Installer.

 

Step 1:   the first step is to shutdown the machine, and insert ubuntu installer dvd/cd which you can download from here

 

Step 2:   After  beginning with the "Language selection Welcome screen" and "preparing to install" you will get a screen like the one shown below.

in the above selection screen click on "something else" as shown above and press "continue".

Step 4:  Now select the partition from the next windows which you want to resize (shrink). This can be done as shown below.

as shown in the above figure we are going to change that 140 gb ntfs partition and in the window that opens we need to enter the new partition size.

So inshort the original 140 gb ntfs partition will now become the an ntfs partition of whatever size you mention, and the remaining space will become "free space".

Click on "free space" and add a "swap partition" by selecting "add" option from below.Swap space by convention is double the size of your RAM

Now if after resizing, if you have sufficient space in "free space", click on the "free space" and press "install now"

After installing Ubuntu, Ubuntu will automatically detect windows 7 which was already present, and you will get an option to boot to ubuntu and windows 7 in the initial grub boot screen.

If you have already created or shrinked your windows 7 partition before, then just insert the ubuntu cd/dvd and select "something else" and click on your newly created partition by shrinking and click on "install now"(you can recognize your created partition by its size.)

Shrinking a partition through windows device management.

If you want to shrink your partition and create a new one from windows itself for installing any linux distribution then you can follow the below steps.

Step 1: right click on "my computer" and select "manage" as shown below.

Step 2: Now select "disk management" from left side window as shown below.

Step 3:Now select the partition you want to shrink and right click on that, and select "shrink volume" as shown below.

Step 4: resize by enterning the required size.

After resizing the "unallocated" size should increase by the amount you resized. And you can install ubuntu by selecting this "free space" from the ubuntu installation screen as mentioned previously.Reboot the machine once done and confirm if its working as required.

Shrinking partition using windows command line

the above mentioned method os shrinking a partition to create unallocated space for another partition can be even done through command line in windows.

go to windows CMD(open windows command prompt by right clicking and selecting "Run as Administrator")

Now type Diskpart in the cmd and follow the below mentioned steps.

Step 1: get inside the Diskpart CMD by typing the command "diskpart"

Step 2: run the command "list volume" which will give you an output something like the below.

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     E                       DVD-ROM         0 B  No Media
  Volume 1         System Rese  NTFS   Partition    100 MB  Healthy    System
  Volume 2     C                NTFS   Partition     97 GB  Healthy    Boot
  Volume 3     F                NTFS   Partition     70 GB  Healthy
  Volume 4     D                NTFS   Partition     99 GB  Healthy

 

Step 3: now run the command "select volume 3" this will select my F drive as it is assigned volume 3, so select your respective partition which you want to resize.

Step 4: Now run the command "shrink desired=<desired size> minimum=<minimum size if desired is not possible>"

Select the desired volume number as mentioned in the above example and give the desired size and minimum size. If the desired size is not possible then windows will resize it to minimum size and the freed space will be added to "unallocated"

Note: rebooting and confirming if windows is working normal is very much necessary before going ahead with installation of ubuntu, if you are resizing from windows or with some other tools.

There are other softwares available to resize the partition if its not working as desired from windows. Some of the tools are as below.

  1. Gparted
  2. Partition Wizard

And don't worry about your windows machine which is already installed becoz the boot loader of Ubuntu automatically recognizes the windows installation. Basically Ubuntu or any Linux distribution boots windows by chain loading, which means while selecting windows from Ubuntu grub, grub hands over the complete booting process of windows to windows boot loader whose location is known by grub.

So after you have enough free space, you can install any linux distribution without worrying about windows. It will be kept intact.

Let me know if you face any issues. Hope this post was helpful to Kingsley Andrew, and others.

Rate this article: 
No votes yet

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.