Reinstalling GRUB bootloader

Bob McClure Jr robertmcclure at earthlink.net
Wed Nov 2 20:12:13 UTC 2005


On Wed, Nov 02, 2005 at 02:58:03PM -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 ??  
> 
> mylar

Boot from CD 1 of your FC3 distro to rescue mode.  At the boot prompt
put

  linux rescue

Answer the dialogs.  At some point it will offer to find your
installation(s).  Let it do so.  If you have more than one, it will
ask which you want.  Otherwise it will inform you that the (selected)
system has been mounted on /mnt/sysimage and leave you at a shell
prompt.  Then you (assuming your boot drive is /dev/sda)

  chroot /mnt/sysimage
  grub-install /dev/sda
  exit
  exit

Yes, exit twice - once from the chroot and once from the shell and it
will reboot.  Pop out the CD and you should get the GRUB screen.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure at earthlink.net  http://www.bobcatos.com
Peace at any price is inflationary.




More information about the Redhat-install-list mailing list