s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
2. Background Information and Standard InstallationWhen 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
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
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
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.
Note that the
If you have more than one hard disk and some of them are only used by Linux and are not involved in the boot process, you can tell your BIOS that they are not installed. Your system will boot more quickly and Linux will autodetect all the disks in no time. I often switch disks in my computers, but I never touch the BIOS configuration.
2.3 How Can I Interact at Boot Time?When you see the Lilo prompt, you can hit the <Tab> key to show the list of possible choices. If Lilo is not configured to be interactive, press and hold the <Alt> or <Shift> key before the ``LILO'' message appears.
If you choose to boot a Linux kernel, you can add command-line arguments after the name of the system you choose. The kernel accepts many command-line arguments. All the arguments are listed in the ``BootPrompt-HOWTO'' by Paul Gortmaker, and I won't replicate it here. A few command line arguments, however, are particularly important and worth describing here:
2.4 How Can I Uninstall Lilo?When Lilo overwrites a boot sector, it saves a backup copy in
If you ever need to uninstall Lilo (for example, in the unfortunate
case you need to uninstall Linux), you just need to restore the
original boot sector. If Lilo is installed in
If you installed Lilo on your root partition (e.g.,
2.5 How to make a ram disk?Notice: If you find the next section difficult to read, you may
also look for the web page:
by Tony Harris 16 Oct 2000 ram disk eenie-weenie HOWTO
If your root file system is on a device for which your kernel has no
compiled-in driver, you will need to use
First, I cd over to
System.map chain.b module-info-2.2.16-3ext3 System.map-2.2.16-3 initrd-2.2.16-3.img vmlinux-2.2.16-3 System.map-2.2.16-3ext3 vmlinux-2.2.16-3ext3 vmlinuz kernel.h boot.b map vmlinuz-2.2.16-3 bz.2.2.15.juke.Image module-info vmlinuz-2.2.16-3ext3 bzImage-2.2.14 module-info-2.2.16-3
Here you can see that I have a 2.2.16-3 kernel and I have added a
second kernel with ext3 support ( To make a new image for the second kernel, I type the following (stuff I type is in bold): boot# mkinitrd initrd-2.2-16-3ext3.img 2.2.16-3ext3
boot# cat initrd-2.2.16-3ext3.img | gunzip > /tmp/myimage boot# file /tmp/myimage /tmp/myimage: Linux/i386 ext2 filesystem/
You do not have to look inside your image. Only making the image and
modifying In order to look inside, I need to mount the image as though it were a filesystem: boot# mount /tmp/myimage /mnt/tmp -t ext2 -o loop=/dev/loop3 boot# ls /mnt/tmp
boot# find /mnt/tmp
The most important part of this ram disk image is Finally, I move on to the last step, modifying Here is my entry in
That's it. Run /lilo as root and reboot.
If you have problems, check out the kernel
Next Previous Contents |