132 lines
5.6 KiB
Plaintext
132 lines
5.6 KiB
Plaintext
LILO: QUICK START GUIDE/FAQ
|
|
A Fun Guide by Matt Welsh (mdw@tc.cornell.edu)
|
|
Thanks a lot to makis@helios.unl.edu.
|
|
|
|
Last modified 22 Jan 1993
|
|
Version: 1.1
|
|
|
|
I see lots of people who are having problems getting LILO set up on their
|
|
system. Basically, LILO will let you boot MS-DOS, Linux, or whatever you
|
|
want on different partitions on your drive, and let you choose at bootup
|
|
time what partition to boot. But, LILO does *much* more than just this,
|
|
and that's why the docs are rather long and detailed. I think what a lot
|
|
of people use for LILO for is chooing between something like MS-DOS and
|
|
Linux at bootup time on their hard drives. So, here's a "quick start" guide
|
|
to give you the scoop on how to do this with LILO.
|
|
|
|
You need the most recent version of LILO (version 8), and a kernel that's
|
|
at least 0.97.pl2. You can get LILO.8 on tsx-11 or Sunsite, they're pretty
|
|
easy to find. I don't know what version of LILO is on the current SLS
|
|
release.
|
|
|
|
The LILO.8 package contains the sources only. You need to do a 'make' to
|
|
compile the programs and a 'make install' to copy LILO to the directory
|
|
/etc/lilo on your system.
|
|
|
|
LILO.8 also contains a "quick start" script which may help you out. I haven't
|
|
seen it. :)
|
|
|
|
You need to create the following files in /etc/lilo:
|
|
- config (tells LILO how to set up your boot record)
|
|
- disktab (tells LILO about the physical partitions that
|
|
you're booting...ONLY NEEDED for scsi drives)
|
|
- install (runs LILO on the 'config' program)
|
|
|
|
In the file /etc/lilo/config, you have stanzas for each partition that you
|
|
want to boot, giving the partition name, the file to boot from, and so on.
|
|
At the top of the config files you specify the drive to boot, the map file
|
|
and boot file to use (which should be /etc/lilo/map and /etc/lilo/boot.b,
|
|
respectively), and other global options.
|
|
|
|
Here's what my /etc/lilo/config files looks like. The notes after '#'
|
|
are comments.
|
|
|
|
-------------------------------------------------------------------------------
|
|
# Tell LILO to set the boot record on the drive /dev/hda. If you boot
|
|
# from a drive other than /dev/hda, set it here instead.
|
|
boot = /dev/hda
|
|
|
|
# Tell LILO to perform some optimization.
|
|
compact
|
|
|
|
# Tell LILO to use the boot file /etc/lilo/boot.b. Unless you're hacking
|
|
# things heavily this is the only boot file you want to use.
|
|
install = /etc/lilo/boot.b
|
|
|
|
# Tell LILO to use the map file /etc/lilo/map. The map file tells LILO where
|
|
# to look for partitions, and it's updated when you run LILO. You can give
|
|
# any name you want here, but /etc/lilo/map is the canonical name.
|
|
map = /etc/lilo/map
|
|
|
|
# This stanza tells LILO to boot the file /Image on /dev/hda2, using the label
|
|
# 'linux'. Since it's the first boot entry here, it's also the default.
|
|
image = /Image
|
|
label = linux
|
|
root = /dev/hda2
|
|
|
|
# This stanza is for an 'old' kernel image in the file /Image.old, on
|
|
# /dev/hda2. This is for backup purposes... if you build a new kernel and
|
|
# it won't boot for some reason, you can copy your old kernel to /Image.old
|
|
# and boot from it.
|
|
image = /Image.old
|
|
label = linux-old
|
|
root = /dev/hda2
|
|
|
|
# This stanza is for booting MS-DOS from /dev/hda1.
|
|
other = /dev/hda1 # this is for the msdos partition
|
|
table = /dev/hda
|
|
label = msdos
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
This is the file /etc/lilo/install. You run this to install LILO (not the
|
|
same thing as doing a 'make install', which only copies the LILO software to
|
|
/etc/lilo).
|
|
|
|
-------------------------------------------------------------------------------
|
|
#!/bin/sh
|
|
/etc/lilo/lilo -C /etc/lilo/config $@
|
|
-------------------------------------------------------------------------------
|
|
|
|
And here's the file /etc/lilo/disktab, where you put an entry for each
|
|
SCSI partition and drive you plan to boot (such as /dev/sda, /dev/sda1, and
|
|
/dev/sda2). You only need entries for SCSI drives because their geometries
|
|
aren't in the CMOS. You don't need the disktab file at all for floppies or
|
|
IDE drives.
|
|
|
|
The device numbers are 0x800, 0x801, and so on. The sec/track and other
|
|
information is given by your machine's CMOS (and fdisk may be able to give it
|
|
to you as well, if you don't remember it offhand). The partition offset if
|
|
given by Linux at bootup time.
|
|
|
|
Note that you only need to describe partitions in this table that you plan
|
|
to boot from. Also, you don't need any entries for floppies if you use LILO
|
|
to boot from floppy, or for IDE drives.
|
|
|
|
See the full LILO docs to figure out what you should put in this table!
|
|
I don't have SCSI drives so this is just an example.
|
|
-------------------------------------------------------------------------------
|
|
# Dev. BIOS Secs/ Heads/ Cylin- Part.
|
|
# num. code track cylin. ders offset
|
|
0x800 0x80 17 10 980 0 # /dev/sda
|
|
0x801 0x80 17 10 980 17 # /dev/sda1
|
|
0x802 0x80 17 10 980 23630 # /dev/sda2
|
|
-------------------------------------------------------------------------------
|
|
|
|
This works for me, but I don't guarantee it will work for you. If you've done
|
|
everything right running /etc/lilo/install should install LILO and Voila!
|
|
you can boot from your hard drive. LILO will boot by default the first
|
|
partition given in the config file; if you hold down shift, capslock, or
|
|
control at boot time LILO will ask you what partition you want to boot (by
|
|
name, such as "linux", "old-linux", and so on). There are MANY other options
|
|
and things you can do in the config file; this is just a basic setup.
|
|
|
|
Werner's put a lot of work into this program, and it shows... this quickie
|
|
doc should get you started. NOW go back and read the full LILO documentation
|
|
to make sure you understand everything, keeping the above in mind.
|
|
|
|
Good luck!
|
|
|
|
mdw
|
|
|