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 >


Dual-Boot: Install free Fedora 20 on a Windows 7 computer
(Windows installed first and retained)

Last reviewed: May 2014

Introduction

This guide shows how to create a natural dual-boot of Windows 7 and free Linux Fedora 20 ('Heisenbug') when Windows 7 is installed first.

The Fedora 20 installation setup adds Windows 7 to its GRUB2 boot loader but, unlike most earlier versions, does not allow you to select a location for its GRUB2 boot loader. Fedora 20 automatically takes control of the startup with its own MBR/boot loader instead of the Windows version. This is great for users who prefer a Fedora-controlled dual-boot.

However many users would prefer to have Windows in control. Fortunately the free EasyBCD editing utility can be used after Fedora installation to add a Fedora 20 boot option to a Windows boot loader menu and then restore a Windows MBR and Windows boot loader. You would then have the dual-boot on a Windows-controlled computer.

The guide shows how to correctly setup the dual-boot and then how to get back Windows control if that's what you prefer.

In this procedure you need to shrink the Windows 7 drive to make room for Linux Fedora 20. A 64-bit Fedora 20 (GNOME) was used for testing. The test computer was a 64-bit Dell Studio XPS 8100 (2.93 GHz), Core i7, 8 GB RAM DDR3, NVidia GeForce GTX 460, 1 TB SATA hard disk. The computer 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?

The procedure used is suitable for experienced home computer users.


Important Installation Notes

Shrinking a Windows 8, 7 or Vista drive. You should use Shrink in Windows' Disk Management to resize the Windows partition. Read Shrink the Windows 8, 7 or Vista Partition for instructions on completing this task successfully. Use the free GParted Live CD only if you must - read 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/Vista boot menu (the BCD or Boot Configuration Data). EasyBCD runs in Windows 8, 7 and Vista, but also in Windows XP if you first install Microsoft's free .NET 2.0 Framework.

[top of page]

Install Linux Fedora 20 when Windows 7 was installed first

  • Installing other operating systems on your Windows 7 computer may invalidate your warrantee.
  • Please follow the instructions exactly as stated and you should start with a properly working Windows.

A. Make your preparations

  1. Backup important data before making any changes to a partition.
  2. Download the free Fedora 20 Live CD (GNOME); 64-bit for a 64-bit computer. Create the Live CD from the .ISO file.
  3. Optional: Download Neosmart's EasyBCD (free - it simplifies editing the Win8/7/Vista boot loader).
  4. Disconnect all external devices before you start.

B. Make free space (Unallocated) for Fedora 20

  1. Restart Windows computer correctly (close all programs/software before Restart).
  2. Open Disk Management in Windows 7 (right-click Computer, select Manage, click Disk Management).
    • Right-click the Win7 volume, and click Shrink Volume.
      • In Enter the amount of space to shrink in MB: enter enough for Fedora's partitions.
      • 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. if you must, use the free GParted Live CD. Then return here.
  3. Restart to Windows 7 - always restart after changing disk configuration.
    • Open Disk Management and check that the change made is correct.

C. Install Fedora 20 and keep Windows 7 as a dual-boot

In this example partitions are Automatically configured by setup using Standard partition scheme . This creates the three Linux partitions most commonly used (boot, root and home). A Fedora-controlled dual-boot will be created automatically by the installation. Windows-control can then be easily re-created (optional) and the dual-boot kept or Fedora removed. Laptops should be kept on charge during installation.

  1. Bootup from the Linux Fedora 20 Live CD (GNOME), select Start Fedora Live, select Install to Hard Drive.
  2. In Welcome to Fedora 20,
    first select your Language and click the Continue button.
  3. In Installation Summary. check the keyboard setting.
    Now click on Installation Destination in System.
    • Select the destination hard disk (a tick will appear on it).
    • Click the Done button.
  4. In Installation Options,
    select Automatically configure ..., and
    in the Partition Scheme drop-down, select Standard Partition.
    Click the Continue button.
  5. Back in Installation Summary, check the entries.
    Click Begin installation when you're ready. Installation will start while you complete the following.
  6. In Configuration screen, set a Root Partition.
    Then in Create User
    • Optional: Enable Make this user administrator.
    • Optional: Disable Require a Password to use this account or enter a password.
    • Click Done.

    When installation finishes, restart computer and remove the DVD during startup.
    Boot to Fedora 20.
    Follow the on-screen instruction to complete the installation and let the Getting Started screens run.
    Restart computer again and select Windows 7 at bottom of the boot menu within 5 seconds.

