TweakHomePC

Dual-booting all versions of Windows and Linux

   Dual-Boot    |    Win 8    |    Win 7    |    Vista    |    Win XP/2K/NT    |    Win9x/Me    |    How to    |    Legacy 9x Tweaks    |    SiteMap   


 

Here: Home > Dual-Boot > Dual-Boot Windows 7 with other Operating Systems >


Install Ubuntu-controlled Dual-Boot of Linux Ubuntu 14.04 ("Trusty Tahr") on a Windows 7 computer
Win 7 installed first and Ubuntu's GRUB2 on Windows partition controlling startup

Last reviewed: May 2014

 

Introduction

This guide shows how to correctly and safely create a natural dual-boot of Windows 7 and Linux Ubuntu 14.04 (Trusty Tahr) on a computer with Windows 7 already installed. The Linux GRUB2 boot loader will be installed to the Windows partition and put in control of startup. You can then select either OS from Linux's boot menu during bootup. Basically you will have a Ubuntu-based computer system that also allows you to boot to Windows 7 whenever you wish. No data loss will occur and a third-party boot utility is not used.

Ubuntu (Desktop) 14.04 and 12.04 have a 5-year LTS (Long Term Support) for free security updates. 10.04 gave 3-year LTS. Other versions gave 9 month support but are freely upgradable to later LTS versions. All versions have thousands of free-to-use important software items.

32 and 64-bit versions of Windows 7 were used in testing. The computers used had no EFI/UEFI and no GPT partitions that are mostly on pre-installed Windows 8 computers - read Am I using GPT or MBR?
(1) 64-bit Studio XPS 8100 (2.93 GHz), Core i7, 8 GB RAM DDR3, NVidia GeForce GTX 460, 2x1 TB SATA hard disks.
(2) 64-bit AMD Athlon (2.4GHz), 2.0 GB RAM, 128 MB Radeon XPress, 1 TB SATA hard disk.

You need to shrink the Windows 7 drive to make room for Linux unless you install Ubuntu of a second hard disk. The procedure used is suitable for experienced computer users.

If you decide to leave Windows (BCD) continue controlling the startup then go to this page
If you are not installing version 14.04 of Ubuntu, you must select the correct version on this page

Following these instructions correctly should always succeed. However, any change to your computer should not even be considered unless your have a rescue plan. This guide also contains that rescue plan - just in case!

SUMMARY of Procedure (Advanced Users)

  1. Backup.
  2. Create sufficient Unallocated space for Ubuntu 14.04 at end of Windows disk (use Shrink in Disk Management).
  3. Start installing from Ubuntu Live DVD
    • In "Allocate drive space", select "Something else ".
    • Create Ubuntu partition (use / for Mount Point) - leave enough space for the Swap (and /home, recommended),
    • Create the Swap (Logical) partition in the rest of Free Space - use swap area in "Use as:".
    • Optionally, create another EXT4 partition for your data - use /home for Mount Point.
    • In "Device for boot loader installation", accept the default (/dev/sda) even if Ubuntu will install on a 2nd disk (use /dev/sdb only if BIOS is set to boot from the 2nd hard disk first).
    Install Ubuntu 14.04

Finished! Linux's GRUB2 boot loader menu will boot either Ubuntu 14.04 or Windows 7, and the original MBR has been overwritten.

[top of page]

Details: Install Linux Ubuntu 14.04 when Windows 7 was installed first and replace Windows' control of startup

Installing other operating systems on your Windows 7 computer may invalidate your warrantee.
It's important to follow the instructions exactly as stated and you should start with a properly working Windows.


Make your preparations

  1. Backup important data before making any changes to a partition.
  2. Download the Ubuntu Desktop 14.04 (Live CD), standard or 64-bit version from www.ubuntu.com.
    Create the Ubuntu installation CD (right-click the downloaded .ISO file & select Burn disc image).
  3. Download NeoSmart's EasyBCD (free - it edits the Windows 8, 7 or Vista boot loader).
  4. Confirm your computer can Boot from a bootable CD/DVD
  5. Disconnect all unnecessary external devices before you start.

Make disk space available for Linux Ubuntu

