Help recovering damaged LILO

Help recovering damaged LILO

Post by Sorin Voinigesc » Fri, 14 Jul 1995 04:00:00

I've had Yggdrasil fall-94 Plug-and-Play Linux running on a P90
machine smoothly for more than 6 months. I've got LILO installed
on the hard disk (540MB). The lilo.conf file is set-up to boot
linux (/dev/hda2) or, if interrupted in the boot line, msdos (/dev/hda1).
I normally boot linux from the HD and DOS from a floppy, though.

The other day, my son turned off the system while looping in a DOS game
and damged LILO (how is it possible from DOS?). He claimed he booted DOS from
the hard drive (LILO boot line) because the game would not run (lack of
enough memory) if booted from the floppy.

I've tried everything in "Running Linux", as well as in the
Yggdrasil documentation but could not manage to make
LILO run as before. It now reboots directly (and only) into DOS.
I've rebooted Linux using the Yggdrasil floppy and the CD (does not
reboot without the CD), mounted /dev/hda2 (Linux partition) and the files
appear to be undamaged (checked them with fsck).
The only hint of a problem is that, when running lilo
from /mnt/sbin (HD) or from /sbin (CD), I get the following error message:

open_bsect open /dev/sda: No such device

My lilo.conf does not use /dev/sda

Recopying lilo from the CD hasn't solved anything.

Here is my lilo.conf (disregard typos, it used to work nicely)

timeout = 100
install = /boot/boot.b
boot = /dev/hda2
vga = normal
ramdisk = 0
root = current
map = /boot/map
message = /boot/boot.message
image = /vmlinux
  label = linux
other = /dev/hda1
   table /dev/hda
   label = msdos
other = /dev/hda2
other = /dev/hda3
other = /dev/hda4

My hard drive is partioned as follows:

hda1: DOS approx. 100 MB (active)
hda2: Linux native approx. 400 MB
hda3: Swap space approx. 26 MB

If I deactivate the DOS partition LILO starts rebooting in
Linux, from the HD, but stops at


indicating a mapping problem (I suspect because I toggled the activation flag).

Is there a way of recovering LILO without having to reinstall Linux?
I hate to back-up 350 MB and to patch up all initial problems.

Thanx in advance,


P.S. Please also send e-mail  when you reply to this post.


Help recovering damaged LILO

Post by Mike McClou » Wed, 19 Jul 1995 04:00:00

Try removing LILO from your boot partition by running "fdisk /mbr 1" from Dos.
reboot linux using your boot floppy & reinstall LILO.

--good luck.


Help recovering damaged LILO

Post by Sorin Voinigesc » Thu, 20 Jul 1995 04:00:00

For those who might encounter the same problem,
I managed to solve it without having to run the dreaded "fdisk /mbr 1" from

What I did was to mount the hd on /mnt (after booting from the original floppy
and CD):

mount -t ext2 /dev/hda2 /mnt

Then I modified the lilo.conf file on the hd (/mnt/etc/lilo.conf)
by prepending  /mnt to all paths and reran LILO:

/mnt/sbin/lilo -C /mnt/etc/lilo.conf

I got the correct message:


(I'm not sure about the last two lines)

Then I rebooted the system and now it works smoothly, just like before the

Good luck!



1. how to recover from a damaged system disk?

Boot from a set of maintenance diskettes and select the tape as your
installation source.  Put the backup tape in the drive and continue
with the installation.  This will recreate/restore / and /usr.  You
will have to use 'smit' to re-define your devices (printers and
terminals, etc.).

The maintenance diskettes create a ram disk; they do not use the hard
disks.  The bootstrap logical volume is /blv.  It contains the system
images that boot the system.  It has to be in the root LV, but does
not require contiguous PPs.

If the user partitions (I assume you mean LVs) are/were in the root
VG, the reinstall will leave them alone.  You may need to edit
/etc/filesystems and replace the entries.  If the user LVs are in
another VG, you may need to re-import the VG using 'importvg'.

Hope this helps.  Good luck.

2. KFM Error

3. RedHat4 Install Help

4. How to recover data from a damaged NTFS partition?

5. Unix System Security

6. Help! have I done serious damage with LILO?

7. Redhat Linux 8.0 and problems therein

8. Recovering data off a damaged? Solaris drive...

9. How to recover a damaged ext3 partition?

10. Recovering data from a damaged ext2 partition?

11. Recover data from a damaged vg

12. How to recover damaged tar file