Hello Brothers,

I had posted the following post as an aswer to a question regarding linux installation.
But still there are a few who don't know what to do when a linux machine crashes.

Here is a tutorial on Linux Rescue

If by some means u loose ur lilo, follow these steps:
1. Boot with Redhat Cd no.1
2. Type
linux rescue <enter>
3. Follow the instructions (u will have to press enter key twice)
4. After this Redhat searches for redhat installation on the disk and mounts it into /mnt/sysimage
5. u'll get a shell prompt #
6. type
#chroot /mnt/sysimage
7.U r ROOT here
edit ur /etc/lilo.conf
8. run lilo
#lilo -v
9. reboot
(now it should work)

Suppose u don't have a Redhat Installation CD I (Which automatically detects your Redhat Installation and mounts it under /mnt/sysimage) :
But u do have the installation CD of any other popular distribution ( or a rescue CD ),then these are the steps to follow :

1. Here I'll assume that u got the rescue shell prompt
#
2. type
#fdisk -l or
#fdisk /dev/hda then p (to get the partition list)
3. Note down the number of all your linux partition (eg. /dev/hda5)
4. create a directory and mount your / partition (if u know) into this directory.Otherwise do trial and error.If the partition was / partition, the directory will contail etc,bin,sbin,boot etc.
#mkdir test
#mount /dev/hda6 test
#cd test
#ls

if it shows directories etc,boot,bin,sbin, etc then ok.Else try mounting other linux partitions.
Once that is done.
#cd ..
#chroot test

5. But that is not all.If u had a separate /boot partition u should mount that into boot directory.B'coz it is in this directory that your linux kernel resides (eg. vmlinuz )
6. Now make changes to /etc/lilo.conf (if necessory) and run lilo
#lilo -v
#reboot




To install GrUB type
#grub-install /dev/hda



Uninstall lilo
#lilo -u



Uninstall GrUB

There is no provision of uninstalling GrUB in linux (as far as I know). But if ur machine has Win98,type
c:\>fdisk /mbr

But if u have Win2000 or XP
1. Boot with installation CD
2. Enter into recovery console by pressing R when asked
3. there are some more steps before u get the prompt.But i will assume here that u got the prompt
4. Type
fixmbr
5. Reboot