[YLUG] What''s the command to reinstall grub menu?

mike cloaked mike.cloaked at gmail.com
Tue Sep 13 08:36:48 UTC 2011


On Tue, Sep 13, 2011 at 9:32 AM, mike cloaked <mike.cloaked at gmail.com> wrote:
> On Tue, Sep 13, 2011 at 8:34 AM, ALEX ARMANI <alex.armani at live.co.uk> wrote:
>>  What''s the command to reinstall grub menu?
>>
>> Hi all. I need to reinstall my grub menu cos it's coming up with an error at
>> boot. What's the command to use from a live disk to scan the hard drive for
>> OS's and reinstall the Grub menu? You know what I mean! Tia from Alex &
>> Genipher.xx
>
> Usually (certainly in Fedora which I use) when you boot to a live or
> rescue image, you need two commands:
> chroot /mnt/sysimage
> grub-install /dev/sda
>
> (or whichever drive you want grub to be installed on)
>
> For the next generation Fedoras, and presumably some other distros, if
> you are using grub2, then grub2-install /dev/sda or equivalent should
> do it.
>
> This presumes that it is only that the mbr has been overwritten and
> needs restoring.
>

If you have grub in the mbr but you had gotten your grub.conf
corrupted then you will need to re-write that file either from a
backup that you took (and you always keep backups for this
eventuality?) - or write grub stanzas as necessary to pull in the
necessary OS'es you have on your system with their initial ramdisk
files under /boot/

If you are a grub2 user then you will need to look at the grub2 documentation.

Hopefully you only needed to re-install grub into the mbr on the drive!

-- 
mike c



More information about the York mailing list