Saturday, 28 November 2009

Hosing the dual boot and recovering from it

I recently installed Fedora 12 in a PC that came pre-installed with Vista. Usually, Windows XP and even Windows 7 is happy to get loaded by Grub - so I went ahead and installed Grub as the default bootloader. Everything went fine until I tried to reboot back to Vista and got the following error message:

BOOTMGR is missing. Press Ctrl+Alt+Del to restart.

I followed many articles in the internet that all advocated using either the Vista startup recovery tools or the command prompt but none worked. So for posterity here's how I fixed the issue:

1. Boot the computer using a Vista CD

2. Select the Language and Keyboard layout from the first screen and click Next.

3. Click on Repair your computer in the next screen.

4. Select your Vista installation from the dialog box and click next.

5. Click on Command Prompt to start a new command prompt

6. Type the following command:
bootrec /FixMbr

7. Type exit to close the command prompt. Then hit the Reboot button.

8. The computer should now boot back to Vista..hurrah! but where's the Fedora installation?

9. Pop the Fedora DVD in to the drive and reboot the computer

10. Select the Rescue option from the Fedora DVD boot menu

11. The installer will prompt you with a few questions (Which unfortunately I can't remember now). They are fairly obvious and simple questions so there should be no issue in getting past them.

12. Finally the installer will mount your Fedora installation into /mnt/sysimage and provide you with a menu to start a shell or reboot. Select the option to start the shell.

13. Run the following command to see a list of partitions:
fdisk -l

14. You have to figure out the device path of your Linux partition. This is usually where /boot is mounted or if you don't have a separate boot partition, where / is mounted. In my case it was /dev/sda5

15. Run grub-install with the correct device path to install Grub in the Linux partition.
grub-install /dev/sda5

16. Now exit the shell and reboot the computer. (Remove the Fedora disk from the drive to prevent booting from the CD)

17. You will boot back to Vista.

18. Download and install EasyBCD (

19. Run EasyBCD and click on Add Remove Entries

20. Click on the Linux tab and select the drive where Grub was installed from the Drive drop-down. You can optionally change the name from "NeoSmart Linux" to "Fedora" if you like.

21. Click Add Entry to save the entry.

22. Restart the computer. You should now be presented with a boot menu. Select the Fedora option (If you named it Fedora in the previous step) and Fedora should boot up!