www.thpc.info   TweakHomePC    www.thpc.info

Dual-booting all versions of Windows and Linux
 
   Dual-Boot Centre      9x Speed Tweaks      How do I ...      9x Updates      9x Utilities      Downloads      PC Safety      Site Map      Link  
 
 
 

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

Dual-Boot or Multi-Boot:

Install Windows XP + Linux Fedora 11 on a Windows 7 computer
(Win7 installed first, or Win7 + XP dual-boot created first, and Win7 still controlling startup after Linux installation)

Last reviewed: July 2009

On this page:

Introduction

This guide shows how to create a native (natural) Windows-controlled triple-boot of Windows 7, Windows XP and Linux Fedora 11 on a computer with Windows 7 already installed or how to install Linux Fedora if a dual-boot of Windows 7 and XP already exists. You can then run any of those three operating systems by selecting one from a Windows menu during bootup. No data loss will occur and a third-party boot utility will not be used.

In this procedure you need to shrink the Windows 7 drive to make room for Windows XP and Fedora unless you install XP and Fedora on a second hard disk. Using a second disk simplifies the procedure but it's not necessary. The example shown here uses a single hard disk.

Both Windows 7 Home Basic and Ultimate were used in testing so this will also work with Windows 7 Premium and Professional.

The operating systems added were Linux Fedora 11 and Windows XP Professional or Home Premium. The computer used was a 32-bit Dell Optiplex with Pentium 4 (2.26GHz), 1.5 GB RAM, 160 GB ATA or 1 TB SATA hard disk.

This procedure is suitable for experienced computer users.

[top of page]

Important Installation Notes

Full Installation CD/DVDs
The Windows you are adding cannot be installed from a Recovery or Repair CD or DVD. Some OEMs supply these instead of the full versions and some only give you a recovery partition on your hard disk. You need the full installation or setup version to install a Windows.

System Reserved partition
A Windows 7 installation usually creates a small 100 - 200 MB hidden System Reserved partition on which it places the boot files, Bootmgr, and the Boot folder. If it exists, this System Reserved will be the Active partition. It will be a Primary partition so you need to identify whether or not you have this Primary because its presence will affect the number of new Primary partitions you can create on that disk. It's not allocated a drive letter in Win7 and will not normally be visible in Win7's Windows Explorer. When the dual-boot is created, System Reserved will have a drive letter in XP and will also be visible in that Windows. Use Disk Management to see if you have it in Windows 7 (right-click Computer, select Manage, click Disk Management).

Shrinking the Windows 7 drive
You should avoid resizing a Windows 7 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.

It's recommended you use Shrink in Disk Management to resize the Windows 7 or Vista partition and not a third-party utility - play safe and let Windows do it. If the free space achieved is inadequate, you can read Shrink the Windows 7 or Windows Vista Partition for instructions on completing this task successfully. The very popular and free GParted Live CD cannot be recommended in this situation - read Use GParted to Resize the Windows 7 or Vista Partition to learn why.

Formatting
Windows partitions should be created before you start installing any Windows. The partition should be Formatted when installing that Windows to ensure compatible file system versions. Avoid formatting Windows partitions with GParted or any other third-party partitioning utility.

Restore Points and Windows XP
A fix must be applied to prevent Windows XP removing Restore Points created by Win7 or Vista. Read Fix Restore Points Problem in XP (below).

EasyBCD
The highly-acclaimed EasyBCD is a free boot menu editing utility for Win7 or Vista. It allows users to easily edit the BCD (Boot Configuration Data). The BCD is an integral part of Windows 7's and Vista's new boot manager/loader that replaces the NTLDR/Boot.ini method used in Windows XP, 2000, and NT. Manually editing the BCD is quite difficult. However 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.

[top of page]


Make NTFS Partition Active

After the Fedora installation, the originally active NTFS partition may need to be made Active again. This can be executed using Fdisk (option 2) run from a MS-DOS Prompt (Win98/Me boot floppy or CD).

However, Fdisk does not show any labels and it shows incorrect sizes for the larger NTFS partitions. This may make it difficult to accurately identify the correct partition to be made Active. Some users would use other methods such as GParted Live CD, Ranish partition manager, MBRWork 1.07b (all are freeware). The natural successor for Fdisk is DiskPart which you can run from your Windows DVD.

