mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
ed48c8ed9a
commit
bbd62b7d89
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<title>Lilo mini-Howto
|
<title>Lilo mini-Howto
|
||||||
<author>Miroslav Skoric (<tt/m.skoric@eunet.yu/)
|
<author>Miroslav Skoric (<tt/m.skoric@eunet.yu/)
|
||||||
<date>v3.00, 24 July 2000
|
<date>v3.1, 28 October 2000
|
||||||
<abstract>
|
<abstract>
|
||||||
LILO is the most used <bf/Li/nux <bf/Lo/ader for the x86 flavour of
|
LILO is the most used <bf/Li/nux <bf/Lo/ader for the x86 flavour of
|
||||||
Linux; I'll call it Lilo rather than LILO here because I don't
|
Linux; I'll call it Lilo rather than LILO here because I don't
|
||||||
|
@ -23,6 +23,7 @@ referred to /usr/doc/lilo*
|
||||||
<p>
|
<p>
|
||||||
This version of Lilo mini-HOWTO is based on work of Cameron Spitzer
|
This version of Lilo mini-HOWTO is based on work of Cameron Spitzer
|
||||||
(<tt/cls@truffula.sj.ca.us/) and Alessandro Rubini (<tt/rubini@linux.it/).
|
(<tt/cls@truffula.sj.ca.us/) and Alessandro Rubini (<tt/rubini@linux.it/).
|
||||||
|
There is also a contribution from Tony Harris (<tt/tony@nmr.mgh.harvard.edu/)
|
||||||
</abstract>
|
</abstract>
|
||||||
|
|
||||||
<!-- Table of contents -->
|
<!-- Table of contents -->
|
||||||
|
@ -212,6 +213,109 @@ nothing special needs to be done to uninstall Lilo. Just run Linux'
|
||||||
<em>fdisk</em> to remove Linux partitions from the partition
|
<em>fdisk</em> to remove Linux partitions from the partition
|
||||||
table. You must also mark the DOS partition as bootable.
|
table. You must also mark the DOS partition as bootable.
|
||||||
|
|
||||||
|
<sect1>How to make a ram disk?
|
||||||
|
|
||||||
|
by Tony Harris
|
||||||
|
16 Oct 2000
|
||||||
|
ram disk eenie-weenie HOWTO
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If your root file system is on a device for which your kernel has no
|
||||||
|
compiled-in driver, you will need to use <tt/lilo/ to load that driver
|
||||||
|
as a module very early in the boot cycle.
|
||||||
|
There are only two easy steps:
|
||||||
|
|
||||||
|
<itemize>
|
||||||
|
<item>make a ram disk image with <tt/mkinitrd/
|
||||||
|
|
||||||
|
<item>modify lilo.conf to point to the image
|
||||||
|
|
||||||
|
</itemize>
|
||||||
|
|
||||||
|
First, I cd over to <tt//boot/:
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Here you can see that I have a 2.2.16-3 kernel and I have added a
|
||||||
|
second kernel with ext3 support (<tt/vmlinuz-2.2.16-3ext3/). There is
|
||||||
|
already a ram disk image for my first kernel (<tt/initrd-2.2.16-3.img/)
|
||||||
|
|
||||||
|
To make a new image for the second kernel, I type the following (stuff I
|
||||||
|
type is in bold):
|
||||||
|
|
||||||
|
<tt//boot#/ mkinitrd initrd-2.2-16-3ext3.img 2.2.16-3ext3
|
||||||
|
|
||||||
|
<tt/mkinitrd/ is a shellscript that looks at the modules needed by my
|
||||||
|
kernel, then makes an ext2 filesystem containing them.
|
||||||
|
If we look inside the image we see this is the case:
|
||||||
|
|
||||||
|
<tt//boot#/ cat initrd-2.2.16-3ext3.img | gunzip > /tmp/myimage
|
||||||
|
<tt//boot#/ file /tmp/myimage
|
||||||
|
<tt//tmp/myimage: Linux/i386 ext2 filesystem/
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You do not have to look inside your image. Only making the image and
|
||||||
|
modifying lilo.conf are necessary steps. However, discussion of the ramdisk
|
||||||
|
image is provided for pedagogic purposes.
|
||||||
|
|
||||||
|
In order to look inside, I need to mount the image as though it were
|
||||||
|
a filesystem:
|
||||||
|
|
||||||
|
<tt//boot#/ mount /tmp/myimage /mnt/tmp -t ext2 -o loop=/dev/loop3
|
||||||
|
|
||||||
|
<tt//boot#/ ls /mnt/tmp
|
||||||
|
<tt/bin dev etc lib linuxrc/
|
||||||
|
|
||||||
|
<tt//boot#/ find /mnt/tmp
|
||||||
|
|
||||||
|
<tt//mnt/tmp/
|
||||||
|
<tt//mnt/tmp/lib/
|
||||||
|
<tt//mnt/tmp/lib/aic7xxx.o/
|
||||||
|
<tt//mnt/tmp/bin/
|
||||||
|
<tt//mnt/tmp/bin/sh/
|
||||||
|
<tt//mnt/tmp/bin/insmod/
|
||||||
|
<tt//mnt/tmp/etc/
|
||||||
|
<tt//mnt/tmp/dev/
|
||||||
|
<tt//mnt/tmp/dev/console/
|
||||||
|
<tt//mnt/tmp/dev/null/
|
||||||
|
<tt//mnt/tmp/dev/ram/
|
||||||
|
<tt//mnt/tmp/dev/systty/
|
||||||
|
<tt//mnt/tmp/dev/tty1/
|
||||||
|
<tt//mnt/tmp/dev/tty2/
|
||||||
|
<tt//mnt/tmp/dev/tty3/
|
||||||
|
<tt//mnt/tmp/dev/tty4/
|
||||||
|
<tt//mnt/tmp/linuxrc/
|
||||||
|
|
||||||
|
The most important part of this ram disk image is (<tt/aic7xxx.o/,
|
||||||
|
which is my scsi module.
|
||||||
|
|
||||||
|
Finally, I move on to the last step, modifying (<tt//etc/lilo.conf/:
|
||||||
|
|
||||||
|
Here is my entry in (<tt/lilo.conf/ that corresponds to the kernel and
|
||||||
|
image I just created:
|
||||||
|
|
||||||
|
<tt/image=/boot/vmlinuz-2.2.16-3ext3/
|
||||||
|
<tt/label=linux.ext3/
|
||||||
|
<tt/initrd=/boot/initrd-2.2.16-3ext3.img/
|
||||||
|
<tt/read-only/
|
||||||
|
<tt/root=/dev/hdb3/
|
||||||
|
|
||||||
|
That's it. Run <tt/lilo/ as root and reboot.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you have problems, check out the kernel <tt/HOWTO/. There are a
|
||||||
|
couple things you need to have covered: you need your kernel modules
|
||||||
|
compiled and living in (<tt//etc/conf.modules/.
|
||||||
|
|
||||||
|
|
||||||
<sect>The Simple Configuration
|
<sect>The Simple Configuration
|
||||||
<p>
|
<p>
|
||||||
Most Lilo installations use a configuration file like the
|
Most Lilo installations use a configuration file like the
|
||||||
|
|
Loading…
Reference in New Issue