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 dual-boot Debian 6 and Windows 7

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:  How to change the default route in Linux

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.

Related Posts

Related Post:  Restore the Windows bootloader to MBR after dual-booting with Linux

562 Comments

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

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