How to use DiskPart to make a partition Active

  1. Bootup from any Windows 7/Vista installation DVD or even from NeoSmart's free Windows 7 System Recovery Disk.
    It must be a 64-bit version if a 64-bit Windows is installed.
    Select Repair your computer at the Install now screen.
    Click No if asked to Repair and Restart.
    Click Command Prompt option on the new window. Press ENTER after you type in each of these commands:
    • DISKPART
    • LIST DISK     (disk number(s) will be shown).
    • SELECT DISK n     (where n is the number of the disk - probably 0).
    • LIST PARTITION     (partition number(s) will be shown).
    • SELECT PARTITION n     (where n is the number of the partition you wish to make Active - probable 1).
    • ACTIVE     (the selected partition on the selected disk will be made Active).
    • EXIT     to exit DiskPart.
    • EXIT     to exit the Command Prompt.
  2. Reboot.
[top of page]

SUMMARY of Procedure (Advanced users)

  1. Backup.
  2. Note which partition is marked Active (use Disk management).
    Create NTFS partition for XP at end of Windows 7 partition (use Shrink) or on second disk.
    Create Unallocated space for Fedora (2 Logicals) at new end of the Windows 7 partition.
  3. Bootup from XP installation CD and install XP on NTFS partition allocated to XP. Only XP boots now.
    • With XP running, install Microsoft's .NET 2.0 Framework.
    • With XP running, install/run NeoSmart's free EasyBCD utility to add "NT/2k/XP/2k3" in "Add an Entry".
    • With EasyBCD still running, select "Reinstall Vista Bootloader" and "Write MBR" in "Manage Bootloader".
    Reboot. A natural dual-boot of Windows 7 and XP has been created (if Windows XP is not a boot option, use EasyBCD again to add it).
  4. Install Linux Fedora 11 on the Unallocated space.
    - select "Create custom layout" and create partitions yourself.
    - install GRUB on the Linux partition - in "Install boot loader on ...", select "First sector of boot partition".
    - and remove the Windows entry from the GRUB boot menu (probably /dev/sda1).
  5. When Fedora is installed, make the originally active partition Active again (read above).
    Reboot. The Windows dual-boot will be available again.
  6. Boot to Windows XP and use EasyBCD to add the Linux partition to the Windows boot loader.
    Reboot to Linux Fedora and let the installation finalize.
  7. Finally, Fix Restore Points Problem in XP (read below).

That's it! You have created a natural triple-boot of Windows 7, Windows XP and Fedora 11.

[top of page]

STEP-BY-STEP: Install Windows XP and Fedora when Windows 7 is installed first

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

It's very important to follow the instructions exactly as stated and that includes all restarts!


Requirements.
  • Installation/Setup CD/DVDs for Windows XP plus the Product Key.
  • 3 downloads (see below) and maybe device drivers (especially for XP).
  • A first hard disk that uses only NTFS and contains a working Windows 7 (a second disk is optional).

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 (good choice)
  2. Plan your new partitions carefully.
  3. Download Microsoft's .NET 2.0 Framework (Dotnetfx.exe - free - required by XP to run EasyBCD).
    Download Neosmart's EasyBCD v 1.7.2 or later (free - edits Win7/Vista boot loader).
    • Copy Dotnetfx.exe and EasyBCD to a new EasyBCD folder on the Win7 drive.
    Optional: Download NeoSmart's free Windows 7 System Recovery Disk if your Win7 DVD is missing!
  4. Download any essential device drivers for your older Windows, especially a Chipset driver for your motherboard if required. If you use a SATA disk, be sure you have the SATA Controller driver which is required during installation.
  5. If you intend using a second hard disk, make sure that disk is in place before you start.
  6. Disconnect all external devices before you start.

B. Make free space and create new partitions.

The single 160 GB disk usually used in testing initially had: System Reserved (100 MB, Primary, Hidden, NTFS), Windows 7 (150 GB, Primary, NTFS). In this example an NTFS Primary partition was first created at the end of the Windows 7 partition. Then Unallocated space (for 2 Logicals) was created at the end of the now shortened Windows 7 partition. You can alter this if you wish but make sure you will not have a problem creating a Logical partition for Linux's Swap area - if necessary, create the Linux and Swap partitions, and label them, before you install any operating system.

After repartitioning the disk had: System Reserved (100 MB, Primary, Hidden, NTFS), Win7 (120 GB, Primary, NTFS), Fedora and Swap (18 GB, Unallocated - both will be Logical partitions), XP (10 GB, Primary, NTFS). You can use a second hard disk if you wish - the procedure will be similar to that described here.

