Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
From: mdw@db.TC.Cornell.EDU (Matt Welsh)
Subject: LILO Quick Start Guide
Date: Mon, 4 Jan 1993 22:10:31 GMT	[thread overview]
Message-ID: <1993Jan4.221031.7124@tc.cornell.edu> (raw)

[Yep, I'm posting this to c.o.l.a, because this is one of those things that
'everyone should see'. I encourage other postings of this nature. -mdw]

	LILO: QUICK START GUIDE/FAQ
	A Fun Guide by Matt Welsh (mdw@tc.cornell.edu)
	Thanks a lot to makis@helios.unl.edu.

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 7), and a kernel that's
at least 0.97.pl2. You can get LILO.7 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.7 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. 

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)
	- 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 
partition and drive you plan to boot (in this case, one each for /dev/hda, 
/dev/hda1, and /dev/hda2). The given device numbers (0x300, etc) are for
IDE drives; for SCSI drive you use 0x800, 0x801, and so on (I think-- check
the full LILO documentation). 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.

See the full LILO docs to figure out what you should put in this table!

-------------------------------------------------------------------------------
# Dev.  BIOS    Secs/   Heads/  Cylin-  Part.
# num.  code    track   cylin.  ders    offset
0x300   0x80    17      10      980     0       # /dev/hda
0x301   0x80    17      10      980     17      # /dev/hda1
0x302   0x80    17      10      980     23630   # /dev/hda2
-------------------------------------------------------------------------------

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 boo (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
-- 
Matt Welsh     mdw@tc.cornell.edu     Cornell Theory Center
  "It's a Katana, ya Midwestern computer geek." --Tom Payne


                 reply	other threads:[~1993-01-04 22:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox