Solved

LILO problems (prints LIL, then hands)

Posted on 1998-11-11
31
417 Views
Last Modified: 2013-12-15
I just installed Red Hat 5.0 and ran into some problems. When I try to boot, LILO hangs after printing out LIL. My (relevant) hardware setup is as follows:

- Hard drive 0: Seagate MedaList Pro 9144Mb. 1 primary partition and 4 extended, all FAT16 formatted. NT and win98 resides on the first primary partition.
- Hard drive 1: Samsung WU33205A 3240Mb. 1st and 2nd partition is Linux Native and Swap respectively. 3rd part is 1500Mb FAT16.

My Seagate 9.1Gb hard drive doesn't fully work unless I use Ontrack's DiskManager, which is a software EIDE controller that fixes problems with cylinders > 1024, 8gig restriction, etc.

Furthermore, I use System Commander 4 that lets me boot to Windows NT/98/95, Dos and Linux. It's possible to remove SC4 and not use it, but the DM must be there so I can access my first disk. (Read: no LILO on MBR.)

I installed my Red Hat 5.0 distribution to my second hard drive, chose "Install to superblock of disk" in the installation script and rebooted. It didn't come back up. If I access it through SC4, it just prints "LIL" (w/o quotes) and then hangs. I have to hit the reboot button to continue. Every time that has happened the C partition on my first disk have been marked unactive. This means that SC4 won't work and I have to boot into win98 dos with a bootdisk and set it active with FDISK.

If I boot up with Red Hat's boot.img disk and choose "vmlinuz root=/dev/hdb1" as a parameter, it boots up just fine. After doing that, I made a LILO bootdisk and tried booting with it. It seemed to work, but after a while I got a Kernel panic.

I added Linux to my NTLoader with G. Vollant's Bootpart utility: Same thing as with SC4 -- "LIL" + frozen. This way the C partition on my first hard drive is *not* marked unactive, though.

I'd love to get my Linux back and running... does anyone have any suggestions?

Thanx in advance,

-EE
0
Comment
Question by:EmilEifrem
  • 11
  • 9
  • 6
  • +5
31 Comments
 
LVL 2

Accepted Solution

by:
Neogenix earned 100 total points
ID: 1631603
When you started linux with your boot disk goto /etc and edit the lilo.conf so is will boot from /dev/hdb1 then run lilo.

Good luck!
0
 

Author Comment

by:EmilEifrem
ID: 1631604
I did that, but no luck. It was set to /dev/hdb1 by the Red Hat install script, as it should. It had a reference to /dev/hda though, which I removed. But that didn't help either. :(

Currently my lilo.etc looks like this (I hope linebreaks are handled ok):

boot=/dev/hdb1
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz-2.0.32
      label=linux
      root=/dev/hdb1
      read-only

When I ran /sbin/lilo to update it (after removing the reference to /dev/hda) it gave this output:

Warning: /dev/hdb1 is not on the first disk
Added linux *

Still doesn't help me much. :(

Any more suggestions?
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631605
Try changing the boot to /dev/hda and the root to /dev/hdb or visa versa.
0
 

Author Comment

by:EmilEifrem
ID: 1631606
I don't want to do that. When I first tried to install RH5.0 incompatibilities with my software eide controller (called DiskManager, see above) resulted in a trashed partition table that was a bitch to fix. So I don't want Linux to touch my /dev/hda. Call me paranoid, but during those three weeks of trying to restore my data I promised myself that.

And why would it matter? I mean /dev/hda only has FAT16 formatted DOS/NT partitions. The "Warning: /dev/hdb1 is not on the first disk" suggests that Linux can't be on the second disk, which the manual kinda agrees with. However, I have seen many example files which suggests /dev/hb1 as the root and boot partition so I don't think it can't be done. -shrug-
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631607
Use the linuxconf, goto config -> boot mode and then make a new lilo.conf file. Put a one second delay in so that it does not boot immediately. If possible do not load the boot kernel into the main boot record.

Good luck
0
 
LVL 2

Expert Comment

by:vx
ID: 1631608
I copied and pasted the following from the LILO helpfiles:

LIL   The second stage boot loader has been started, but it can't load
    the descriptor table from the map file. This is typically caused by a
    media failure or by a geometry mismatch.

Seems to me that LILO can't boot from your harddisk. Did it do so before? Perhaps LILO doesn't detect the geometry correctly, you might want to try to add "linear" to your /etc/lilo.conf (of course without the quotes :))

If this doesn't help, we might want to look for another solution.
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631609
I had this kind of problem on a sytem with only one harddrive and only linux loaded on it.
It started with LIL then hangs. I fixed it by playing with the lilo.conf and running lilo. A short delay and prompt is advisable.
0
 

