rick at linuxmafia.com
Sun Dec 8 15:26:46 PST 2002
Quoting Bill Stoye <skiffworks at earthlink.net>:
> In a moment of wild abandonment, I used Synaptic to get
> 'kernel-image-2.4-686'; I freaked when I received the Error/warning
> message with special instructions to make changes to Lilo; I'm at a loss
> as to what to change in /etc/lilo.conf and with what, xterm or text
> editor nano....
At the time I wrote to you the first time, I only vaguely remembered
the necessary details, so that's why I said (earlier):
If you do, be very careful to follow any special instructions you
see at that time, e.g., changes to /etc/lilo.conf . (At the
minimum, take care to leave a paragraph in /etc/lilo.conf for your
old 2.2.20-idepci kernel, so you can reboot using it, in the event
your 2.4.x one has problems.)
Apologies for not being more specific, but I couldn't remember at the
time precisely what tweak you have to make to lilo. I _do_ remember,
now, and you can probably find it in
/usr/share/doc/kernel-image-2.4-686/LiloDefault.gz . (Use the "zless"
tool to read such files.)
Let me quote what _my_ 2.4.x Debian kernel's LiloDefault.gz file says on
that subject, and then explain it to you in plain English, immediately
Recent official kernel image packages (starting with 2.4.X) have
started installing initrd images. If you install one of these
official images, you now have to provide lilo with a pointer to the
respective initrd bootimage. Assuming that you are installing kernel
2.4.X-flavour, you need to add something like this to the lilo.conf:
("initrd" stands for "initial RAMdisk".)
OK, the plain English:
In the old days, we didn't make much use of _modules_ for hardware
driver software in our kernels. (A "module" is a hunk of code that's
been compiled so that it can be dynamically loaded or unloaded from RAM
by the running kernel, so that it's present if needed and removed from
RAM if it isn't.) If we bought (e.g.) a new sound card, we just
compiled a fresh kernel that included the necessary driver in the kernel
image -- as part of a "monolithic" (non-modular) kernel.
With the (now rather old) 2.2 kernel series, support for modular drivers
in Linux improved greatly, and the Debian Project was one of the groups
that adopted modular kernels most enthusiastically: If you look under
/lib/modules, you'll find large trees of kernel modules, classified by
category, for practically any conceivable hardware and for many other
optional kernel features. This is why Debian (and many other
distributions) has been able to install on such a wide range of
When the 2.4 kernels came around, the Debian people decided to use a
newly improved feature called the "initial RAMdisk" (initrd). The idea
is that, in the early stages of the boot process, lilo (or any similar
bootloader) will tell the booting kernel about the physical disk
location of a RAMdisk image file that the kernel is to decompress into
RAM and mount as a small RAMdisk, as the initial root filesystem. The
RAMdisk contains extremely crucial hardware drivers such as those for
your hard disk's host adapter and for certain key filesystem types (such as
ext2). After pulling whatever drivers it needs from the RAMdisk, the
kernel deallocates that RAM and mounts the _real_ root filesystem.
Anyhow, for this to work, you have to make sure lilo knows where the
RAMdisk image file is, so it can inform the booting kernel.
To understand that, you might benefit from my "Zen of lilo" speech:
A lot of people never learned the Zen of LILO:
1. /sbin/lilo (the "map installer") is best thought of as a compiler,
and /etc/lilo.conf as its source code.
2. Therefore, if you change /etc/lilo.conf or any of the files it
points to, you must run /sbin/lilo before rebooting, to "recompile".
3. You should always have a "safeboot" stanza in /etc/lilo, pointing
to a known-good kernel image that you never fool with, as a
fallback. This ensures that if, e.g., you compile a new kernel but
accidentally omit console support, you can easily recover.
If you look at your existing /etc/lilo.conf, you'll find that it's so
cluttered with comment lines (starting with "#") that it's difficult to
grasp. That's too bad. To fix this, I recommend you do:
$ su -
# cd /etc
# cp lilo.conf lilo.conf-COMMENTED
Then, pare down the original lilo.conf (using nano or whatever) to
eliminate the comment clutter.
Here's an example lilo.conf _without_ the comments, and with an "initrd"
line suitable to my laptop's configuration:
The message you got was trying to tell you to insert an "initrd" line
similar to the above, in the lilo.conf stanza for your new 2.4 kernel.
If you _don't_ do that (and don't run /sbin/lilo afterwards, to
implement the change), then the booting 2.4 kernel won't be able to find
the drivers in the RAMdisk (because it won't know about the RAMdisk),
and so won't be able to subsequently do things that require those
drivers, such as find your root filesystem.
The kernel package's installer script isn't smart enough to figure out
every variation of lilo.conf contents, at least not well enough to edit
it without your help, so, instead, it tells you what should be done and
leaves it up to you.
OK? I hope that helps.
> Sorry for the delay in response, I needed a break, trying to prevent
> burnout. I was hoping I could get Debian going but maybe I need to go to
> a distro like Libranet.
One nice thing about the Libranet installer is that it installs a 2.4
kernel with the necessary initrd line already in place. On the other
hand, so do the many _Debian_ installers that install directly onto
2.4-based setups. (When installing Debian, look for "boot flavours",
and pick the "bf2.4" flavour.)
Cheers, The Viking's Reminder:
Rick Moen Pillage first, _then_ burn.
rick at linuxmafia.com
More information about the conspire