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 Linux-controlled Dual-Boot of Fedora 16 ('Verne') on a Windows 7 computer
(Win7 installed first and GRUB controlling startup from a new Linux-created MBR)

Last reviewed: October 2011

October 2013: This is the new location for this page on this site. Please update your link or bookmark.

Introduction

This guide shows how to put Linux in control when you create a natural dual-boot of Windows 7 and Linux Fedora 16 if Windows 7 is installed first. A new MBR will be created at the start of the disk and Linux's boot loader (GRUB) will be in control of startup. You can then run either by selecting one from a Linux 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 7 drive to make room for Linux unless you use a second hard disk for Fedora. Using a second disk is marginally easier but far from essential..

32 and 64-bit versions of Windows 7 Home Basic, Enterprise and Ultimate were used in testing so this will also work with Windows 7 Premium and Professional. 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 you have a rescue plan. This guide also contains that rescue plan - just in case!

The procedure used is suitable for experienced computer users.

If you prefer Windows to control the dual-boot then go to this page for one hard disk
or go to the page for two(+) hard disks


Important Installation Notes

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.


SUMMARY of Procedure (Advanced Users)

  1. Backup.
  2. Create Unallocated space for Linux at end of Windows NTFS disk (use Shrink in Disk Management).
  3. Install Linux Fedora 16 on the free space
    - select "Create custom layout" and create partitions yourself.
    - install GRUB on the MBR (that's the default for "Install boot loader on /dev/sda").
  4. Restart computer. Select which OS you wish to run from the GRUB menu.

That's it! The Linux boot loader menu will boot Fedora 16 or Windows 7.

[top of page]

STEP-BY-STEP: Install Fedora 16 with Linux's GRUB in control when Windows 7 was installed first

It's the nature of a step-by-step that it appears long and difficult. Not so!

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 have a properly working Windows.


Requirements

  • Installation CD/DVD for Linux and preferably Win7's DVD.
  • 1 download.
  • A first hard disk that uses only NTFS and contains a working Windows 7.

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 Fedora 16, standard or 64-bit version from http://fedoraproject.org/. You can use the excellent free GetRight download manager to help with the large download. Create the Fedora Live DVD from the downloaded .ISO file.
    Optional: Download NeoSmart's free Windows 7 System Recovery Disk if your Win7 DVD is missing!
  3. Disconnect all external devices before you start.

B Make space (Unallocated) for Fedora 16

You must create disk space and leave it as Unallocated. Decide first on how much disk space you wish to allocate to Linux and if you will create an extra partition (/home) for your Linux data. This data partition can be left intact should you wish to reinstall Linux at a later time. The Swap area size should be about twice your RAM size but you should allow less than twice if you have a lot of RAM.

Always make a note of the size of the Unallocated space (it will be named 'Free' in Linux).

If installing Fedora 16 on a 2nd or 3rd hard disk:

  • You should have no trouble using Win7's Shrink in Disk Management to create Free space for Fedora.
  • Restart Windows when finished.
  • Then skip from here to C. Install Fedora 16

If installing Fedora 16 on the first hard disk:

This applies if you are installing fedora on the first hard disk and you must make the Windows partition smaller.

  1. Restart computer correctly (close all programs/software before Restart).
  2. Open Disk Management in Windows 7 (right-click Computer, select Manage, click Disk Management).
    • Note which partition is marked Active.
    • Right-click the Win7 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 7.
    • Open Disk Management and check that the change made is correct.

C. Install Fedora 16

Raid/LVM was not an issue when testing so partitions were created manually during installation. Fedora 16 was installed and the default location for the Boot Loader was accepted (to the MBR).The originally Active partition always remained Active after Fedora 16 installation so Windows then booted automatically. The dual-boot was created automatically by Fedora.

  1. Bootup from the Linux Fedora 16 Live CD.
    Double-click the Install to Hard Drive icon (in Activities > lowest icon).
    • Select the appropriate keyboard and then click Next.
    • Select Basic Storage Devices (unless you have a non-standard setup).
    • Enter a name for identification.
    • Select the correct city for your time-zone.
    • Create a Root Password of your choice (and remember it!).

  2. Select Create Custom Layout in the next screen (that's VERY important)
    • In Please Select A Device, highlight the Free space (check the Size) you created for Fedora on the correct hard disk, and click the Create button (sda=1st disk, sdb=2nd, sdc=3rd).
    • In Create Storage, select Standard Partition, and click Create.
      A new window will open. First create the Linux EXT4 partition.
      • In Mount Point:, select / (a forward slash).
      • In File System Type:, select ext4
      • In Allowable Drives, all drives can be enabled
      • In Size (MB):, enter all available space (for Fedora) except 2 GB (for the Swap File)
      • Leave Fixed size checked.
      • Click the OK button.

    • You're back in Please Select A Device.
      Now highlight the remaining Free space, and click the Create button.
    • In the next window, select Standard Partition, and click Create.
      A new window will open. Now create the Swap partition.
      • In Mount Point:, leave it blank.
      • In File System Type:, select swap.
      • In Allowable Drives, enable ONLY the drive used by Fedora (like sda or hda).
      • Tick to enable Fill to maximum allowable size
      • Click the OK button
      Take a moment to look at the partitions to be created and Formatted.
      They're marked with a tick and no other partition should be ticked.

      Click NEXT when ready, or click Back to recreate partitions.
      Click Write changes to disk when ready and now the new partitions will be created & formatted.
    • The next screen is vital to ensure the correct location for GRUB.
      • The Install boot loader on /dev/sda check box is ticked (enabled). That's the correct option for overwriting the Windows MBR and boot loader with the Linux version. Leave it ticked.
      • Using a boot loader password is optional.
      • The following option may not be available.
        Under Boot loader operating system list,
        highlight the Device labelled Other and click the Edit button.
        • In Label, enter a name like "Windows 7".
          Leave Default Boot Target unchecked unless you want Windows 7 to be the default.
        • Click OK.
    • Click Next and the install process will start.
    • Reboot the computer when Fedora installation is finished (remove the DVD).
      Boot to Fedora and it will quickly finalize its setup.
  3. Restart computer again.
    Press any key (within three seconds!) when you see Press any key to enter the menu to access the Linux boot menu which will allow you to select Windows 7 or Fedora.

Congratulations! You have created a GRUB-controlled natural dual-boot of Windows 7 and Linux Fedora 16 when Windows 7 was installed first, and the Windows-created MBR and boot loader have been replaced by the Linux version (GRUB).

Finished!

[top of page]

Help! I want Windows-control back again!

The Windows boot loader can be recovered relatively easily. Please note that doing this will stop you booting to Linux Fedora.

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

If you installed Linux's GRUB to the MBR:

Bootup your 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 7/Vista 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 7, 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.
    Click the Finish button when it appears.
  • Restart computer.
    Windows 7 should boot as originally.

If you want to use the hard disk space currently allocated to Fedora:

  • Boot to Win7 and open 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 just a few second you will have all the Linux space back in Win7. Restart computer.

[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