92 lines
4.3 KiB
HTML
92 lines
4.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>From Power Up To Bash Prompt: Lilo</TITLE>
|
|
<LINK HREF="From-PowerUp-To-Bash-Prompt-HOWTO-4.html" REL=next>
|
|
<LINK HREF="From-PowerUp-To-Bash-Prompt-HOWTO-2.html" REL=previous>
|
|
<LINK HREF="From-PowerUp-To-Bash-Prompt-HOWTO.html#toc3" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO-4.html">Next</A>
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO-2.html">Previous</A>
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO.html#toc3">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s3">3. Lilo</A></H2>
|
|
|
|
<P>When the computer loads a boot sector on a normal Linux system, what it loads is actually a part of lilo, called the ``first stage boot loader''. This is a tiny program who's only job in life is to load and run the ``second stage boot loader''.
|
|
<P>
|
|
<P>The second stage loader gives you a prompt (if it was installed that way) and loads the operating system you choose.
|
|
<P>
|
|
<P>When your system is up and running, and you run <CODE>lilo</CODE>, what you are actually running is the ``map installer''. This reads the configuration file <CODE>/etc/lilo.conf</CODE> and writes the boot loaders, and information about the operating systems it can load, to the hard disk.
|
|
<P>
|
|
<P>There are lots of different ways to set your system up to boot. What I have just explained is the most obvious and ``normal'' way, at least for a system who's main operating system is Linux. The Lilo Users' Guide explains several examples of ``boot concepts''. It is worth reading these, and trying some of them out.
|
|
<P>
|
|
<H2><A NAME="ss3.1">3.1 Configuration</A>
|
|
</H2>
|
|
|
|
<P>The configuration file for lilo is <CODE>/etc/lilo.conf</CODE>. There is a manual
|
|
page for it: type <CODE>man lilo.conf</CODE> into a shell to see it. The main thing
|
|
in <CODE>lilo.conf</CODE> is one entry for each thing that lilo is set up to boot. For a
|
|
Linux entry, this includes where the kernel is, and what disk partition to
|
|
mount as the root filesystem. For other operating systems, the main piece of
|
|
information is which partition to boot from.
|
|
<P>
|
|
<H2><A NAME="ss3.2">3.2 Exercises</A>
|
|
</H2>
|
|
|
|
<P><EM>DANGER:</EM> take care with these exercises. It is easy enough to get
|
|
something wrong and screw up your master boot record and make your system
|
|
unuseable. Make sure you have a working rescue disk, and know how to use it to
|
|
fix things up again. See below for a link to tomsrtbt, the rescue disk I use
|
|
and recommend. The best precaution is to use a machine that doesn't matter.
|
|
<P>
|
|
<P>Set up lilo on a floppy disk. It doesn't matter if there is nothing other than
|
|
a kernel on the floppy - you will get a ``kernel panic'' when the kernel is
|
|
ready to load init, but at least you will know that lilo is working.
|
|
<P>
|
|
<P>If you like you can press on and see how much of a system you can get going on
|
|
the floppy. This is probably the second best Linux learning activity around.
|
|
See the Bootdisk HOWTO (url below), and tomsrtbt (url below) for clues.
|
|
<P>
|
|
<P>Get lilo to boot unios (see section
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO-2.html#hardware-ex">hardware exercises</A> for a URL). As an extra challenge, see if you can do this on a
|
|
floppy disk.
|
|
<P>
|
|
<P>Make a boot-loop. Get lilo in the master boot record to boot lilo in one of the
|
|
primary partition boot sectors, and have that boot lilo in the master boot
|
|
record... Or perhaps use the master boot record and all four primary partitions
|
|
to make a five point loop. Fun!
|
|
<P>
|
|
<H2><A NAME="ss3.3">3.3 More Information</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<A NAME="lilo-links"></A>
|
|
<UL>
|
|
<LI>The lilo man page. </LI>
|
|
<LI>The Lilo package
|
|
(
|
|
<A HREF="ftp://lrcftp.epfl.ch/pub/linux/local/lilo/">lilo</A>),
|
|
contains the ``LILO User's Guide''
|
|
<CODE>lilo-u-21.ps.gz</CODE> (or a later version).
|
|
You may already have this document though.
|
|
Check <CODE>/usr/doc/lilo</CODE> or there abouts.
|
|
The postscript version is better than the plain text,
|
|
since it contains diagrams and tables.</LI>
|
|
<LI>
|
|
<A HREF="http://www.toms.net/rb">tomsrtbt</A> the coolest single
|
|
floppy linux. Makes a great rescue disk.</LI>
|
|
<LI>
|
|
<A HREF="http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO/">The Bootdisk HOWTO</A> </LI>
|
|
</UL>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<HR>
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO-4.html">Next</A>
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO-2.html">Previous</A>
|
|
<A HREF="From-PowerUp-To-Bash-Prompt-HOWTO.html#toc3">Contents</A>
|
|
</BODY>
|
|
</HTML>
|