Tutorials/Tips, Ubuntu

How to dual-boot Ubuntu 12.04 and Windows 7

Though you need to create at least three partitions for installing Ubuntu, I will create four just to show how it should be done if you want to have the home directory on a separate partition.

The boot partition is the first partition you want to create. The recommended size for it is 500 MB. That is way too much for the actual disk space that will be used initially, but if you expect to use the system for a long time, spanning several updates, you need the extra space. The mount point should be /boot. And you want to keep the default file system – ext4. This is important because errors have been reported when using ext2 for the boot partition. OK.
Ubuntu 12.04 Create Boot Partition

The second partition will be the root partition. For this tutorial, I assigned 20 GB to it. Anything that is at least more than 75% above the recommended minimum of 4.4 GB should be good. The mount point should be /. Keep the default file system. OK.
Ubuntu 12.04 Create Root Partition

The third partition is for the home partition. Since this where any file you download or generate is stored, it should be assigned the bulk of the available disk space. Use /home as the mount point, and keep the default file system. OK.
Ubuntu 12.04 Create Home Partition

The fourth and last partition will be for Swap. This is disk space made available for the system to use as virtual memory whenever the need arises. Give it an appropriate size (4 GB or 4000 MB should be more than enough on any system). Select swap area from the Use as dropdown menu. OK.
Ubuntu 12.04 Create Swap Space

Related Post:  How to install Go on Linux Mint 18 18.1 and Ubuntu 16.04 16.10

Back to the main advanced disk partitioning tool window, you should see the partitions you just created, besides the existing ntfs (Windows 7) partitions. Because the first Ubuntu partition was created as a logical partition (the installer does that by default), it is listed as sda5. This is the boot partition and it is where the boot files for Ubuntu will be installed.. Note that installing GRUB in the MBR is the same as installing it in sda. This is what you see in the Device for boot loader installation dropdown menu. So what you want to do here, is select sda5 (our boot partition) from that menu.
Ubuntu 12.04 Install Bootloader MBR

When you are done selecting it, the window should look like this. click Install Now to continue with the rest of the installation process.
Ubuntu 12.04 Install GRUB sda5 Boot Partition

At the user account setup step, you might want to enable encryption of your home folder by enabling Encrypt my home folder. This does not afford you the same level of physical security as full disk encryption, but it is better than no encryption.
Ubuntu 12.04 Install User Account Setup

And you have the option of importing your settings from the Windows side to Ubuntu.
Ubuntu 12.04 Install Import Windows 7 Settings

After installation has completed successfully, reboot the computer. It should reboot into Windows. This is expected. At this point, Windows does not know that it is now sharing the computer with another operating system. The next step is to tell it, and modify its boot menu to reflect that fact.

Related Post:  So that is how SSH got assigned port 22

The easiest program to use for this task is EasyBCD, a free program by NeoSmart Technologies. There is a paid version, but for personal and non-commercial use, it is free. You may download it from here. Install it as you would any Windows 7 application. Start it. The main interface is shown in the image below. To begin the process of adding an entry for Ubuntu 12.04 in Windows 7’s boot menu, click on the Add New Entry tab.
Ubuntu 12.04 EasyBCD

Then on the Linux/BSD tab. From the Type dropdown menu, select GRUB 2, the version of GRUB used by Ubuntu 12.04. Click on the Add Entry button. Click on Edit Boot Menu tab to view the new configuration.
Ubuntu 12.04 EasyBCD GRUB 2

These are the two entries you will see every time you (re)boot the computer. The default is Window 7, but you can change it to Ubuntu 12.04 if you like. Exit EasyBCD and reboot.
Windows 7 Boot Menu EasyBCD

That is it. Like I wrote earlier, this was done on real hardware and in a virtual environment on first try, so I do not think that you will encounter any issues if you follow this tutorial step-by-step.

LinuxBSDos needs your donation to continue!

I hope this article has saved you valuable time and effort to fix a problem that would have taken more time than is necessary. That makes me happy, and why I love doing this. But because more people than ever are reading articles like this with an adblocker, ad revenues have fallen to a level that's not enough to cover my operating costs. That's why I want to ask you a favor: To make a one-time or recurring donation to support this site and keep it going. It's a small favor, but every one counts. And you can make your donation using Patreon or directly via Paypal. Thank you for whatever donation you're able to make.

Donate via Patreon. Donate via Paypal.

Aside from donation, you may also signup to receive an email once I publish new content. Your email will not be shared or traded to anyone. And you can unsubscribe at any time.

Please share:

We Recommend These Vendors and Free Offers

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).

Deploy an SSD Cloud server in 55 seconds on DigitalOcean. Built for developers and starting at $5:00/month (20 GB SSD, 512 MB of RAM).

Want to become an expert ethical hacker and penetration tester? Request your free video training course of Online Penetration Testing and Ethical Hacking

Whether you're new to Linux or are a Linux guru, you can learn a lot more about the Linux kernel by requesting your free ebook of Linux Kernel In A Nutshell.


  1. Thank you. You saved me hours of pain.

    I was able to do this one the first try. Very clear instructions!