l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Nov 25 22:37

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Reinstalling GRUB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Reinstalling GRUB

Ken Bloom wrote:
On Tue, Nov 25, 2003 at 11:05:16AM -0800, Robert G. Scofield wrote:

Can someone tell me how to reinstall GRUB from the command line?

I had to reformat my Windows partition and so GRUB got eaten. I checked various documentation, and even asked SuSE Support how to reinstall GRUB, but no one has given me the answer.
There is a simple command for reinstalling LILO. If I type /usr/sbin/grub I get a GRUB> prompt, but then I don't know what to do next.

There is some way of entering commands at the GRUB commandline that will install grub, but I don't know what it is - /usr/sbin/grub is a copy of the bootloader itself but I don't know what its capabilities are.

Since no one has illustrated this yet, I'll share what little I know. I've recently learned to do this from the Gentoo install instructions (http://www.gentoo.org/doc/en/gentoo-x86-install.xml). From shell,

grub> root (hdX,Y)
grub> setup (hdX)
grub> quit

That's it! hdX,Y is your boot partition (e.g. hd0,0 = /dev/hda1) and hdX is where you want grub installed (e.g. MBR of /dev/hda). The gentoo install instructions gives more details and is very clear. Also, make sure your /boot/grub/grub.conf file is correct.

Some of you may be asking, how do I run grub and fix my boot loader if I can't boot into Linux? Just boot off of a floppy or CD, such as KNOPPIX or your Linux installation CD.


Use the grub-install command which should be in the same directory.

I finally figured out how to do it with YAST, and so I'm okay. But I've seen too many GNOME and KDE GUI programs fail, and for something as important as installing a bootloader when Windows is in the neighborhood, I would feel more secure if I could reinstall GRUB from the command line.

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.