(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to tag@ssc.com

There is no guarantee that your questions here will ever be answered. You can be published anonymously - just let us know!


(?) Help on LILO stopping at LI

From Alessio Frenquelli

Answered By Heather Stern

Hello,
I start thanking you for any help ... I am stuck at this stage, I am not a GURU on LINUX and I cannot overcome the problem.

Therefore I cannot really point to what has been changed or went wrong.

Under the Internet I found many, many errors entries pointing to LILO not being able to load in a disk that is above the 1024 cylinders

(!) [Heather] Yes, it used to be LILO's biggest bug, though not its loudest (that one is people using it wrong and then wailing what are they going to do now that their MBR is mangled).
But ever since the new version those are old messages. The normal solution until it came out, was to create a tiny /boot near the beginning of the free space - even most dual booters could manage to slip a 20 Mb partition below the boundary. This works because on the kernel and bootmap needs to be below the line; once the kernel is loaded you are no longer working with real mode BIOS issues at all, you are fully in protected mode and can access everything the kernel is built for.

(?) In my case LILO always worked so far, and I did not surely changed the disk size, done any repartitioning under Windows NT nor under Linux.

Under Windows, I have run Program => PartitionMagic =>PartitionInfo and I am attaching the output of the command to this email in case you need to see in details my machine's partitioning.

(!) [] So you normally use partition magic for your dual boot menu, I'm guessing. If so, that is what is presently in your MBR, and would be overwritten (***warning warning danger will robinson*** or at least look real carefully that you've set up stanzas for NT also first!) if you change boot = /dev/hda

ENVIRONMENT

Dual bootable Laptop, Toshiba Tecra 8100; one partition is Windows NT workstation, the other is Linux RedHat 6.1.

PROBLEM

Linux 6.1 LILO does not longer boot properly. Just stop at the word "LI".

SOME TROUBLESHOOTING INFO

Fortunately I have the boot diskette, and booting from it, I can successfully get to Linux.

When running : << /sbin/lilo >> I got messages:

[root@afrenquelli /etc]# lilo
Warning: device 0x0305 exceeds 1024 cylinder limit
Warning: device 0x0305 exceeds 1024 cylinder limit
Warning: device 0x0305 exceeds 1024 cylinder limit
Warning: device 0x0305 exceeds 1024 cylinder limit
Added linux *
[root@afrenquelli /etc]#
(!) [Heather] You used to get this before, or you now have a bigger disk than you used to?
By the way, Redhat 6.1 is a bit old, and lilo itself was updated last year so that 1024 cylinder issues are not a problem for it. (You'll also want to keep up to date on RH security updates, not quite as drastic as upgrading the system entirely.)
With the newer version, you can add the keyword

LBA32
into the top of your /etc/lilo.conf and it would use a different method to know where things are on the disk.
Being a boot loader, it's critical for lilo to know precisely where the kernel resides on your drive. Moving your kernel file (even if you then moved it back) or your system maps is a good reason to run /sbin/lilo.

(?) Some machine's characteristics:

[root@afrenquelli /tmp]# df -k
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda7              1510032   1201268    232056  84% 	/
/dev/hda5                23302      2648     19451  12% 	/boot
(!) [Heather] No relation. Lilo puts its bits into the Master Boot Record, which is not shown here. If ordered to, it could also use the superblock but, that is also not shown here, as it's reserved space for the filesystem driver.
(?)[root@afrenquelli /etc]# lilo
Warning: device 0x0305 exceeds 1024 cylinder limit.
   Use of the 'lba32' option may help on newer (EDD BIOS) systems.
Fatal: sector 19926490 too large for linear mode (try 'lba32' instead)

------------------------------------- file /etc/lilo.conf contains

boot=/dev/hda7
(!) [Heather] This says put it in the superblock of the 7 partition ... your /
Most people would have it in the MBR ... /dev/hda with no number. Do you have an NT boot menu pointing you into Linux? Because I also notice that you don't have a chain loader stanza, to ask the item below to offer you your NT boot setup.
(?)
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
vga=791
(!) [Heather] a nice framebuffer text mode :)
(?)
linear
(!) [Heather] "this is a big disk"
(?)
default=linux
image=/boot/vmlinuz-2.2.12-20
        label=linux
        initrd=/boot/initrd-2.2.12-20.img
        read-only
        root=/dev/hda7
(!) [Heather] The stock redhat kernel, I see.

(?) I did not "fiddle" with Linux at all before this error appeared !

