[Wylug-help] Re-installing GRUB - was Re: Restoring /boot and MBR

John Hodrien johnh at comp.leeds.ac.uk
Thu, 16 Jan 2003 14:17:13 +0000 (GMT)


On Thu, 16 Jan 2003, Gary Stainburn wrote:

> Hi folks,
>
> I'm just about ready to attempt repairing my HD.
>
> I recon that from the /proc/partitions info I can rebuild the partition table
> using fdisk.
> Then I can
>
> mkfs /boot
>
> and
>
> rpm -i --force kerne*rpm grub*rpm
>
> to rebuild my /boot partition.
>
> My question is, which chickens do I need to sacrifice to get grub working
> again.  Whe I did this on a testbed system, I just got the to GRUB prompt and
> nothing else happened.

You setup the grub.conf file, it normally has an example at the top.  Here's
mine:

title Red Hat Linux (2.4.18-19.8.0)
root (hd0,4)
kernel /boot/vmlinuz-2.4.18-19.8.0 root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0.img

hd0,4 is grub speak for hda4.  Advantage of using grub is when  you get it
wrong, and you're sat at the grub prompt, you can type and test interactively.

> I assume I've got to call grub-install with some secret pagan chants while
> the sun is just showing over the horizon.  Does anyone know exactly how it
> goes?

grub-install /dev/hda

That should be it.

jh

--
"...you died a good death if your life had inspired someone to come forward
 and shoot your murderer in the chest, without asking to be paid."
                                                     -- Chinua Achebe