Author Comment

by:EmilEifrem
ID: 1631610
Sorry for the delay, I was net- and computerless during Friday and Saturday.

Update on my situation: I've followed your suggestions and tried most everything else that I can come up with. I'll list right off what I've done and the results it has yielded. Maybe you experts can see a pattern where a humble newbie as myself cannot.

(DM = Disk Manager: My software EIDE controller
SC4 = System Commander 4: An OS loader that I use for my different OS'es)

1. Boot sequence: DM - SC4 - LILO
Should be `DM - SC4 - LIL' as LILO freezes after the first 3 letters.

2. DM - Red Hat Installation disk (boot.img) - typing `vmlinuz root=/dev/hdb1'
Works fine. This is the only way I can boot my system.

3. Boot as 2, edit lilo.conf, add `delay=x', `linear', `disk=/dev/hda inaccessible', `prompt' blablaetc and everything else, a whole bunch of different configs. All give `LIL'.

4. Boot 2. Make a LILO bootdisk by:

mke2fs /dev/fd0
mount /dev/fd0 /fd
cp /boot/boot.b /fd
cp /boot/vmlinuz /fd
lilo -C /fd/lilo.conf -b /dev/fd0 -i /fd/boot.b -c -m /fd/map

with a lilo.conf looking like this:

image=/fd/zImage
label=linux

and all other possible configurations. `LIL'.

5. Add Linux option to NT-Loader (with bootpart): `LIL'

6. Boot to DOS, run LOADLIN zImage root=/dev/hdb1 ro: Kernel Panic... gives this message:

---
[snip]
ide: i82371 PIIX (Triton) on PCI bus 0 function 57
    ide0: BM-DMA at 0xf000-0xf007
    ide1: BM-DMA at 0xf008-0xf00f
hda: ST39140A, 8693MB w/448kB Cache, CHS=1024/255/63
hdb: SAMSUNG WU33205A (3.2GB), 3090MB w/109kB Cache, CHS=785/128/63
hdc: SAMSUNG SCR-3230, ATAPI CDROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
[snip]
Partition check:
 hda: [DM6:DDO] [remap +63] [1027/255/63] hda1 hda2
 hdb: hdb1 hdb2 hdb3
VFS: Cannot open root device 08:05
Kernel panic: VFS: Unable to mount root fs on 08:05
---

All in all, I'm pretty frustrated at this point. I've tried a whole buncha different things and nothing works.

The way I see it, it may not be a LILO incompatibility. I mean, the only way I have been able to boot up my system so far has been with LILO (see 2). That would explain why LOADLIN doesn't work. And all these options in lilo.conf haven't really given any effect, it just seems like it freezes way before it gets to those.

I have no idea what causes it. The CHS reported for /dev/hdb corresponds with the ones in my BIOS setup, so I don't think that's it. I've tried the `linear' switch several times anyway. And if it's not a LILO problem, I don't think it has anything to do with the fact that it resides on /dev/hdb1 (second disk). And the whole drive has <1024 cylinders, so that shouldn't be a problem.

I'm open to any suggestions.
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631611
If you use linuxconf please tell me the steps that you follow to create a the linux loader.
0
 

Author Comment

by:EmilEifrem
ID: 1631612
I don't. Never used linuxconf, I don't think I have one on my system. I tried `whereis linuxconf' as well as `find / -iname linuxconf' and didn't find anything. I can look again though, if it's important.

What does it do anyway?
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631613
It is only a configuration tool for RedHat (not important)

You can make your second drive seem like it is the first drive by inserting:
disk = /dev/hdb
  bios = 0x80
into your lilo.conf

You can always get lilo to be your default boot loader, but I don't think you what to do that.
0
 

Author Comment

by:EmilEifrem
ID: 1631614
No, I definitely wouldn't want to do that or I coldn't access my neat 9.1 gig drive. :)

As for linuxconf, I just doubled-checked and did a:

find / -iname '*linux*' | grep -i conf

and it revealed nothing. Strange that I don't have it, maybe they introduced it after 5.0?

Anyway, if I change my second disk to BIOS device code 0x80, shouldn't I map my first disk to 0x81? Swap them, so to say. And can this cause any permanent damage (permanent as in, reformat needed)? I don't care about my second disk (/dev/hdb) but on hda I have tons of stuff that I can't loose.
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631615
If you make your lilo.conf look like this your master boot record on your second drive will be overriden. But I do not think that this will do anything to your first drive.

lilo.conf:

boot = /dev/hdb   # or your root partition
disk = /dev/hdb
   bios = 0x80
delay = 0         # or specify a delay in tenth of a second
vga = 0           # optional. Use "vga=1" to get 80x50

