LILO.pdf

(79 KB) Pobierz
LILO mini-HOWTO
LILO mini−HOWTO
LILO mini−HOWTO
Table of Contents
LILO mini−HOWTO. .........................................................................................................................................1
Miroslav "Misko" Skoric, skoric at eunet dot yu. ....................................................................................1
1. Introduction. .........................................................................................................................................1
2. Background Information and Standard Installation. ............................................................................1
3. The Simple Configuration. ..................................................................................................................1
4. Installing hdc to Boot as hda and Using bios=. ...................................................................................1
5. Using Lilo When the BIOS Can't See the Root Partition. ...................................................................1
6. How do i know the BIOS number for my SCSI disks. ........................................................................1
7. Accessing Huge Disks When the BIOS Can't .....................................................................................2
8. Booting from a Rescue Floppy. ...........................................................................................................2
9. LILO after the installation of Mandrake Linux 9.1 on HP products. ..................................................2
10. Bibliography. .....................................................................................................................................2
11. Further Information. ...........................................................................................................................2
12. Getting help. .......................................................................................................................................2
1. Introduction. .........................................................................................................................................2
2. Background Information and Standard Installation. ............................................................................3
2.1 Where Should I Install Lilo?. .............................................................................................................3
2.2 How Should I Configure my IDE Hard Drives?. ...............................................................................3
2.3 How Can I Interact at Boot Time?. ....................................................................................................4
2.4 How Can I Uninstall Lilo?. ................................................................................................................4
2.5 How to make a ram disk?. ..................................................................................................................5
3. The Simple Configuration. ..................................................................................................................7
3.1 How to Deal with Big Kernels. ..........................................................................................................7
3.2 How to boot Windows NT from 'LILO boot:' menu .........................................................................7
3.3 How to boot Windows 2000 from 'LILO boot:' menu. ......................................................................8
4. Installing hdc to Boot as hda and Using bios=. ...................................................................................9
5. Using Lilo When the BIOS Can't See the Root Partition. ...................................................................9
6. How do i know the BIOS number for my SCSI disks. ......................................................................10
6.1 The theory. .......................................................................................................................................10
6.2 How to swap linux and NT booting ?. .............................................................................................11
6.3 Miscellaneous. .................................................................................................................................12
7. Accessing Huge Disks When the BIOS Can't ...................................................................................13
8. Booting from a Rescue Floppy. .........................................................................................................14
9. LILO after the installation of Mandrake Linux 9.1 on HP products. ................................................15
9.1 Description of the products used in this experimen. .......................................................................15
9.2 What does LILO looks like on these HP products. ..........................................................................16
9.3 Conclusions. .....................................................................................................................................18
10. Bibliography. ...................................................................................................................................19
11. Further Information. .........................................................................................................................21
11.1 Copyright. ......................................................................................................................................21
11.2 Disclaimer. .....................................................................................................................................21
11.3 News. .............................................................................................................................................21
11.4 Credits. ...........................................................................................................................................21
11.5 HOWTO. ........................................................................................................................................22
11.6 Mini−HOWTO.. .............................................................................................................................22
11.7 Local Resources. ............................................................................................................................22
11.8 Web Pages. .....................................................................................................................................22
12. Getting help. .....................................................................................................................................23
i
115276895.001.png
LILO mini−HOWTO
Miroslav "Misko" Skoric, skoric at eunet dot yu
v3.18, 2004−01−11
LILO is the most used Li nux Lo ader for the x86 flavor of Linux; I'll call it Lilo rather than LILO here because
I don't appreciate uppercase. This file describes some typical Lilo installations. It's intended as a supplement
to the Lilo User's Guide. I think examples are informative even if your setup isn't much like mine. I hope this
saves you trouble. Since Lilo's own documentation is very good, who's interested in the details is referred to
/usr/doc/lilo* (once upon a time said gentlemen like Cameron Spitzer and Alessandro Rubini who have made
early versions of this document)
This version of Lilo mini−HOWTO is based on work of Cameron Spitzer ( cls@truffula.sj.ca.us )
and Alessandro Rubini ( rubini@linux.it ). There are also contributions from Tony Harris
( tony@nmr.mgh.harvard.edu ) and Marc Tanguy ( tanguy@ens.uvsq.fr ). Well, I have used
materials from the authors mentioned − without changes − and added some pointers related to configuring
LILO for using with Windows NT and Windows 2000. More detailed information about the activation of
Windows NT/2000 from LILO menu, you may find in wonderfull Linux+WindowsNT mini−HOWTO.
·
3.1 How to Deal with Big Kernels
·
6.1 The theory
·
LILO mini−HOWTO
1
115276895.002.png
LILO mini−HOWTO
·
11.1 Copyright
·
Although the documentation found in Lilo's sources (the one installed in /usr/doc/lilo −version) is very
comprehensive, most Linux users experience some trouble in building their own /etc/lilo.conf file.
This document is meant to support them by giving the minimal information and by showing five sample
installations:
· The next one shows how to install Lilo on a hard drive connected as /dev/hdc that will boot as
/dev/hda . This is usually needed when you install a new Linux drive from your own running
system. This also tells how to boot from SCSI disks when your BIOS is modern enough.
The first example is the classical ``Linux and other'' installation.
·
·
The third example shows how to boot a Linux system whose root partition can't be accessed by the
BIOS.
·
The next sample file is used to access huge disks, that neither the BIOS nor DOS can access easily
(this one is somehow outdated).
·
The last example shows how to restore a damaged disk, if the damage resulted from installing another
operating system).
The last three examples are by Cameron, cls@truffula.sj.ca.us , who wrote the original document.
Alessandro rubini@linux.it doesn't run anything but Linux, so he can't check nor update them by
7. Accessing Huge Disks When the BIOS Can't
2
115276895.003.png
LILO mini−HOWTO
himself. Needless to say, any feedback is welcome.
When Lilo boots the system, it uses BIOS calls to load the Linux kernel off the disk (IDE drive, floppy or
whatever). Therefore, the kernel must live in some place that can be accessed by the bios.
At boot time, Lilo is not able to read filesystem data, and any pathname you put in /etc/lilo.conf is
resolved at installation time (when you invoke /sbin/lilo ). Installation time is when the program builds the
tables that list which sectors are used by the files used to load the operating system. As a consequence, all of
these files must live in a partition that can be accessed by the BIOS (the files are usually located in the /boot
directory, this means that only the root partition of your Linux system needs to be accessed via the BIOS).
Another consequence of being BIOS−based is that you must reinstall the loader (i.e., you must reinvoke
/sbin/lilo ) any time you modify the Lilo setup. Whenever you recompile your kernel and overwrite your old
image you must reinstall Lilo.
2.1 Where Should I Install Lilo?
The boot= directive in /etc/lilo.conf tells Lilo where it should place its primary boot loader. In
general, you can either specify the master boot record ( /dev/hda ) or the root partition of your Linux
installation (is usually is /dev/hda1 or /dev/hda2 ).
If you have another operating system installed in your hard drive, you'd better install Lilo to the root partition
instead of the MBR. In this case, you must mark the partition as ``bootable'' using the ``a'' command of fdisk
or the ``b'' command of cfdisk . If you don't overwrite the master boot sector you'll find it easier to uninstall
Linux and Lilo if needed.
Of course, you always have a way to avoid some "rules" like above. Well, you may install Lilo to the MBR
even if you already have another operating system installed there. For example, if you installed Windows NT
4.0 as the first operating system on your machine, then NT's boot loader was placed into the MBR so you
were able to boot NT without problems. After you installed Linux and chose to install Lilo to the MBR, Lilo
rewrote NT's boot loader. Next time you boot your machine, you won't be able to boot NT. But, that is no
problem. You should edit your /etc/lilo.conf and add a new entry for NT. Next time you re−boot your
system, there will be the new added NT entry under Lilo menu. The same thing happened when I installed
Windows 2000 instead of Windows NT.
2.2 How Should I Configure my IDE Hard Drives?
I personally don't use LBA or LARGE settings in the BIOS (but I only run Linux); they are horrible kludges
forced on by design deficiencies in the PC world. This requires that the kernel lives in the first 1024 cylinders,
but this is not a problem as long as you partition your hard drives and keep root small (as you should do
anyways).
If your hard disk already carries another operating system, you won't be able to modify the BIOS settings, or
the old system won't work any more. All recent Lilo distribution are able to deal with LBA and LARGE disk
settings.
2. Background Information and Standard Installation
3
115276895.004.png
Zgłoś jeśli naruszono regulamin