the following happens when you boot your system:
1. the BIOS starts a program called 'stage1'.
2. stage1 looks for and starts a larger program called 'stage2'.
3. stage2 to starts the 'kernel'.
4. the kernel starts a program called 'init'.
5. init starts everything else on the system.
Thus, in order to boot your OS, first the bios must find 'stage1'.
It looks like a simple reinstall of grub should do the trick But how?
1. slip in an emergency disk, such as 'knoppix' or 'system-rescue'.
2. at the command line, type:
#grub (this starts the grub program).
grub> (your shell should now look like this)
3. at the grub prompt, type:
grub> root (hd0,2) #just a sample line!
(this represents how the BIOS sees your hardrives--bios starts numbering from 0. So, using the example above(which is ONLY an example), bios sees your root partition is on the first hardrive(thus the '0') and the third partition of that drive( thus the '2'). Remember: the bios starts numbering from 0. Your OS starts numbering from '1'. Thus the same root partition represented from the OS's view would be: 'hda3'. Let's compare, side by side:
Bios View of partition OS(Fedora,Ubuntu,Suse, Debian) of same partition
hd0,2 -------------------hda3 (how bios/os sees the same partition)
hd3,4 ------------------ hdc,5
hd0,6 ------------------ hda,7
Note: the Bios always represents both the hardrive and partition with NUMBERS and a comma in between. The OS uses letters for the hardrive and numbers for the partitions on that drive.
How to reinstall grub:
1. find out on which partition you've installed root. Right this down.
2. install an emergency disk, like knoppix or sys-rescue.
3. run the grub program:
#grub
grub>
4 from grub prompt, type:
grub> root (hd#,#) (this is wherever root is as the bios sees it)
5. next, type:
grub> setup (hd0) (this install grub--stage1 and 2--on the MBR--master boot record)
6. finally, type:
grub>reboot
7. Success! No? Then be sure of the following:
1. You chose the correct partition for the root directory.
2. you typed the above commands correctly.
3. Your 'menu.lst' file is properly edited.
Good Luck!
