Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!

General discussion


How to install Grub

By yukon0196 ·

I used to have XP and Fedora 5 running in the same computer, using Grub as the boot loader.

I had to reinstall Windows, and yes it over wrote the MBR. Now my system boot Windows only.

How can I install grub again, and keep my old linux installation? I tried rescue, but I have no idea what was to be done! I also tried to run the setup, get the bootloader options, but then I had to install fedora again! I just wanted ti install grub, isn't there a GUI version of the grub setup?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Are you getting the grub prompt?

by jmgarvin In reply to How to install Grub

You should still get the grub prompt and you should see:
grub >

So here is what you do:
grub > root (hd0,0)
grub > setup (hd0)
grub > quit

So, you machine might be a little different. What hd(0,0) means is the first hardrive and the first partion. That means that if you have one hdd, that the first 0 is correct. The second 0 might change. Where does /boot live? I would assume if you installed Windows as well as Linux, you have a partion scheme like:

So, if /boot lives anywhere else, you might have to change the partion number to where it really lives.

edited to remove some crack smoking comment about sd and not hd....which is wrong and stupid...and probably evil, but it's hard to tell.

Collapse -

grub prompt ?

by yukon0196 In reply to Are you getting the grub ...

I'm not getting the grub prompt, when I run rescue it offers me to mount the systemimage, or make it "Read Only", or skip. How can I get the grub prompt?

Now if I got to the grub prompt, my system is partitioned as:

/boot (102MB)
/ (this file system uses a logical or a virtual partition that includes a swap space and the actual ext3 file system).

I assume the grub needs to be installed in the third partition, "/boot". And probably a pointer to that partition from the first sectors (maybe in the NTFS partition).

If this is right I really don't need to install grub, but to update the MBR that was overwritten by windows when I installed it. This means the grub is still there, but needs to be pointed at when the computer first starts.

Where am I going,

What's next?


Collapse -

Without the CD

by jmgarvin In reply to grub prompt ?

Does it just boot to Windows or do you get the grub prompt?

If it just boots to Windows, you'll have to use the rescue CD....If it gives you the grub prompt, then follow my previous directions.

If it doesn't you'll have to boot with the resuce CD. Once you boot with the rescue cd make sure to chroot into the system.

Once chrooted type

That will bring you into the grub command shell. Now type:

grub> root (hd0,3)
grub> setup (hd0)
grub> quit

Double check your grub.conf in /boot/grub/grub.conf

Make sure Windows points to hd(0,0) and Linux points to (hd0,2)

That help?

Collapse -

Re: Grub Install

by parthagoswami06 In reply to Without the CD

1. Insert the Linux disc 1/ DVD .
2. Then type
# linux rescue

3.type # chroot /mnt/sysimage
4. then type ,
#grub-install /dev/hda
(hda or sda, according to your confgartion.)
5. Then,
# exit
# reboot

Then It Will be done..



Collapse -

rescue cd..

by Jaqui In reply to How to install Grub

install booloader.

GRUB = Grand* Unified Bootloader.

*read Grand as grimy in my opinon, I'll stick with the more customisable, non GRAPHIC DEFAULT LILO.
graphic boot is for idjits that want their system to lie to them.

editing to add:

that's my opinion of a graphic boot into a gui, and it isn't going to change any time soon.

Collapse -

Agreed...but LILO doesn't seem to be supported well anymore

by jmgarvin In reply to rescue cd..

It seems grub is the wave of the future and lilo is dying...

I like lilo, for all its quirks...

Collapse -

it's supported

by Jaqui In reply to Agreed...but LILO doesn't ...

and still being developed.
the Distros are choosing to use the lower quality bootloader.
[ yet another reason to use lfs, you can use whichever bootloader you want. ]:)

Collapse -

Always back up the MBR

by CharlesMcDonald In reply to How to install Grub

It's a little late now but you should always back up your MBR. I use MBRtool (available from ) installed on a bootable MS-DOS floppy.

There appear to be several software utilities that provide MBR editing capabilities. I've never used any and can't recommend that you take that route. It's possible that you will corrupt the MBR and won't be able to boot anything. Make sure you back it up before any editing.

The MBR is not human readable, it contains boot loader code and partition table information.

If you really want to do this then search for "edit MBR" using your favorite search engine and you'll find plenty of possibilities.

Good luck, you're gonna need it!

Related Discussions

Related Forums