Always note the size of each partition and also label each (this page uses wn_7 and w_XP).

  1. Restart computer correctly (close all programs before you Restart computer).
  2. Open Disk Management in Windows 7 (right-click Computer, select Manage, click Disk Management).
    • Right-click your CD/DVD drive(s), select Change drive letter and paths..., and click Change.
      Change the drive letter to K (get it out of the way!).
    • Right-click the Windows 7 Volume (probably C:), and select Properties.
      In the General tab, enter wn_7 as the label for the Windows 7 volume, and click Apply.
  3. In Disk Management in Windows 7
    • Right-click the wn_7 volume, and click Shrink Volume.
      • In Enter the amount of space to shrink in MB: enter enough for XP only.
      • Click the Shrink button.
      Right-click the Unallocated space and select New Simple Volume.... Click Next.
      • In Simple volume size in MB:, select all Unallocated space you created. Click Next.
      • In File system, select NTFS in the drop-down.
      • In Volume label, enter w_XP.
      • Tick to enable the Perform a quick format check box, and click Next.
      • Click Finish button.
    • Right-click the now smaller wn_7 volume, and click Shrink Volume.
      • In Enter the amount of space to shrink in MB: enter enough for Fedora.
      • Click the Shrink button (it may take some time!).
      You can leave the Fedora disk space as Unallocated.

      If Shrink does not give you sufficient Unallocated space, read Shrink the Windows 7 or Windows Vista Partition for instructions on how to complete this task successfully. Then return here.
       
    • If you have a very large hard disk, you can create an extra NTFS partition for data.
      (Disk Management will automatically create Logical partitions when those become necessary if, and only if, you already have only three Primaries).
  4. Restart to Windows 7 two times.
    • Open Disk Management and check that all the changes are correct.

C. Install Windows XP.

Installing Windows XP on a Windows 7 computer puts the XP boot loader (NTLDR) in charge. After XP installation, the EasyBCD utility will put a Windows XP entry in Win7's boot menu and then reinstall the Win7/Vista boot loader (Bootmgr) and MBR. Windows 7 will be bootable again.

  1. Bootup from the Windows XP installation CD.
    Install Windows XP as a New installation (Advanced) on the w_XP partition
    • In Advanced Options..., tick to enable "I want to choose the install drive and partition ...".
    • Check both the label and the size to ensure you select the correct partition.
    • The w_XP partition should be Formatted with NTFS during installation (a Quick format is fine).
    When install is complete, only Windows XP will boot.
    Label the Windows XP drive back to w_XP.
    Install any device drivers required by Windows XP.

    Now use EasyBCD to add XP to Win7's boot loader menu and to return boot control to Win7.
     
  2. Restart Windows XP
    • Install .NET 2.0 Framework from the EasyBCD folder on the Win7 drive.
    • Install and run EasyBCD.
      • Click Add/Remove Entries
        • In Windows tab under Add an Entry, select Windows NT/2k/XP/2k3 from the drop-down list.
        • Give it a name (like Windows XP Pro)
        • Press Add Entry.
          * If the new entry does not show under Manage Existing Entries, click View Settings, and click Add/Remove Entries again. Now it will show.
        • Click Save.
      • Click Manage Bootloader
        • Enable Reinstall the Vista Bootloader (probably enabled already!).
        • Click Write MBR.
      • Exit EasyBCD.
    • Label the Windows XP drive back to w_XP if it has changed.
  3. Restart computer. Now the Windows 7 boot loader menu has an extra entry which allows you to boot XP (if Windows XP is not a boot option, use EasyBCD again to add it).
Remember to Fix Restore Points Problem in XP (read below).


D. Install Fedora 11