You must create disk space for Ubuntu and leave it as Unallocated. Decide first on how much disk space you need. Linux requires a minimum of about 5 GB (ridiculous!) for installation and a minimum of two partitions. Example: (1) Root (/) 20-50 GB for Ubuntu files + boot files + software you install + all your data, and (2) Swap (Swap area) 6 GB (if you have 4 GB memory).

Many users create (3) another EXT4 partition (/home) for their own data. This data partition can be left intact should you wish to reinstall Linux at some stage. Example: (1) Root (/) 10-20 GB for Ubuntu files + boot files + software you install, (2) Swap (Swap area) 6 GB, (3) your data (/Home) 30 GB.

The size of the Swap partition depends on the size of your memory (RAM) and your type of usage. With 2GB of RAM use about 4GB for Swap; with 4-8GB of RAM use about 6GB; with 16GB of RAM use about 8GB.

If installing Ubuntu 14.04 on a 2nd or 3rd hard disk:

  • You should have no trouble using Win7's Shrink in Disk Management to create Unallocated space for Ubuntu.
  • Restart to Windows when finished.
  • Then skip from here to Install Linux Ubuntu 14.04 on a Windows 7 computer

If installing Ubuntu 14.04 on the first hard disk:

  1. Restart computer correctly (that means close all programs before you Restart computer).
  2. Open Disk Management in Windows 7 (right-click Computer, select Manage, click Disk Management).
    • Right-click the Windows 7 volume, and click Shrink Volume.
      • In Enter the amount of space to shrink in MB: enter enough for Ubuntu and its Swap file.
      • Click the Shrink button (it may take some time!).
      If Shrink does not give you sufficient Unallocated space, read how to Shrink the Windows 8, 7 or Windows Vista Partition for instructions or use the free GParted Live CD. Then return here.
  3. Restart to Windows. Make a note of the size of the Unallocated space.

[top of page]

Install Linux Ubuntu 14.04 on a Windows 7 computer

