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 Vista with other Operating Systems >


Install Dual-Boot of Linux Ubuntu 9.04 or 8.x on a Windows Vista computer (Windows Vista installed first and Vista still controlling startup after Linux installation)

Last reviewed: June 2009

Introduction

This guide shows how to correctly and safely create a natural dual-boot of Windows Vista and Linux Ubuntu 9.04 or 8.x on a computer with Windows Vista already installed. The Windows boot loader will stay in control (not Linux's GRUB). You can then select either OS from a menu during bootup. No data loss will occur and a third-party boot utility is not used.

In this procedure you need to shrink the Windows Vista drive to make room for Linux.

32 and 64-bit versions of Windows Vista were used in testing The operating system added was Linux Ubuntu 9.04 or 8.04. The computers used were (1) a 32-bit Dell Optiplex with Pentium 4 (2.26GHz), 2.0 GB RAM, 160 GB ATA hard disk, and (2) AMD Athlon 64-bit (2.4GHz), 2.0 GB RAM, 1 TB SATA hard disk.

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!

The procedure used is suitable for moderately experienced computer users.

Do not use these instructions to dual-boot with Ubuntu 9.10 or later. For newer Ubuntu versions you must select the correct version on this page


Important Installation Notes

Hidden Active Partition
Many Windows Vista users will have a small primary disk partition that's marked active and is hidden (but is visible under Disk Management in Windows Vista). This Active partition is the first partition used during bootup and it contains the boot files that start the operating system (which must be on a different partition when the Active drive is hidden).

  • When the Active partition is not hidden, EasyBCD 2.0 puts new boot file(s) in an NST folder on that Active partition.
  • When the Active partition is hidden, EasyBCD 2.0 creates the NST folder on the visible Windows Vista partition and uses the file(s) from there. With EasyBCD 2.0+, it's no longer necessary to unhide the hidden System Reserved!

Shrinking a Windows Vista or Vista drive
If possible, you should avoid resizing a Windows Vista or Vista partition with a third-party partitioning utility like GParted. Windows partition editors often use different disk geometry than that used in Linux. Therefore resizing a Windows partition outside of Windows control could sometimes make Windows unbootable.

Shrinking a Windows 8, 7 or Vista drive. You should use Shrink in Windows' Disk Management to resize the Windows partition. You can read Shrink the Windows 8. 7 or Vista Partition for instructions on completing this task successfully. Use the free GParted Live CD to gain disk space only if you must - read the page Use GParted to Resize the Windows 8, 7 or Vista Partition to learn how.

EasyBCD
The highly-acclaimed EasyBCD is a free editing utility that allows any user to easily edit the Windows 8, 7 or Vista boot menu (the BCD or Boot Configuration Data). The BCD is an integral part of Windows Vista's and Vista's new boot manager/loader that replaces the NTLDR/Boot.ini method used in Windows XP, 2000, and NT.

EasyBCD has plenty of useful options including the addition of any Windows, DOS, Linux and others to the new boot loader with just a few clicks in a user-friendly GUI. You can also, at your leisure, use EasyBCD to alter the Default OS, the Bootloader Timeout, the Name that appears in the boot menu, and the Boot order in the boot menu. It's a dual-booters dream!


SUMMARY of Procedure (Advanced Users)

  1. Backup.
  2. Create Unallocated space for Linux at end of hard disk (use Shrink in Disk Management).
  3. Start installing from the Ubuntu CD and select "Specify Partitions manually (advanced)" in "Prepare disk space".
    • Create Ubuntu partition in Free Space - select Primary or Logical for "Type ...", use EXT3 for "Use As", - leave enough space in "New Partition Size" for the Swap, select Beginning for "Location ...", and / for "Mount Point",
    • Then create the Swap (Logical) partition in the rest of Free Space - use Swap Area for Mount Point.
    • Click the Advanced button, install GRUB on the Linux partition, like /dev/sda3 or /dev/hda5.
    Install Ubuntu.
  4. Only Windows boots for now.
  5. If a System Reserved partition exists, first use Disk Management to allocate a temporary drive letter to it.
  6. Use the free EasyBCD utility to add "Linux native" to the Windows boot loader menu.
  7. Remove the temporary drive letter if it was allocated to System Reserved.

That's it! The Windows boot loader menu will boot Ubuntu and Windows Vista.

[top of page]

STEP-BY-STEP: Install Linux Ubuntu when Windows Vista is installed first

Installing other operating systems on your Windows Vista computer may invalidate your warrantee.

It's important to follow the instructions exactly as stated and you should have a properly working Windows.


Requirements

  • Installation CD/DVD for Linux.
  • 2 downloads.
  • A first hard disk that uses only NTFS and contains a working Windows Vista.

A. Make your preparations

  1. Backup important data before making any changes to a partition. You can burn files to a CD, clone an image of your hard disk, copy files to a USB flash/pen/thumb drive, or use an USB external drive (a good choice)
  2. Download the 700 MB Ubuntu, standard or 64-bit version from www.ubuntu.com (or request the totally free CD). You can use the free and excellent GetRight download manager to help with the large download. Create the Ubuntu Live CD from the downloaded .ISO file.
  3. Download Neosmart's EasyBCD (free - it edits the Win8/7/Vista boot loader).
    • Copy EasyBCD to a new EasyBCD folder on the Windows Vista drive.
    Optional: Download NeoSmart's free Windows Vista System Recovery Disk if your Vista DVD is missing!
  4. Disconnect all external devices before you start.

B. Make free space (Unallocated) for Linux Ubuntu

The single 160 GB disk usually used in testing initially had: System Reserved (100 MB, Primary, Hidden, NTFS), Windows Vista (150 GB, Primary, NTFS). The Windows Vista drive was shrunk leaving about 20 GB Unallocated space at the end of the disk (to the right). After repartitioning it had: System Reserved (100 MB, Primary, Hidden, NTFS), Windows Vista (130 GB, Primary, NTFS), Linux (20 GB, Unallocated).

  1. Restart computer correctly (close all programs before you Restart computer).
  2. Open Disk Management in Windows Vista (right-click Computer, select Manage, click Disk Management).
    • Right-click the Windows Vista volume, and click Shrink Volume.
      • In Enter the amount of space to shrink in MB: enter enough for Linux and its Swap file.
      • Click the Shrink button (it may take some time!).
        Note that we are leaving the newly acquired free space as Unallocated.
      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 Vista.
    • Open Disk Management and check that the change made is correct.

C. Install Linux Ubuntu

  1. Bootup from the Linux Ubuntu installation CD.
    Select your Language, and then select Install now.
    • In the Welcome screen, select your Language again, and click Forward.
    • In Where are you, select your Time Zone, and click Forward.
    • In Keyboard layout, select your Country, and click Forward.
    • In Prepare disk space, select Specify Partitions manually (advanced), and click Forward.
      The Prepare partitions screen will open (it's GParted).
       
  2. In Prepare partitions, right-click Free space, and select New Partition.
    The Create partition window will open. First create the Ubuntu partition.
    • In Type for the new partition, select Primary or Logical if you prefer/must.
    • In New partition size ..., select all available space (for Ubuntu) less twice your RAM size (for Swap File). Allow less than twice the RAM size if you have a lot of RAM.
    • In Location for the new partition, select Beginning.
    • In Use as:, select EXT3 journaling file system.
    • In Mount Point, select / (a forward slash).
    • Click the OK button.
    Make sure the Format box is ticked for the new EXT3 partition and make sure the Mount Point is / (if not, right-click the EXT3 partition, select Edit, and correct it).
    Make a note of the Device name allocated to the ext3 partition, like /dev/hda2 or /dev/sda2.
     
  3. Now right-click the remaining Free space (about 1 GB), and select New Partition.

    The Create partition window will open again. Now create the Swap partition.
    • In Type for the new partition, select Logical or Primary if it's available and you prefer it.
    • In New partition size ..., use all available space.
    • In Location for the new partition, select Beginning.
    • In Use as:, select Swap area.
      A Mount Point is not set for Linux's swap file partition.
    • Click the OK button.
    Click Forward when ready, or click Undo changes to partitions to remake them.
     
  4. In Who are you? enter and remember your username and password, and click Forward.
    Deal with the Migrate Documents and Settings as suits you, and click Forward.
    Read the contents of the Ready to install window but do not click Install yet.
    • Click the Advanced button and the Advanced Options windows will open.
    • Make sure the Install boot loader box is ticked.
    • You'll see the boot loader (GRUB) will be installed, by default, at the start of the first hard disk (hd0) replacing the Windows loader. We do not want that. We need to install GRUB to the Ubuntu partition.
      • In the drop-down, select the partition where Ubuntu will be installed, like /dev/sda2 or /dev/hda2
    • Click OK to exit Advanced Options.
       
  5. Click Back if you're not happy with your selections.
    Click Install when you're ready to install Ubuntu.
    Linux Ubuntu will now install itself on the new EXT3 partition and will place GRUB at the start of the Ubuntu partition.
     
  6. Restart computer when installation is complete. Window Vista will boot normally.
    We can now use EastBCD to add Linux to the Windows Vista boot loader.

D. Place Ubuntu 9.04 boot option in Windows boot loader

  1. Restart Windows Vista
  2. Skip this if you do not have a System Reserved partition.
    If you do have a System Reserved partition
    • Open Disk Management (right-click Computer > Manage > Disk Management).
    • Right-click the System Reserved partition
      and select Change Drive Letter and Paths...
      Click the Add button and click OK in Add Drive Letter or Path.
  3. Install and run EasyBCD from EasyBCD folder on the Windows Vista drive.
    • Click Add/Remove Entries.
      • Click the Linux tab under Add an Entry.
        • In Type, select Grub in the drop-down.
        • In name, use a name like Ubuntu 9.04 Linux.
        • In Drive, select Partition . (Linux native ...) from the drive drop-down list
          (it's the partition containing Linux - check the size shown).
        • You can leave the GRUB isn't installed to bootsector/MBR check box unchecked.
        • Press Add Entry.
          * If the new entry does not immediately appear under Manage Existing Entries, click View Settings, and click Add/Remove Entries again. Now you'll see it.
        • Click Save.
      • Exit EasyBCD.
  4. If System Reserved was allocated a drive letter, then use Disk Management to Remove the letter.
  5. Restart computer. Select Linux Ubuntu from the Windows Vista boot menu.

Congratulations! You have created a natural dual-boot of Windows Vista and Linux Ubuntu when Windows Vista was installed first.

Footnote: EasyBCD creates an NST folder on the root of the Active partition when it adds an operating system to the Windows Vista boot loader. This NST folder contains one or two files vital to booting the added OS. Be sure you do not accidentally delete this folder.

[top of page]

Remove/Uninstall Linux 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.

  1. Run EasyBCD in Windows Vista.
    • Click Add/Remove Entries.
      • Highlight the Linux entry.
      • Click the Delete button.
      • Click the Save button.
    • Exit EasyBCD.
  2. 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 Vista.

EasyBCD has an Uninstall shortcut in Start > All Programs > NeoSmart Technologies.

[top of page]

Repair Windows Vista 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 Vista will boot again if you execute the following procedure.

  1. Bootup any Windows 8, 7 or Vista installation DVD or even from NeoSmart's free Windows Vista System Recovery Disk.
    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 Vista should boot normally (very likely). If not, continue here.
  2. Bootup from the Windows Vista installation DVD again
    • Select Repair your computer again.
    • In System Recovery Options, highlight Windows Vista, and click Next.
    • Click Startup Repair.
    • Click Finish when it's complete, and then Restart.
    • You must let CheckDisk run if requested.
      Windows Vista should boot normally.

If still stuck for a solution, boot again from the installation DVD, select Repair your computer, highlight Windows Vista, 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.exe /nt60 C:
  (where X: is your DVD drive letter, and C: is the installation drive for Windows Vista).
EXIT, and click Restart. Remove the DVD.

[top of page]

Help! I get only the GRUB boot menu!

If you only get a GRUB boot menu on bootup, then GRUB was mistakenly installed to the Active partition, (hd0) - probably the Windows partition. The Windows boot loader has been overwritten by the Linux version but it's easily recovered.

How to reinstall/recover the Windows 8, 7 or Vista boot loader (BCD)

  1. Bootup any Windows 8, 7 or Vista installation DVD or even from NeoSmart's free Windows Vista System Recovery Disk.
    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 but will not identify GRUB control!
    • In System Recovery Options, highlight Windows Vista, and click Next.
    • Click Command Prompt in System Recovery Options.
      • Type in (and press ENTER)
        Bootrec.exe /fixmbr
        exit
        (GRUB will be overwritten and the Windows boot loader reinstalled).
    • Now click Startup Repair in System Recovery Options.
    • Restart computer.
      Windows Vista should boot as originally.

You can now reinstall Linux Ubuntu. When you get to the Install Now window, click the Advanced button and select the Linux Ubuntu partition as the location for installing GRUB. When installation is complete, continue at section D above.

[top of page]

Related Reading

[top of page]

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