Raid/LVM was not an issue when testing so partitions were created manually during installation. Grub was installed to a Linux EXT3 partition. The Win7 partition had to be made Active again when the Fedora installation was complete. Finally EasyBCD, run from XP, created a Linux Fedora entry in Win7's boot manager thereby creating the triple-boot.

  1. Bootup from the Linux Fedora 11 installation CD/DVD.
    Select Install or upgrade an existing system.
    • Continue with the initial screens until you're presented with the option of partitioning your hard disk
      (you can skip the testing of media - it checks your CD/DVD for errors).
      • Select Create custom layout in the top drop-down list and click Next.
    • Highlight the Free space you created for Fedora, and click the New button.
      Add Partition will open. First create the Fedora partition.
      • In Mount Point:, select / (a forward slash).
      • In File System Type:, select ext3
      • In Size (MB):, enter all available space (for Fedora) except 0.8 - 1 GB (for the Swap File)
      • Click the OK button.
    • Highlight the remaining Free space, and click the New button.
      Add Partition will open. Now create the Swap partition.
      • In Mount Point:, leave it blank.
      • In File System Type:, select swap.
      • Tick to enable Fill to maximum allowable size
      • Click the OK button

      Click Next when ready, or click Back to recreate partitions.
      Then click Write changes to disk or Go back if unhappy with the changes.
      The new partitions will now be created on the disk and formatted.
       
    • The next screen is vital to ensure the correct location for GRUB.
      • Tick Install boot loader on ..., and click the Change device button.
        Select First sector of boot partition and click OK.
      • Using a boot loader password is optional.
      • Under Boot loader operating system list, highlight and delete the Windows entry (probably /dev/sda1).
      • Click Next.
    • Deal with the software applications screen as you think fit ("Customize later" is fine).
    • Click Next and the install process will start.
      Fedora will reboot your computer after initial installation (you can remove the DVD).
      Your computer is not bootable right now but that's easily fixed!
       
  2. Make the originally active NTFS partition Active again - read Make NTFS Partition Active above.
    Your Windows dual-boot returns automatically when the Active flag has been returned to its original location.
    We can then use EasyBCD in Windows XP to add Linux to the Win7 boot loader.
     
  3. Reboot and select Windows XP in the boot menu.
    Run EasyBCD.
    • Click Add/Remove Entries.
      • Click the Linux tab under Add an Entry.
      • In Type, select Grub in the drop-down.
      • In name, enter a name like Linux Fedora 11.
      • In Device or Drive, select Partition . (Linux ...) from the drive drop-down list
        (it's the partition containing Linux - check the size shown).
      • Press Add Entry.
        If the new entry does not show under Manage Existing Entries, click View Settings, and click Add/Remove Entries again. Now it will show.
      • Click the Save button.
    • Exit EasyBCD.
       
  4. Restart computer. Select Linux Fedora 11 from the Win7 boot menu.
    Fedora will quickly finalize its installation.
Congratulations! You have created a natural Windows-controlled triple-boot of Windows 7, Windows XP and Linux Fedora 11 when Windows 7 was installed first.

Finished!

Footnote:
EasyBCD creates an NST folder on the root of the Active partition when it adds an operating system to the Windows 7 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]

Fix Restore Points Problem in XP

Windows XP does not understand some of the disk management techniques used by Windows 7 and Vista. Every time XP is booted, it destroys Win7's and Vista's Restore Points and all except the most recent backup files from Complete PC Backup - read Microsoft's Knowledge Base article 926185. The problem does not affect Windows 2000.

A small addition to XP's registry avoids this problem by making the Windows 7/Vista partition inaccessible when, and only when, XP is running. You must, however, use extreme care to ensure you enter the correct drive letter in the following corrective procedure. You must never enter the drive letter used by XP - that would prevent XP from starting! This fix is applied when XP is booted and not from any other Windows.

  1. Download this tiny xp_rstr_fix.reg file, xp_rstr_fix.zip, and unzip it to XP's Desktop.
  2. Startup to Windows XP. It must be XP and not any other version of Windows.
  3. Note the drive letters allocated to the Win7 partition in Windows Explorer.
  4. Right-click xp_rstr_fix.reg on the Desktop and select Edit. Look at this line in xp_rstr_fix:
    "\\DosDevices\\Z:"=dword:00000001
    • Carefully change that Z to the drive letter allocated to the Win7 partition
      (make sure you do not remove the \\ before the letter or the : after the letter).
    • Save the file back to the Desktop as xp_rstr_fix2.reg
    • Right-click xp_rstr_fix2.reg on the Desktop, click Merge, and click OK.
  5. Reboot to Win7, and create a new Restore Point (right-click Computer > Properties > System Protection).
  6. Delete the two .reg files on XP's Desktop when you're finished.

When XP is booted, you will be denied access to the Win7 partition and the partition will appear to be unformatted (RAW) even though the contents have not been changed. It will still be allocated drive letters in XP. When you boot to Win7 you will have access to all your drives, including the Windows XP partition.

This is the full xp_rstr_fix.reg file: (the blank line is required)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\Offline]
"\\DosDevices\\Z:"=dword:00000001

[top of page]


Uninstall/Remove Linux and reclaim space

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

  1. Run EasyBCD in Windows 7.
    • 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).
    The next instructions assume your Linux partition is immediately after the Win7 partition.
    • Right-click the Swap 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 Volume..., click Yes.
    • 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 just a few second you will have all the Linux space back in Win7.

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

[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 from any Windows 7/Vista installation DVD or even from NeoSmart's free Windows 7 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 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, select 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 totally 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:
x:\boot\bootsect.exe /nt60 C:
(where x: is your DVD drive letter, and C: is the installation drive for Windows 7).
Type EXIT, and click Restart. Remove the DVD.

[top of page]

Related Reading How do I ...

[top of page]

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

www.thpc.info was formally TweakHomePC at www.tweakhomepc.virtualave.net
Copyright © LarryM 1998-2010 thpc@mail.com