Recovery

You're tired. Its been a long day and you turn off your computer, only to realise that when you turn it on next, LILO has decided for whatever reason that it won't load your system. Eek. What to do? Well, here is a generic fix for that (You'll need some kind of recovery CD or floppy such as Knoppix or tomsrtbt).

  1. Boot off rescue CD.
  2. Some rescue CDs won't mount your hard drive, in which case you'll need to mount it yourself. The partition is "/", something like:

mount -o rw /dev/hda2 /mnt

(Where /dev/hda2 is your device partition for the normal "/" partition -- mounted on "/mnt").

  1. Knoppix and others do mount your hard drive for you.
  2. It is recommended that you bind-mount your /proc directory:

mount --bind /proc /mnt/proc
  1. If you are running a 2.6 kernel, bind-mount your /sys directory:

mount --bind /sys /mnt/sys
  1. If you are running udev or devfs, bind-mount your /dev directory:

mount --bind /dev /mnt/dev
  1. Set up a chroot so that you can access everything correctly on the mounted partition.

chroot /mnt /bin/bash
  1. Mount your /boot drive under /mnt (if you don't have a /boot partition, then you can safely ignore this). Note, substitute /dev/hdaX as appropriate <PRE>mount /dev/hdaX /boot</PRE>

  2. If need be:

vi /etc/lilo.conf
  1. Then:

/sbin/lilo -v
  1. Check that there are no errors and:

exit 
init 6
  1. Remove your rescue CD/floppy whatever, and you're done. Fixed.

LinuxHints/LostLILO (last edited 2006-08-03 11:36:31 by 88)