(!) [Heather] WHat do you normally use Linux for?

(?) So , I changed in /etc/lilo.conf the value "linear" with "lba32", and then /sbin/lilo runs fine with :

c[root@afrenquelli /etc]# lilo -v
LILO version 21.6-1, Copyright (C) 1992-1998 Werner Almesberger
Linux Real Mode Interface library Copyright (C) 1998 Josh Vanderhoof
Development beyond version 21 Copyright (C) 1999-2000 John Coffman
Released 16-Dec-2000 and compiled at 17:04:30 on Jan  9 2001.

Reading boot sector from /dev/hda7
Merging with /boot/boot.b
Boot image: /boot/vmlinuz-2.2.12-20
Mapping RAM disk /boot/initrd-2.2.12-20.img
Added linux *
/boot/boot.0307 exists - no backup copy made.
Writing boot sector.

At this stage I "REALLY" hoped that the problem went away, but I still get only "LI" at boot time, I can only use the boot diskette to get into Linux.

(?) ATTEMPTS TO SOLVE IT ===================

Thinking that the latest version of LILO "could" have fixed this problem, I have downloaded LILO 21.6.1-1 from http://rpmfind.net/linux/RPM/contrib/libc6/i386/lilo-21.6.1-1.i386.html

I have then upgraded my LILO with : "rpm -Uhv <nomefile>.rpm"

(!) [Heather] Good deal! Yay!
You should also keep up to date on RedHat security updates for RH 6.1. (Not directly related to this, just a good idea)
Any other recent installs or upgrades?

(?) The upgrade completed fine, and then when I try to run /sbin/lilo I got:

[root@afrenquelli /etc]# lilo
Warning: device 0x0305 exceeds 1024 cylinder limit.
   Use of the 'lba32' option may help on newer (EDD BIOS) systems.
Fatal: sector 19926490 too large for linear mode (try 'lba32' instead)
(!) [Heather] Even better, I'm glad they provide useful error messages ... that tell you what to do about an error.

(?) So , I changed in /etc/lilo.conf the value "linear" with "lba32", and then /sbin/lilo runs fine with :

c[root@afrenquelli /etc]# lilo -v
LILO version 21.6-1, Copyright (C) 1992-1998 Werner Almesberger
Linux Real Mode Interface library Copyright (C) 1998 Josh Vanderhoof
Development beyond version 21 Copyright (C) 1999-2000 John Coffman
Released 16-Dec-2000 and compiled at 17:04:30 on Jan  9 2001.

Reading boot sector from /dev/hda7
Merging with /boot/boot.b
Boot image: /boot/vmlinuz-2.2.12-20
Mapping RAM disk /boot/initrd-2.2.12-20.img
Added linux *
/boot/boot.0307 exists - no backup copy made.
Writing boot sector.

At this stage I "REALLY" hoped that the problem went away, but I still get only "LI" at boot time, I can only use the boot diskette to get into Linux.

(!) [Heather] That's weird :(
Maybe you need to take the linear or lba32 mark out ??

(?) WHAT'S NEXT ?

If I could avoid to rebuild the LINUX partition would be GREATLY appreciated, since I am not a Linux expert and I would need some guidance also lots of other software is installed and I would like to avoid to reinstall the all lot !

(!) [Heather] Although I'd like to note at this time that making sure your backups of your personal data on both OS setups are in current state, and good working condition... and not stored on the same disk. Tapes or a CD-R or a stack of ZIP cartridges maybe.

(?) Could I just de-install LILO and re-install LILO ?

(!) [Heather] should be able to. lilo -u to put the backup bits from /boot/boot.0307 back into the superblock /dev/hda7 (where it hopefully came from). If it whines abotu timestamps, lilo -U insists.
Then, you should be able to run lilo again to install it as a fresher instance.

(?) Or should I add something into the /etc/lilo.conf and try to run "lilo" again ?

Could I somehow just rebuild the "booting" portion of the Linux, and if so, could you please provide detailed instructions on how to do it ?

