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. Please note that if you are using Debian or Ubentu Linux just follow these instructions. 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 rescue
boot: 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 reinstallation
Type 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 location
If 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.confOuput:
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 GRUB
Use 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 system
Exit from chrooted environment and reboot Linux:
Now GRUB will be able to boot both Windows Vista and Fedora Core 6. In UNIX/Linux dd command can be used to backup and restore the MBR :)Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?