LINK="#3366FF" VLINK="#A000A0">

"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) LILO Stops at LI

From Peter.Oliver2 on Mon, 11 Oct 1999

James,

I hope that its OK to email you here!

I recently installed OpenLINUX v2.2. After installation, everything seems to work fine. When I restarting LILO starts to boot with the first two letters LI and then everything locks up. None of the keys work and the only way round is a hardware reset.

I used a RedHat6.0 boot floppy which gets OpenLinux2.2 up and running. When finally back in linux I ran fdisk. fdisk reported that my hard drive has 1027 cylinders and warns that more than 1024 can cause problems with some programs such as LILO.

Do you think that this is the cause of the LILO boot problem?

In addition when booting from the floppy disk OpenLinux2.2 does not work properly eg. automount for the floppy disk and cdrom does not work.

If you get around to having a look at this I would appreciate it very much!

Thanks Peter Oliver

(!) This symptom is one of those that would I expect from trying to load a kernel image or boot map that is inaccessible to your BIOS.
However, I would expect that a boot floppy would work. So long as your kernel is on the floppy (or CDROM) and your kernel supports the controller to which your hard disk is attached. Of course it's possible to create a floppy which just has a LILO primary boot block on it (with no kernel or boot map files). That's pretty rare so I wouldn't have expected you to make one of those (none of the common distributions would have set it up that way).
If you have a copy of MS-DOS/Win '9x on that drive, I'd used LOADLIN.EXE to run Linux. I've described it many times before so do a search on the term LOADLIN and you'll find explanations of how that works. Basically it lets you load Linux from a DOS command prompt.
Allegedly there was an effort to write a version of LOADLIN to run from the NT CMD.EXE console (a Win32s version). However, I've never seen that.
So, if you have NT installed, and you don't want to repartition the first portion of this drive (to make a small Linux /boot partition), and you don't have MS-DOS installed (so you can run LOADLIN.EXE), then you'll want to use a floppy (with a properly configured kernel on it) to boot Linux. Considering how rarely most of us boot Linux this is not much of a hardship. Note: for your purposes you only need the kernel on the floppy. You don't need a root filesystem (like you'd find on a Tom's Root/Boot or some other rescue floppy).
You can put a kernel on an MS-DOS formatted floppy, and run syslinux on that. This lets you select kernel options and pass command line parameters to the kernel (like LILO). You could also put an ext2 or minix filesystem on a floppy, copy your kernel to that and use /sbin/lilo on that. That too will let you configure various parameters, prompts, boot passwords, etc. You can even 'dd' a kernel directly on to a floppy (with no filesystem on it). This will still boot --- but it won't give you any prompt, so you can't pass command line options to the kernel or through it to init. That makes booting into single user mode (or any non default mode) rather difficult, so I don't recommend it.
Of course it's much easier if you just re-partition the drive. You can create a small Linux partition that's below the infamous 1024 cylinder boundary. That should be about 16 to 32 megabytes. You'd configure that as /boot (a separate small filesystem mounted off of the rootfs). You can use Linux' fdisk to put that partition near the beginning of the drive, while putting your other Linux partitions near the end.
The only hard part in that is getting NT, MS-DOS, or other operating systems to work around it. If you make a small C: drive under your MS OS' then you can still fit /boot in under the 1024 cylinder mark.
Another approach is to install a second drive. PC can boot from the first or second hard disk on the primary controller. (If you have CD-ROMs, IDE tape drive, DVD, etc. put them on the secondary and tertiary controllers).
Yet another approach is to use a commercial utility like Partition Magic, or a different freeware boot loader like GRUB (http://www.gnu.org/software/grub) although the FSF apparently still considers GRUB to be in "alpha" (as in "unreleased, unstable, no ready for prime time").
I hope you can see that the problem is not with Linux here. You're fighting against the legacy of the PC architecture which has never handled multiple boot gracefully and was never designed for hard drives of over 1024 cylinders. The first PC hard drives were 5 and 10 Mb. The early IDE drives were limited to 540Mb, which was extended to 8Gb through LBA "translation" (a technique for having the BIOS combine the traditional cylinder head sector (CHS) co-ordinates into linear block addresses (LBA) which were then converted back into real sector locations by the drive's electronics). Many BIOS still need to use CHS addresses to boot (thus the 1024 cylinder limits, which is 10 bits out of the 16-bit value that stores cylinder and sector).
Now we have UltraDMA drives of 15, 20, and 30 Gigabytes and some BIOS can't handle them. The MBR only has room for about 466 bytes of program loader code (the other 66 bytes are the partition table and a flag to tell fdisk that this isn't a blank drive). Thus the need to create small "partition manager" or "boot manager" partitions to provide room for more software, to work around these firmware limitations.
I'll be so glad to see the demise of PCs!


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 48 December 1999
HTML transformation by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Answer Guy Current Index ] [ Index of Past Answers ] greetings 1 2 3 5
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 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45
46 47 48 49 50 51 52 53 54
55 56 57


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Linux Gazette FAQ ] [ Next Section ]