(!) [Heather] lilo has actually very excellent documentation that comes with it... much finer than many application packages in fact. If you run 'locate lilo' a bunch of things will scroll by, and several be from the doc directory tree somewhere on your disk. I'm guessing /usr/doc/lilo- (some version number) but I'm not near a RedHat system right now to look. Anyways on my SuSE system it's in /usr/doc/packages/lilo ... I have some dvi files (readable or printable by LaTeX tools) and some compressed postscript files (but ghostview ... the command gv ... is glad to show these to me).
The README, however, is the right place to start, because unlike most readme files around here (which can be summarized "so this is the foo program, I created it because bla bla. It's under the GPL/artistic/whatever license, see COPYING. If there are any bugs (hope not) get in contact with me at ...") it has some serious data in it. Consider it your quickstart guide to a working LILO.
You've already done a number of the obvious things, so, let us know if the uninstall/reinstall trick works, and if that readme isn't helpful to you we may be able to translate it to plainer english.

(?) Kind regards,
alessio

(!) [Heather] Our best hopes for your system, Alessio. We'd really like to hear back what fixed it, if you manage to solve it.
(!) [Ben] Ah - an opportunity to shill for one of my scripts! :)
Here's where my "doc" script would come in really handy: all you'd have to do is type something like "doc lil", and it would give you a numbered list of all the subdirectories in your "doc" directory that start with 'lil'. Typing that number enters the directory and shows you a numbered file list; typing one of those numbers displays the file, no matter what its format is. When you exit the viewer, it shows you the list again, and gives you a chance to "fish around" in subdirectories and other files.
I know I sent it into LG as a 2-cent tip quite a while ago, but I believe I've made a few improvements since then, so here it is:

See attached doc.bash.txt


(!) Heather,
thank you for your complete and prompt reply.

I will provide here some answers from the queries that you had. At this stage it seems that the problem is caused by one of our product, that I have recently installed under Linux. After reporting the LI problem to our support team, I received a reply where they state that this product ast times seems to affect LILO, and to cause the problem that I have described to you.

I am still awaiting from our support team, if they know how to fix the problem of LILO.

And now to your questions:

(!) [Heather] Any recent changes? The next L should represent finding the second stage loader so the kernel can get going. These could be disk-ish things like you caught a virus and successfully cleaned it out, had a hard crash and needed to reboot, etc

(?) Yes, I have installed a new Micromuse Package under LINUX. After the installation I rebooted few times without problem, but then one day, LI started to happen.

 Warning: device 0x0305 exceeds 1024 cylinder limit
(!) [Heather] You used to get this before, or you now have a bigger disk than you used to?

(?) No changes on disk size, or disk partitioning under Linux or under NT. I never run /sbin/lilo before , so I cannot tell you if this was a problem. But LILO always worked before.

I did not "fiddle" with Linux at all before this error appeared !

(!) [Heather] WHat do you normally use Linux for?

(?) I use Linux to run Micromuse products, and as I said, the problem started to happen since I installed one of our package. Other people installed it on their laptop, but they did not report the error. Support told me that at times this product is know to cause some problem with LILO, but they are not too sure.

(!) [Heather] That's weird :(
Maybe you need to take the linear or lba32 mark *out* ??

(?) You mean, remove linear or lba32 from lilo.conf and try to run lilo again ? I will try this.

(!) [Heather] Then, you should be able to run lilo again to install it as a fresher instance.

(?) So I should just run :

  1. lilo -u or lilo -U
  2. Then how do I re-install LILO ? Just running /sbin/lilo or do I need to download the LILO package from somewhere and the install it with "rpm -Uhv .rpm" or something similar ?

Thank you for your help once again, I will keep you posted !
ciao, alessio


(!) Heather,

here is how I got this problem fixed with the help of the support personnel in our company

Thank you once again for your support !!!

Support adviced me that the following recovery procedure for LILO problems is to be used for Laptop that have dual boot partition, NT & Linux, when the menu received at boot time shows OS LOADER, and then it presents 2 choice , Windows NT or Linux.

Steps taken:

  1. Boot Linux from bootdisk
  2. Run /sbin/lilo -v (make sure no errors are displayed)
  3. Insert a new diskette and mount it:

    mount -t msdos /dev/fd0 /mnt/floppy
  4. df -k gives me 2 filesystems:

    /dev/hda7 Mounted /
    /dev/hda5 Mounted /boot
  5. run command :

    dd if=/dev/hda7 of=/tmp/bootsect.lnx bs=512 count=1
  6. cp /tmp/bootsect.lnx /mnt/floopy
  7. shutdown and reboot under NT
  8. copy c:\bootsect.lnx c:\bootsect.lnx_old
  9. copy a:\bootsect.lnx c:\bootsect.lnx
  10. reboot under Linux

PROBLEM solved, LILO loads correctly.

Ciao, alessio


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 65 of Linux Gazette April 2001
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29 [ Index of Past Answers ]