image = /boot/vmlinux  # your zImage file
   root = /dev/hda1     # your root partition
   label = Linux        # or any fancy name
   read-only            # mount root read-only

other = /dev/hda3   # your dos partition, if any
   table = /dev/hda  # the current partition table
   label = dos       # or any non-fancy name

or:

boot = /dev/hdb   # or your root partition
delay = 0         # or specify a delay in tenth of a second
vga = 0           # optional. Use "vga=1" to get 80x50

image = /boot/vmlinux  # your zImage file
   root = /dev/hdb1     # your root partition
   label = Linux        # or any fancy name
   read-only            # mount root read-only

other = /dev/hdb3   # your dos partition, if any
   table = /dev/hdb  # the current partition table
   label = dos       # or any non-fancy name

then run lilo -v (-v = verbose)
0
 
LVL 2

Expert Comment

by:vx
ID: 1631616
Did you try the linear option already? When I read the documentation, it seemed to be a solution te me.
0
 

Author Comment

by:EmilEifrem
ID: 1631617
Vx: Aye, I've tested the `linear'-option alone and in combination with a lot of others, and yet nothing has worked. :(

Neo: Ok, I think we're moving forward here. At least something changed. I've tried 3 different setups:

1.

--- lilo.conf ---
boot = /dev/hdb1   # or your root partition
disk = /dev/hdb
   bios = 0x80
map=/boot/map
delay = 40         # or specify a delay in tenth of a second
vga = 0           # optional. Use "vga=1" to get 80x50
image = /boot/vmlinuz  # your zImage file
   root = /dev/hda1     # your root partition
   label = Linux        # or any fancy name
   read-only            # mount root read-only
--- lilo msg ---
[root@localhost /root]# lilo -v
LILO version 20, Copyright 1992-1997 Werner Almesberger

Reading boot sector from /dev/hdb1
Merging with /boot/boot.b
Boot image: /boot/vmlinuz
Added Linux *
/boot/boot.0341 exists - no backup copy made.
Writing boot sector.
[root@localhost /root]#
---
Result: When I rebooted and chose Linux in SC4 it printed out `LI' (not LIL) and then stopped. Also, it didn't freeze my keyboard like before (that is, Ctrl+Alt+Del worked to reboot).

2.

--- lilo.conf ---
Same as 1, except for boot=/dev/hdb instead of boot=/dev/hdb1
--- lilo msg ---
[root@localhost /root]# lilo -v
LILO version 20, Copyright 1992-1997 Werner Almesberger

Reading boot sector from /dev/hdb
Merging with /boot/boot.b
Boot image: /boot/vmlinuz
Added Linux *
Backup copy of boot sector in /boot/boot.0340
Writing boot sector.
[root@localhost /root]#
---
Result: Same as 1

3.

--- lilo.conf ---
boot = /dev/hdb   # or your root partition
map=/boot/map
delay = 40         # or specify a delay in tenth of a second
vga = 0           # optional. Use "vga=1" to get 80x50
image = /boot/vmlinuz  # your zImage file
   root = /dev/hdb1     # your root partition
   label = Linux        # or any fancy name
   read-only            # mount root read-only
--- lilo msg ---
[root@localhost /root]# lilo -v
LILO version 20, Copyright 1992-1997 Werner Almesberger

Reading boot sector from /dev/hdb
Warning: /dev/hdb is not on the first disk
Merging with /boot/boot.b
Boot image: /boot/vmlinuz
Added Linux *
/boot/boot.0340 exists - no backup copy made.
Writing boot sector.
[root@localhost /root]#
---
Result: Same as 1.


With disk=blabla it doesn't print out the `Warning: /dev/hdb is not on the first disk' message, which is nice. It still doesn't work though. I looked in the LILO Readme file on error messages:

"   LI   The first stage boot loader was able to load the second stage boot
    loader, but has failed to execute it. This can either be caused by a
    geometry mismatch or by moving /boot/boot.b without running the map
    installer.
   LIL   The second stage boot loader has been started, but it can't load
    the descriptor table from the map file. This is typically caused by a
    media failure or by a geometry mismatch."

Seems to me they're saying:
`LI' can be caused by two different things: geometry mismatch or moving /boot/boot.b.
`LIL' can be caused by two different things: geometry mismatch or media failure

Common logic says that it should be a geometry mismatch, but this is Linux, what does logic have to do with it. :P

What speaks against geometry mismatch is the fact that on bootup, the correct CHS values are displayed. Well, not correct, but the ones I specified in my BIOS settings. Also, if it were a geometry mismatch, how come I can boot up with my RH installation floppy? If it were, the LILO on floppy should have as much problem as the LILO residing on the hard drive. Right?

I haven't actually tried `linear' together with `disk='. I'm gonna reboot right now and give it a try.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:EmilEifrem
ID: 1631618
Didn't work. Added `linear' and swapped bios device codes between disk 0 and 1... `LI'.
0
 
LVL 2

Expert Comment

by:vx
ID: 1631619
Do you have access to the LILO configuration file on your RedHat bootdisk? I don't use RedHat myself, so I don't know. If so, could you please post that?
0
 

Author Comment

by:EmilEifrem
ID: 1631620
Unfortunately I don't. Have looked for it myself -- they gotta do something that I don't since my system boots with theirs -- but it doesn't seem like it comes with the distribution.
0
 
LVL 2

Expert Comment

by:vx
ID: 1631621
But you should be able to create a rootdisk yourself? Probably the file is a gzipped diskimage. Unzip it and write it to a floppy or harddisk partition (NOT RECOMMENDED! you'll lose all data), ie. dd if=./redhat-rootdisk-ungzipped of=/dev/fd0
0
 

Author Comment

by:EmilEifrem
ID: 1631622
What's the difference between a rootdisk and a bootdisk?

And I suppose that'd work, but what would the gain be? I already have a functional bootdisk, what I'd really need is a LILO that boots... a look at their lilo.conf would be neat.
0
 
LVL 2

Expert Comment

by:vx
ID: 1631623
Oh, I'm sorry, that's a Slackware concept. The bootdisk is the disk that contains the kernel, the rootdisk is the disk that contains the root partition and all programs needed.

I don't know if RedHat uses a two-disk system, but if not, you should follow the same procedure with the bootdisk.
0
 

Author Comment

by:EmilEifrem
ID: 1631624
Ok gotcha, but I still don't see what I would gain? Another boot-disk?
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631625
Can you change your first boot drive in your bios? For instance to your second harddrive?
0
 

Author Comment

by:EmilEifrem
ID: 1631626
You mean so I'd boot off my second drive instead? Unfortunately, no.
0
 
LVL 2

Expert Comment

by:Neogenix
ID: 1631627
Seems like you have two options, either use lilo as you boot loader or create a extended partition on your first drive and make it active.

LILO can be stored in the following locations:

  - boot sector of a Linux floppy disk. (/dev/fd0, ...)
  - MBR of the first hard disk. (/dev/hda, /dev/sda, ...)
  - boot sector of a primary Linux file system partition on the first hard
    disk. (/dev/hda1, ...)
  - partition boot sector of an extended partition on the first hard disk.
    (/dev/hda1, ...)*

It _can't_ be stored at any of the following locations:

  - boot sector of a non-Linux floppy disk or primary partition.
  - a Linux swap partition.
  - boot sector of a logical partition in an extended partition.*
  - on the second hard disk. (Unless for backup installations, if the
    current first disk will be removed or disabled, or if some other boot
    loader is used, that is capable of loading boot sectors from other
    drives.)

(Make sure you have all the necessary boot disks)

Make a backup of your MBR to floppy like this:
dd if=/dev/hda of=/fd/MBR bs=512 count=1

Restore it like this:

dd if=/MBR of=/dev/hda bs=446 count=1

Read the /usr/doc/lilo*/README file.
This could possibly tell you something I cannot.
0
 
LVL 2

Expert Comment

by:vx
ID: 1631628
The boot-disk contains the lilo.conf with which you can boot. Reduplicate that and you'll be able to boot yourself too. Again, I've used this method with Slackware, not with RedHat, but I think it should work as well.
0
 

Expert Comment

by:dEMenSE
ID: 1631629
Make a bootdisk to get to dos, then from there type fdisk /mbr and reinstall lilo with your linux CD. :)
0
 
LVL 6

Expert Comment

by:reiters
ID: 1631630
I am a beginner at rh5, but I had the same problem.  This may be stupid, but check and make sure you are using LBA and not normal or large on the hard drive you wish to run Linux on.  I know the fdisk warns you that you may need to use normal, but it only caused me problems. You might check the 32 bit access.  I have has better luck with it off.
0
 

Expert Comment

by:joch
ID: 1631631
I've had this kind of problem as well. I've reinstalled LILO and after having done that all worked fine. First restart from bootdisk then make sure your cd-romdrive works and
then you only have to reinstall LILO from rh5 cd.
0
 
LVL 5

Expert Comment

by:tfabian
ID: 1631632
you folks may want to look at url

   http://www.experts-exchange.com/Q.10099397

it's a question I submitted that deals with a similar LILO problem..  I know some of the people who've responded in this thread have also seen the other one..



0
 

Expert Comment

by:olvo
ID: 1631633
Why you don't use loadlin from DOS? Or set the Linux partition as the active?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now