Congratulations! You now have a Linux-controlled natural dual-boot of Fedora 20 and Windows 7.

[top of page]

D. Optional: Put Windows 7 back in control and add a Fedora 20 boot option to it

This section is only for users who want to return control of the computer to Windows 7 with Fedora 20 as a bootable option from the Windows 7 boot menu.

  1. Restart to Windows 7
  2. Install and run the free EasyBCD editing utility.
    Click Add New Entry in the left pane.
    • Click the Linux/BSD tab under Operating Systems in the upper right pane.
      • In Type, select Grub2 in the drop-down.
      • In Name, use a name like Linux Fedora 20.
      • In Device, it will be Automatically configured - that's correct.
      • Click Add Entry in the same pane.
    • Optionally, you can now modify the timeout of the boot loader menu
      • Click Edit Boot Menu (left pane) and set the Count down from to about 5 seconds.
      • You can also change the OS that boots by default (tick the box you want as Default).
      • Click Save settings when finished.

    Now use EasyBCD to return boot control to Windows 7
    Click BCD Deployment in the left pane.
    • Under MBR Configuration Options,
      • Enable Install the Windows Vista/7 bootloader to the MBR.
      • Click the Write MBR button.
    Exit EasyBCD.
  3. Restart computer. Select either Fedora 20 or Windows 7 from the Windows 7 boot menu.
Note: A second menu (original) appears for Fedora - unless you set GRUB's timeout to 1 - read below.

Congratulations! You now have a Windows-controlled natural dual-boot of Windows 7 and Fedora 20.

Footnote:
EasyBCD may create an NST folder on the root of the Windows partition when it adds an operating system to the Windows 7 boot loader. This NST folder contains file(s) vital to booting the added OS. Do not accidentally delete it!

[top of page]

Change Fedora's boot menu Timeout when Windows 7 has boot control

If you change Fedora's menu Timeout to 0 seconds then Fedora still boots but its menu does not appear. Setting it to 1 second is safer - just in case you need the Fedora menu at a later time for troubleshooting.

  1. Boot to Fedora 20.
  2. Open a Terminal. Type in this command line in Terminal and press Enter:
    sudo gedit /etc/default/grub
    you may need your password
    • GRUB opens in Gedit. Carefully change the Timeout to timeout=1
    • Click Save (not 'Save as')
    • Close Gedit
  3. Back in Terminal, implement your change by using:
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    (that -o is a minus and the letter o)
    Exit Gedit when it's finished
  4. Restart computer and look for the timeout effect
    (press the spacebar or down-arrow to stop Timeout counting down).

[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 from this dual-boot, and regaining its disk space, is quick and painless.

  1. Run EasyBCD in Windows 7.
    • Click Edit Boot Menu in the left pane.
      • Highlight the Linux entry in the right pane.
      • Click the Delete button.
      • Click the Save Settings button.
    • Skip this part if Windows-control has already been established.
      Click BCD Deployment in the left pane.
      • Under MBR Configuration Options,
        • Enable Install the Windows Vista/7 bootloader to the MBR.
        • Click the Write MBR button.
    • Exit EasyBCD.
  2. Open Disk Management (right-click Computer, select Manage, click Disk Management).
    • Right-click each Linux partition in turn, select Delete Volume..., click Yes.
      Right-click a remaining Free partition, select Delete Partition, click Yes.
    • 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 Windows. Restart computer.

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 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 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