
How do you fix a dual boot system if you had to reinstall Windows Vista and you can no longer boot to Fedora Core 6 (FC6) or Fedora Linux ? Nobody wants to reinstall FC 6 or Fedora Linux again!
Almost all versions of Microsoft Windows (including XP, Vista and old versions) overwrite GRUB bootloader in
MBR (master boot record). As a result Windows boot loader becomes a new boot loader and GRUB will not appear on screen (you will not able to see GRUB menu options).
But don't worry you can easily fix the problem. Following instuctions are Fedora Linux only and should work with RHEL / CentOS too:
Step #1: Boot from Fedora Core Linux 1st CD or DVD
Set BIOS to boot from CD/DVD rom. At boot: prompt type command
linux rescueboot: linux rescue
Just follow on screen instructions, when prompted let installer search Linux installation. If the search operation is successful, your old Linux installation will be available at special directory called
/mnt/sysimage.
Step #2: Prepare system for GRUB reinstallationType the following commands at shell prompt:
# chroot /mnt/sysimage
# cd /boot/grub
chroot command allows to run rest of all *COMMAND* with root directory set to NEWROOT called /mnt/sysimage. Without chroot environment you will not able to restore GRUB on Fedora Core 6.
Step #3: Find out your GRUB bootloader installation locationIf you have only one IDE hard disk default should be /dev/hda. You can use any of the following command to determine your device name:
# grep '#boot' grub.conf
Output:
#boot=/dev/sda
Above output clearly point out that /dev/sda device where my GRUB bootloader was previously installed.
You can also try out fdisk -l command to list partitions and disk information:
# fdisk -l
Step #4: Reinstall GRUBUse grub-install command to install GRUB on your drive /dev/sda
# grub-install /dev/sda
Please note that if above command returned any error return with --recheck option to probe a device map even if it already exists
# grub-install --recheck /dev/sda
Step #5: Reboot systemExit from chrooted environment and reboot Linux:
# sync;sync;exit;exit
# reboot
Now GRUB will be able to boot both Windows Vista / Windows 7 and Fedora Core 6.