Need help for re-installing Linux Grub on my computer.
Thanks.
Linux Grub
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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:
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:
Now save that file.
Then once you've done that... fire up GRUB:
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.
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 30GBSo you start with:
Code: Select all
timeout 10
root (hd0,0)
title=Linux
kernel (hd0,0)/boot/kernel-2.6.10 root=/dev/hda1Then 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 #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.