Linux Grub

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
hytechpro
Forum Newbie
Posts: 6
Joined: Fri Sep 16, 2005 7:41 am
Location: INDIA

Linux Grub

Post by hytechpro »

Need help for re-installing Linux Grub on my computer.

Thanks.
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

hm...
I don't like the signature....
Looks like...
Asking any questions just let them chek on the url.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Link removed as it had nothing to do with the linux grub problem.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Installing GRUB is fairly easy.

Make sure you have the files installed before you start.... I'll assume you do since you say "re-installing". I'm also assuming a standard linux filesystem with the grub files located in /boot/grub.

Up, in your favourite text editor /boot/grub/grub.conf.

Before we edit this file we need to know a few things about your hard disk and where the OS resides.

Lets says you have a partition table like this:

Code: Select all

/dev/hda1           /                  25GB
/dev/hda2           swap          1GB
/dev/hda3           /windows    30GB
So you know that the root partition that the OS is on is /dev/hda1. GRUB sees that as (hd0,0) (First disk, first partition). Numbering starts at zero.

So you start with:

Code: Select all

timeout 10
root (hd0,0)
title=Linux
kernel (hd0,0)/boot/kernel-2.6.10 root=/dev/hda1
Now save that file.

Then once you've done that... fire up GRUB:

Code: Select all

linux #  grub
grub> root (hd0,0)
Found reiserfs blah blah blah....
grub> setup hd0
Checking for stage1... OK
Checking stage 2 ... ok etc etc
MBR written to hd0 succesfully
grub> quit
linux #
Now just reboot.

I'd advise levaing the timeout in the grub.conf in case it doesn't boot. Then you have time to either edit the config at the boot screen or simply type in the boot command manually.
Post Reply