Partitions are created manually during the installation. Ubuntu is installed on the previously created Unallocated space with its boot loader installed to the default /dev/sda partition. Ubuntu automatically adds Windows 7 to its own boot menu which appears on bootup.

  1. Bootup from the Linux Ubuntu 14.04 live CD and select Try Ubuntu.
    • When you're ready, select the Install Ubuntu 14.04 desktop icon.
    • Optional: setup your wireless connection.
    • Read the Preparing to install Ubuntu window and click Continue.

  2. In Installation type, select Something else (that's IMPORTANT), and click Continue.
  3. In the new Allocate drive space, do not click 'Install Now' until instructed.

    Highlight the free space on the correct hard disk (sda=1st disk) (sdb=2nd disk)
    and click the + button (the vertical scroll bar appears only when you mouse-over it).
    • The Create partition window will open.
      • In Size, enter all available minus space for the Swap (and minus a /Home size if using it).
      • In Type for the ..., a Logical partition is fine if 2 Primaries already exist on that disk.
      • In Location for the ..., select Beginning.
      • In Use as:, select Ext4 journaling system (the default) in the drop-down.
      • In Mount point:, select / (a forward slash) in the drop-down.
      • Click OK.
    Back in Allocate drive space, highlight the now smaller free space (scroll down if necessary)
    and again click +.
    • The Create partition window will open again.
      • In Size, use all available space (unless creating a /Home data partition).
      • In Type for the ..., select Logical.
      • In Location for the ..., select Beginning.
      • In Use as:, select swap area in the drop-down.
      • Click OK.

    If you left space for a Linux data partition, now use remaining free space to create, exactly as above, another EXT4 partition for your own data but select /home for Mount Point.
     
    STOP! The next part is VITAL for the correct location for Ubuntu's boot loader (GRUB2).
    You are still in Allocate drive space.
    Look under Device for boot loader installation:
    • The default is for /dev/sda ... and that should be accepted even if installing Ubuntu on a 2nd disk. However if your computer happens to boot from a second hard disk (very unlikely) you must change this to /dev/sdb ...
      (the Windows-created MBR and boot loader will be overwritten by Ubuntu's).


    Make sure you are happy with what's displayed on-screen.
    When you are ready click 'Install Now', or click Back or Quit.

    Linux Ubuntu 14.04 will now install itself on the EXT4 partition and will place Ubuntu's boot loader (GRUB2) at the start of the Windows partition. The Windows-created boot loader will be overwritten.
     
  4. During the installation, you can attend to location, keyboard, password, imports, etc.
    (Log in automatically, under Password, is useful for many home users).
  5. Click Restart Now when installation is finished, remove the DVD when requested and press the Enter key.
    You will be presented with a Linux Boot Loader menu containing both operating systems.

Congratulations!
You have created a natural dual-boot of Windows 7 and Linux Ubuntu 14.04 (Trusty Tahr) when Windows 7 was installed first, the Linux GRUB2 Boot Loader is now in control. The original boot loader has been overwritten.

Finished!

Older Computers with low maximum Screen Resolution

Ubuntu 14.04 itself runs fine at 1024x768 screen resolution. However GRUB2 may require a higher resolution (1280 x 1024) and users with old systems may be presented with a blank screen instead of the expected boot loader menu.

The boot menu is actually there but it's not visible! To run Ubuntu when the blank screen appears, just press Enter. To run Windows, press the down arrow key 4 times and press Enter. And then be patient for a few moments.

[top of page]

Remove/Uninstall Linux Ubuntu and reclaim space

Linux Ubuntu is wonderful, regularly updated, and it's free! Nevertheless you may wish to remove it at some stage. Removing Ubuntu and regaining its disk space is quick and painless.

Return boot control to Windows

  1. Bootup the Windows 7 installation DVD.
    It must be a 64-bit version if a 64-bit Windows is installed.
    • Press a key when you see Press any key to boot from a CD or DVD.
    • Select your Time... and click Next.
    • Select Repair your computer (bottom left of the Install now screen).
      An automatic check of your system may run.
    • In System Recovery Options click Command Prompt.
      Type in (and press ENTER) - it's not case-sensitive
      bootrec /FixMbr
      EXIT
  2. Now click Restart and remove the DVD or CD.

Windows 7 will boot normally and without any boot menu if none existed initially.

Now reclaim the hard disk space used by Linux

  1. First make sure Windows controls the startup (see previous item).
  2. Boot to Windows 7
    and open Disk Management (right-click Computer, select Manage, click Disk Management).
    • Right-click the Swap partition, select Delete Volume..., click Yes.
    • Right-click the Linux partition, select Delete Volume..., click Yes.
    • Right-click the Swap partition, select Delete Partition, click Yes - required for Logical partitions only.
    • Right-click the Linux partition, select Delete Partition, click Yes - required for Logical partitions only.
    • Right-click the partition to the left of Unallocated, select Extend Volume...,
      and click Next to use the maximum space for Windows, and then Finish.
      Alternatively, create a new partition in the Unallocated space and Format it.

In another a few seconds you will have all the Linux space back in Windows 7.

[top of page]

Repair Windows 7 Startup

You will not have any problem if you follow the instructions as stated above. However you might encounter some freak occurrence like a power failure during an installation. Windows 7 will boot again if you execute the following procedure.

  1. Bootup the Windows 7 installation DVD.
    It must be a 64-bit version if a 64-bit Windows is installed.
    • Press a key when you see Press any key to boot from a CD or DVD.
    • Select your Language and then Time....
    • Select Repair your computer (bottom left of the Install now screen).
      An automatic check of your system will run.
    • Click Repair and restart
      Windows 7 should boot normally (very likely). If not, continue here.
  2. Bootup from the Windows 7 installation DVD again
    • Select Repair your computer again.
    • In System Recovery Options, highlight Windows 7, and click Next.
    • Click Startup Repair.
    • Click Finish when it's complete, and then Restart.
    • You must let CheckDisk run if requested.
      Windows 7 should boot normally.

If still stuck for a solution, boot again from the installation DVD, select Repair your computer, highlight Windows 7, get to a Command Prompt, use DIR command (DIR C: or DIR D: etc.) to identify drive letter allocations (sizes and Labels will help), and type in:
bootrec /FixMbr
bootrec /FixBoot
bootrec /RebuildBcd
X:\boot\bootsect /nt60 C:
  (where X: is your DVD drive letter, and C: is the installation drive for Windows 7).
EXIT, and click Restart. Remove the DVD.

[top of page]

Related Reading

Please remember that you alone are responsible for the consequences of any changes you make to your computer hardware or software.

Copyright © LarryM 1998-2015 thpc@mail.com