Reinstalling GRUB bootloader

Rick Stevens rstevens at vitalstream.com
Wed Nov 2 21:50:00 UTC 2005


On Wed, 2005-11-02 at 14:58 -0500, mylar wrote:
> Hi folks... My dad has a dual boot computer in his home office currently
> booting Windows XP and Fedora Core 3. Windows XP resides on an 80 GB
> SATA drive and Fedora resides on a 200 GB IDE drive. The boot sector is
> on the SATA drive. Recently  the SATA drive crapped out and the machine
> will no longer boots XP. GRUB still comes up fine however and the
> machine still boots into Linux just fine. Now, here comes the kicker...
> 
> Since  it's a Dell machine and is under warranty Dell is sending me a
> new replacement SATA drive. Problems is, once I install it and
> re-install XP on it I know I am no longer going to see GRUB on startup
> and the machine is going to boot into Windblows only. 
> 
> So here's the question. How do I reinstall GRUB ?? In the old days with
> LILO it was easy, just boot Linux off a  floppy and run "$ lilo". But
> nowadays the kernel images are too big to fit on a floppy. So what are
> my options ??
> 
> Can I make a boot CD Rom or DVD and boot in from there and reinstall
> GRUB ?? Can I used the fedora Core 3 distro discs ?? Can I use a Linux
> distro on CD (such as Knoppix) and fix it from there ?? if so, what do I
> do ?? How do I get my  boot info back where it belongs ?? Do I have to
> re-install Fedora from scratch ?? 
> 
> In other words HELP !! What do I do ?? How do I make the machine dual
> boot again ?? How do I get GRUB back ??  

Boot off the FC3 rescue CD in rescue mode.  Then:

	# chroot /mnt/sysimage
	# cd /boot
	# grub-install /dev/hda
	# exit
	# exit

(yes, two "exit"s...the first exits the chroot environment, the second
reboots the system).  Pop out the CD and it should boot up just like
always.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-         Okay, who put a "stop payment" on my reality check?        -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list