add directory study

This commit is contained in:
gohigh
2024-02-19 00:25:23 -05:00
parent b1306b38b1
commit f3774e2f8c
4001 changed files with 2285787 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
<HTML
><HEAD
><TITLE
>Resources and pointers</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Frequently Asked Question (FAQ) list"
HREF="x1143.html"><LINK
REL="NEXT"
TITLE="Pre-made Bootdisks"
HREF="premade.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1143.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="premade.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="APPENDIX"
><H1
CLASS="APPENDIX"
><A
NAME="AEN1376"
>A. Resources and pointers</A
></H1
><P
>When retrieving a package, always get the latest version unless you have
good reasons for not doing so.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1143.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="premade.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Frequently Asked Question (FAQ) list</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Pre-made Bootdisks</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,300 @@
<HTML
><HEAD
><TITLE
>LILO boot error codes</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="The Linux boot process"
HREF="x1440.html"><LINK
REL="NEXT"
TITLE="Sample root filesystem listings"
HREF="listings.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1440.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="listings.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="APPENDIX"
><H1
CLASS="APPENDIX"
><A
NAME="AEN1483"
>B. LILO boot error codes</A
></H1
><P
>Questions about these codes are asked so often on Usenet that we include
them here as a public service. This summary is excerpted from Werner
Almsberger's <A
HREF="http://www.ibiblio.org/pub/Linux/system/boot/lilo/lilo-u-21.ps.gz"
TARGET="_top"
>LILO User Documentation</A
>.</P
><P
> When LILO loads itself, it displays the word
<TT
CLASS="LITERAL"
>LILO</TT
>. Each letter is printed before or after performing
some specific action. If LILO fails at some point, the letters printed so
far can be used to identify the problem.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN1492"
></A
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>Output</TH
><TH
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
>Problem</TH
></TR
></THEAD
><TBODY
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>(nothing)</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> No part of LILO has been loaded. LILO either isn't installed or
the partition on which its boot sector is located isn't active.
</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>L</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> The first stage boot loader has been loaded and started, but it
can't load the second stage boot loader. The two-digit error
codes indicate the type of problem. (See also section ``Disk error
codes''.) This condition usually indicates a media failure or a
geometry mismatch (e.g. bad disk parameters).
</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>LI</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> The first stage boot loader was able to load the second stage boot
loader, but has failed to execute it. This can either be caused by
a geometry mismatch or by moving <TT
CLASS="FILENAME"
>/boot/boot.b
</TT
>
without running the map installer.
</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>LIL</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> The second stage boot loader has been started, but it can't load
the descriptor table from the map file. This is typically caused
by a media failure or by a geometry mismatch.
</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>LIL?</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> The second stage boot loader has been loaded at an incorrect
address. This is typically caused by a subtle geometry mismatch or
by moving <TT
CLASS="FILENAME"
>/boot/boot.b</TT
> without running the
map installer.
</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>LIL-</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> The descriptor table is corrupt. This can either be caused by a
geometry mismatch or by moving /boot/map without running the map
installer.
</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="LEFT"
VALIGN="TOP"
>LILO</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
> All parts of LILO have been successfully loaded.
</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><P
>If the BIOS signals an error when LILO is trying to load a boot image, the
respective error code is displayed. These codes range from
<TT
CLASS="LITERAL"
>0x00</TT
> through <TT
CLASS="LITERAL"
>0xbb</TT
>. See the LILO User
Guide for an explanation of these.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1440.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="listings.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>The Linux boot process</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Sample root filesystem listings</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,373 @@
<HTML
><HEAD
><TITLE
>Creating bootable CD-ROMs</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="How the pros do it"
HREF="pros.html"><LINK
REL="NEXT"
TITLE="Frequently Asked Question (FAQ) list"
HREF="x1143.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="pros.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1143.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CD-ROMS"
>11. Creating bootable CD-ROMs</A
></H1
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>This section was contributed by Rizwan Mohammed Darwe
(<TT
CLASS="LITERAL"
>rizwan AT clovertechnologies dot com</TT
>)
</P
></TD
></TR
></TABLE
></DIV
><P
>This section assumes that you are familiar with the process and workings of
writing CDs in linux. Consider this to be a quick reference to include the
ability to boot the CD which you will burn. The CD-Writing-HOWTO should give you
an in-depth reference.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1106"
>11.1. What is El Torito?</A
></H2
><P
>For the x86 platform, many BIOS's have begun to support bootable CDs.
The patches for mkisofs is based on the standard called "El Torito".
Simply put, El Torito is a specification that says how a cdrom should
be formatted such that you can directly boot from it.</P
><P
> The "El Torito" spec says that <EM
>any</EM
> cdrom drive
should work (SCSI or EIDE) as long as the BIOS supports El Torito. So far
this has only been tested with EIDE drives because none of the SCSI
controllers that has been tested so far appears to support El Torito. The
motherboard definately has to support El Torito. How do you know if your
motherboard supports "El Torito"? Well, the ones that support it let you
choose booting from hard disk, Floppy, Network or CDROM. </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1111"
>11.2. How it Works</A
></H2
><P
> The El Torito standard works by making the CD drive appear, through
BIOS calls, to be a normal floppy drive. This way you simply put any floppy
size image (exactly 1440k for a 1.44 meg floppy) somewhere in the ISO
filesystem. In the headers of the ISO fs you place a pointer to this image.
The BIOS will then grab this image from the CD and for all purposes it acts as
if it were booting from the floppy drive. This allows a working LILO boot
disk, for example, to simply be used as is. </P
><P
>Roughly speaking, the first 1.44 (or 2.88 if supported) Mbytes of the
CD-ROM contains a floppy-disk image supplied by you. This image is treated
like a floppy by the BIOS and booted from. (As a consequence, while booting
from this virtual floppy, your original drive A:
(<TT
CLASS="FILENAME"
>/dev/fd0</TT
>) may not be accessible, but you can try with
<TT
CLASS="FILENAME"
>/dev/fd1</TT
>). </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1117"
>11.3. How to make it work</A
></H2
><P
>First create a file, say "boot.img", which is an exact image of the bootable
floppy-disk which you want to boot via the CD-ROM. This must be an 1.44 MB
bootable floppy-disk. The command below will do this
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> dd if=/dev/fd0 of=boot.img bs=10k count=144</PRE
></FONT
></TD
></TR
></TABLE
>
assuming the floppy is in the A: drive.</P
><P
>Place this image somewhere in the hierarchy which will be the source
for the iso9660 filesystem. It is a good idea to put all boot related
files in their own directory ("boot/" under the root of the iso9660 fs,
for example).</P
><P
>One caveat -- Your boot floppy <EM
>must</EM
> load any initial
ramdisk via LILO, not the kernel ramdisk driver! This is because once the
linux kernel starts up, the BIOS emulation of the CD as a floppy disk is
circumvented and will fail. LILO will load the initial ramdisk using BIOS
disk calls, so the emulation works as designed.</P
><P
>
The El Torito specification requires a "boot catalog" to be created as
well. This is a 2048 byte file which is of no interest except it is required.
The patchwork done by the author of mkisofs will cause it to automatically
create the boot catalog, but you must specify where the boot catalog will go
in the iso9660 filesystem. Usually it is a good idea to put it in the same
place as the boot image, and a name like <TT
CLASS="FILENAME"
>boot.catalog</TT
>
seems appropriate.</P
><P
>So we have our boot image in the file <TT
CLASS="FILENAME"
>boot.img</TT
>,
and we are going to put it in the directory <TT
CLASS="FILENAME"
>boot/</TT
> under the root of the iso9660 filesystem.
We will have the boot catalog go in the same directory with the name
<TT
CLASS="FILENAME"
>boot.catalog</TT
>. The command to create the iso9660 fs in
the file <TT
CLASS="FILENAME"
>bootcd.iso</TT
> is then:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>mkisofs -r -b boot/boot.img -c boot/boot.catalog -o bootcd.iso .</PRE
></FONT
></TD
></TR
></TABLE
>
The <TT
CLASS="OPTION"
>-b</TT
> option specifies the boot image to be used (note the
path is relative to the root of the iso9660 disk), and the <TT
CLASS="OPTION"
>-c</TT
>
option is for the boot catalog file. The <TT
CLASS="OPTION"
>-r</TT
> option will make
approptiate file ownerships and modes (see the <TT
CLASS="FILENAME"
>mkisofs</TT
>
manpage). The "." in the end says to take the source from the current
directory. </P
><P
>Now burn the CD with the usual cdrecord command and it is ready to boot.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1137"
>11.4. Create Win9x Bootable CD-Roms</A
></H2
><P
>The first step is to get hold of the bootable image used by the source
CD. But you cannot simply mount the CD under linux and dd the first 1440k to
a floppy disk or to a file like <TT
CLASS="FILENAME"
>boot.img</TT
>. Instead you
simply boot with the source CD-ROM. </P
><P
>When you boot the Win98 CD you are dropped to A: prompt which is the
actual ramdisk. And D: or Z: is where all the installables are residing. By
using the diskcopy command of dos copy the A: image into the actual floppy
drive which is now B: The command below will do this.
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>diskcopy A: B: </PRE
></FONT
></TD
></TR
></TABLE
>
It works just like dd. You can try booting from this newly created disk to
test if the booting process is similar to that of the source CD. Then the
usual dd of this floppy to a file like boot.img and then rest is as usual.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="pros.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1143.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>How the pros do it</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Frequently Asked Question (FAQ) list</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,415 @@
<HTML
><HEAD
><TITLE
>The Linux Bootdisk HOWTO</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="NEXT"
TITLE="Preface"
HREF="x21.html"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="AEN2"
>The Linux Bootdisk HOWTO</A
></H1
><H3
CLASS="AUTHOR"
><A
NAME="AEN5"
>Tom Fawcett</A
></H3
><DIV
CLASS="AFFILIATION"
><DIV
CLASS="ADDRESS"
><P
CLASS="ADDRESS"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bootdisk-HOWTO@linuxdoc.org<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
></DIV
></DIV
><P
CLASS="COPYRIGHT"
><A
HREF="ln14.html"
>Copyright</A
> &copy; 1995-2002 by Tom Fawcett</P
><P
CLASS="PUBDATE"
>v4.5, January 2002<BR></P
><DIV
><DIV
CLASS="ABSTRACT"
><A
NAME="AEN18"
></A
><P
></P
><P
> This document describes how to design and build boot/root
diskettes for Linux. These disks can be used as rescue disks or
to test new system components. You should be reasonably
familiar with system administration tasks before attempting to
build a bootdisk. If you just want a rescue disk to have for
emergencies, see <A
HREF="premade.html"
>Appendix A.1</A
>.
</P
><P
></P
></DIV
></DIV
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1. <A
HREF="x21.html"
>Preface</A
></DT
><DD
><DL
><DT
>1.1. <A
HREF="x21.html#AEN27"
>Version notes</A
></DT
><DT
>1.2. <A
HREF="x21.html#AEN35"
>To do list</A
></DT
><DT
>1.3. <A
HREF="x21.html#AEN52"
>Feedback and credits</A
></DT
><DT
>1.4. <A
HREF="x21.html#AEN60"
>Distribution policy</A
></DT
></DL
></DD
><DT
>2. <A
HREF="x68.html"
>Introduction</A
></DT
><DT
>3. <A
HREF="x88.html"
>Bootdisks and the boot process</A
></DT
><DD
><DL
><DT
>3.1. <A
HREF="x88.html#AEN93"
>The boot process</A
></DT
><DT
>3.2. <A
HREF="x88.html#AEN159"
>Disk types</A
></DT
></DL
></DD
><DT
>4. <A
HREF="buildroot.html"
>Building a root filesystem</A
></DT
><DD
><DL
><DT
>4.1. <A
HREF="buildroot.html#AEN195"
>Overview</A
></DT
><DT
>4.2. <A
HREF="buildroot.html#CREATINGROOTFS"
>Creating the filesystem</A
></DT
><DT
>4.3. <A
HREF="buildroot.html#AEN315"
>Populating the filesystem</A
></DT
><DT
>4.4. <A
HREF="buildroot.html#PAMANDNSS"
>Providing for PAM and NSS</A
></DT
><DT
>4.5. <A
HREF="buildroot.html#AEN643"
>Modules</A
></DT
><DT
>4.6. <A
HREF="buildroot.html#AEN664"
>Some final details</A
></DT
><DT
>4.7. <A
HREF="buildroot.html#WRAPPINGITUP"
>Wrapping it up</A
></DT
></DL
></DD
><DT
>5. <A
HREF="x688.html"
>Choosing a kernel</A
></DT
><DT
>6. <A
HREF="x703.html"
>Putting them together: Making the diskette(s)</A
></DT
><DD
><DL
><DT
>6.1. <A
HREF="x703.html#TRANSFERRINGWITHLILO"
>Transferring the kernel with LILO</A
></DT
><DT
>6.2. <A
HREF="x703.html#TRANSFERRINGWITHOUTLILO"
>Transferring the kernel without LILO</A
></DT
><DT
>6.3. <A
HREF="x703.html#SETTINGRAMDISKWORD"
>Setting the ramdisk word</A
></DT
><DT
>6.4. <A
HREF="x703.html#AEN831"
>Transferring the root filesystem</A
></DT
></DL
></DD
><DT
>7. <A
HREF="troubleshooting.html"
>Troubleshooting, or The Agony of Defeat</A
></DT
><DT
>8. <A
HREF="slimfast.html"
>Reducing root filesystem size</A
></DT
><DD
><DL
><DT
>8.1. <A
HREF="slimfast.html#AEN955"
>Increase the diskette density</A
></DT
><DT
>8.2. <A
HREF="slimfast.html#AEN966"
>Replace common utilities with BusyBox</A
></DT
><DT
>8.3. <A
HREF="slimfast.html#AEN973"
>Use an alternate shell</A
></DT
><DT
>8.4. <A
HREF="slimfast.html#AEN987"
>Strip libraries and binaries</A
></DT
><DT
>8.5. <A
HREF="slimfast.html#AEN1008"
>Move files to a utility disk</A
></DT
></DL
></DD
><DT
>9. <A
HREF="x1014.html"
>Miscellaneous topics</A
></DT
><DD
><DL
><DT
>9.1. <A
HREF="x1014.html#NONRAMDISKROOT"
>Non-ramdisk root filesystems</A
></DT
><DT
>9.2. <A
HREF="x1014.html#UTILITYDISK"
>Building a utility disk</A
></DT
></DL
></DD
><DT
>10. <A
HREF="pros.html"
>How the pros do it</A
></DT
><DT
>11. <A
HREF="cd-roms.html"
>Creating bootable CD-ROMs</A
></DT
><DD
><DL
><DT
>11.1. <A
HREF="cd-roms.html#AEN1106"
>What is El Torito?</A
></DT
><DT
>11.2. <A
HREF="cd-roms.html#AEN1111"
>How it Works</A
></DT
><DT
>11.3. <A
HREF="cd-roms.html#AEN1117"
>How to make it work</A
></DT
><DT
>11.4. <A
HREF="cd-roms.html#AEN1137"
>Create Win9x Bootable CD-Roms</A
></DT
></DL
></DD
><DT
>12. <A
HREF="x1143.html"
>Frequently Asked Question (FAQ) list</A
></DT
><DT
>A. <A
HREF="a1376.html"
>Resources and pointers</A
></DT
><DD
><DL
><DT
>A.1. <A
HREF="premade.html"
>Pre-made Bootdisks</A
></DT
><DT
>A.2. <A
HREF="x1422.html"
>Rescue packages</A
></DT
><DT
>A.3. <A
HREF="x1429.html"
>LILO -- the Linux loader</A
></DT
><DT
>A.4. <A
HREF="x1434.html"
>Ramdisk usage</A
></DT
><DT
>A.5. <A
HREF="x1440.html"
>The Linux boot process</A
></DT
></DL
></DD
><DT
>B. <A
HREF="a1483.html"
>LILO boot error codes</A
></DT
><DT
>C. <A
HREF="listings.html"
>Sample root filesystem listings</A
></DT
><DT
>D. <A
HREF="utilitylist.html"
>Sample utility disk directory listing</A
></DT
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x21.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Preface</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,463 @@
<HTML
><HEAD
><TITLE
>Sample root filesystem listings</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="LILO boot error codes"
HREF="a1483.html"><LINK
REL="NEXT"
TITLE="Sample utility disk directory listing"
HREF="utilitylist.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="a1483.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="utilitylist.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="APPENDIX"
><H1
CLASS="APPENDIX"
><A
NAME="LISTINGS"
>C. Sample root filesystem listings</A
></H1
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>/:
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 bin
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 4096 Nov 1 15:39 dev
drwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 1024 Nov 1 15:39 etc
drwx&#8211;&#8211;x&#8211;&#8211;x 4 root root 1024 Nov 1 15:39 lib
drwx&#8211;&#8211;x&#8211;&#8211;x 5 root root 1024 Nov 1 15:39 mnt
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 proc
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 root
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 sbin
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 tmp
drwx&#8211;&#8211;x&#8211;&#8211;x 7 root root 1024 Nov 1 15:39 usr
drwx&#8211;&#8211;x&#8211;&#8211;x 5 root root 1024 Nov 1 15:39 var
/bin:
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 62660 Nov 1 15:39 ash
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 9032 Nov 1 15:39 cat
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 10276 Nov 1 15:39 chmod
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 9592 Nov 1 15:39 chown
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 23124 Nov 1 15:39 cp
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 23028 Nov 1 15:39 date
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 14052 Nov 1 15:39 dd
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 14144 Nov 1 15:39 df
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 69444 Nov 1 15:39 egrep
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 395 Nov 1 15:39 false
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 69444 Nov 1 15:39 fgrep
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 69444 Nov 1 15:39 grep
-rwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 45436 Nov 1 15:39 gunzip
-rwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 45436 Nov 1 15:39 gzip
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 8008 Nov 1 15:39 hostname
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 12736 Nov 1 15:39 ln
-rws&#8211;&#8211;x&#8211;&#8211;x 1 root root 15284 Nov 1 15:39 login
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 29308 Nov 1 15:39 ls
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 8268 Nov 1 15:39 mkdir
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 8920 Nov 1 15:39 mknod
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 24836 Nov 1 15:39 more
-rws&#8211;&#8211;x&#8211;&#8211;x 1 root root 37640 Nov 1 15:39 mount
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 12240 Nov 1 15:39 mt
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 12932 Nov 1 15:39 mv
-r-x&#8211;&#8211;x&#8211;&#8211;x 1 root root 12324 Nov 1 15:39 ps
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 5388 Nov 1 15:39 pwd
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 10092 Nov 1 15:39 rm
lrwxrwxrwx 1 root root 3 Nov 1 15:39 sh -&#62; ash
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 25296 Nov 1 15:39 stty
-rws&#8211;&#8211;x&#8211;&#8211;x 1 root root 12648 Nov 1 15:39 su
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 4444 Nov 1 15:39 sync
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 19712 Nov 1 15:39 touch
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 395 Nov 1 15:39 true
-rws&#8211;&#8211;x&#8211;&#8211;x 1 root root 19084 Nov 1 15:39 umount
-rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 5368 Nov 1 15:39 uname
-rwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 45436 Nov 1 15:39 zcat
/dev:
lrwxrwxrwx 1 root root 6 Nov 1 15:39 cdrom -&#62; cdu31a
brw&#8211;rw&#8211;r&#8211;&#8211; 1 root root 15, 0 May 5 1998 cdu31a
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 0 Nov 1 15:29 console
crw&#8211;rw&#8211;rw&#8211; 1 root uucp 5, 64 Sep 9 19:46 cua0
crw&#8211;rw&#8211;rw&#8211; 1 root uucp 5, 65 May 5 1998 cua1
crw&#8211;rw&#8211;rw&#8211; 1 root uucp 5, 66 May 5 1998 cua2
crw&#8211;rw&#8211;rw&#8211; 1 root uucp 5, 67 May 5 1998 cua3
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 0 Aug 8 13:54 fd0
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 36 Aug 8 13:54 fd0CompaQ
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 84 Aug 8 13:55 fd0D1040
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 88 Aug 8 13:55 fd0D1120
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 12 Aug 8 13:54 fd0D360
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 16 Aug 8 13:54 fd0D720
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 120 Aug 8 13:55 fd0D800
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 32 Aug 8 13:54 fd0E2880
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 104 Aug 8 13:55 fd0E3200
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 108 Aug 8 13:55 fd0E3520
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 112 Aug 8 13:55 fd0E3840
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 28 Aug 8 13:54 fd0H1440
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 124 Aug 8 13:55 fd0H1600
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 44 Aug 8 13:55 fd0H1680
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 60 Aug 8 13:55 fd0H1722
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 76 Aug 8 13:55 fd0H1743
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 96 Aug 8 13:55 fd0H1760
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 116 Aug 8 13:55 fd0H1840
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 100 Aug 8 13:55 fd0H1920
lrwxrwxrwx 1 root root 7 Nov 1 15:39 fd0H360 &#8211;&#62; fd0D360
lrwxrwxrwx 1 root root 7 Nov 1 15:39 fd0H720 &#8211;&#62; fd0D720
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 52 Aug 8 13:55 fd0H820
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 68 Aug 8 13:55 fd0H830
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 4 Aug 8 13:54 fd0d360
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 8 Aug 8 13:54 fd0h1200
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 40 Aug 8 13:54 fd0h1440
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 56 Aug 8 13:55 fd0h1476
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 72 Aug 8 13:55 fd0h1494
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 92 Aug 8 13:55 fd0h1600
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 20 Aug 8 13:54 fd0h360
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 48 Aug 8 13:55 fd0h410
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 64 Aug 8 13:55 fd0h420
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 24 Aug 8 13:54 fd0h720
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root floppy 2, 80 Aug 8 13:55 fd0h880
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 0 May 5 1998 hda
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 1 May 5 1998 hda1
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 2 May 5 1998 hda2
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 3 May 5 1998 hda3
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 4 May 5 1998 hda4
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 5 May 5 1998 hda5
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 6 May 5 1998 hda6
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 64 May 5 1998 hdb
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 65 May 5 1998 hdb1
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 66 May 5 1998 hdb2
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 67 May 5 1998 hdb3
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 68 May 5 1998 hdb4
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 69 May 5 1998 hdb5
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 3, 70 May 5 1998 hdb6
crw&#8211;r&#8211;&#8211;&#8211;&#8211;&#8211; 1 root kmem 1, 2 May 5 1998 kmem
crw&#8211;r&#8211;&#8211;&#8211;&#8211;&#8211; 1 root kmem 1, 1 May 5 1998 mem
lrwxrwxrwx 1 root root 12 Nov 1 15:39 modem &#8211;&#62; ttyS1
lrwxrwxrwx 1 root root 12 Nov 1 15:39 mouse &#8211;&#62; psaux
crw&#8211;rw&#8211;rw&#8211; 1 root root 1, 3 May 5 1998 null
crwxrwxrwx 1 root root 10, 1 Oct 5 20:22 psaux
brw&#8211;r&#8211;&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 1 May 5 1998 ram
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 0 May 5 1998 ram0
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 1 May 5 1998 ram1
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 2 May 5 1998 ram2
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 3 May 5 1998 ram3
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 4 May 5 1998 ram4
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 5 May 5 1998 ram5
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 6 May 5 1998 ram6
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 7 May 5 1998 ram7
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 8 May 5 1998 ram8
brw&#8211;rw&#8211;&#8211;&#8211;&#8211; 1 root disk 1, 9 May 5 1998 ram9
lrwxrwxrwx 1 root root 4 Nov 1 15:39 ramdisk &#8211;&#62; ram0
<EM
>*** I have only included devices for the IDE partitions I use.
*** If you use SCSI, then use the /dev/sdXX devices instead.</EM
>
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 0 May 5 1998 tty0
crw&#8211;w&#8211;&#8211;&#8211;&#8211;&#8211; 1 root tty 4, 1 Nov 1 15:39 tty1
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 2 Nov 1 15:29 tty2
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 3 Nov 1 15:29 tty3
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 4 Nov 1 15:29 tty4
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 5 Nov 1 15:29 tty5
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 6 Nov 1 15:29 tty6
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4, 7 May 5 1998 tty7
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root tty 4, 8 May 5 1998 tty8
crw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root tty 4, 9 May 8 12:57 tty9
crw&#8211;rw&#8211;rw&#8211; 1 root root 4, 65 Nov 1 12:17 ttyS1
crw&#8211;rw&#8211;rw&#8211; 1 root root 1, 5 May 5 1998 zero
/etc:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 164 Nov 1 15:39 conf.modules
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 668 Nov 1 15:39 fstab
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 71 Nov 1 15:39 gettydefs
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 389 Nov 1 15:39 group
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 413 Nov 1 15:39 inittab
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 65 Nov 1 15:39 issue
&#8211;rw&#8211;r&#8211;&#8211;r&#8211;&#8211; 1 root root 746 Nov 1 15:39 ld.so.cache
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 32 Nov 1 15:39 motd
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 949 Nov 1 15:39 nsswitch.conf
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 pam.d
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 139 Nov 1 15:39 passwd
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 516 Nov 1 15:39 profile
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 387 Nov 1 15:39 rc
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 55 Nov 1 15:39 shells
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 774 Nov 1 15:39 termcap
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 78 Nov 1 15:39 ttytype
lrwxrwxrwx 1 root root 15 Nov 1 15:39 utmp &#8211;&#62; ../var/run/utmp
lrwxrwxrwx 1 root root 15 Nov 1 15:39 wtmp &#8211;&#62; ../var/log/wtmp
/etc/pam.d:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 356 Nov 1 15:39 other
/lib:
&#8211;rwxr&#8211;xr&#8211;x 1 root root 45415 Nov 1 15:39 ld&#8211;2.0.7.so
lrwxrwxrwx 1 root root 11 Nov 1 15:39 ld&#8211;linux.so.2 &#8211;&#62; ld&#8211;2.0.7.so
&#8211;rwxr&#8211;xr&#8211;x 1 root root 731548 Nov 1 15:39 libc&#8211;2.0.7.so
lrwxrwxrwx 1 root root 13 Nov 1 15:39 libc.so.6 &#8211;&#62; libc&#8211;2.0.7.so
lrwxrwxrwx 1 root root 17 Nov 1 15:39 libcom_err.so.2 &#8211;&#62; libcom_err.so.2.0
&#8211;rwxr&#8211;xr&#8211;x 1 root root 6209 Nov 1 15:39 libcom_err.so.2.0
&#8211;rwxr&#8211;xr&#8211;x 1 root root 153881 Nov 1 15:39 libcrypt&#8211;2.0.7.so
lrwxrwxrwx 1 root root 17 Nov 1 15:39 libcrypt.so.1 &#8211;&#62; libcrypt&#8211;2.0.7.so
&#8211;rwxr&#8211;xr&#8211;x 1 root root 12962 Nov 1 15:39 libdl&#8211;2.0.7.so
lrwxrwxrwx 1 root root 14 Nov 1 15:39 libdl.so.2 &#8211;&#62; libdl&#8211;2.0.7.so
lrwxrwxrwx 1 root root 16 Nov 1 15:39 libext2fs.so.2 &#8211;&#62; libext2fs.so.2.4
&#8211;rwxr&#8211;xr&#8211;x 1 root root 81382 Nov 1 15:39 libext2fs.so.2.4
&#8211;rwxr&#8211;xr&#8211;x 1 root root 25222 Nov 1 15:39 libnsl&#8211;2.0.7.so
lrwxrwxrwx 1 root root 15 Nov 1 15:39 libnsl.so.1 &#8211;&#62; libnsl&#8211;2.0.7.so
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 178336 Nov 1 15:39 libnss_files&#8211;2.0.7.so
lrwxrwxrwx 1 root root 21 Nov 1 15:39 libnss_files.so.1 &#8211;&#62; libnss_files&#8211;2.0.7.so
lrwxrwxrwx 1 root root 14 Nov 1 15:39 libpam.so.0 &#8211;&#62; libpam.so.0.64
&#8211;rwxr&#8211;xr&#8211;x 1 root root 26906 Nov 1 15:39 libpam.so.0.64
lrwxrwxrwx 1 root root 19 Nov 1 15:39 libpam_misc.so.0 &#8211;&#62; libpam_misc.so.0.64
&#8211;rwxr&#8211;xr&#8211;x 1 root root 7086 Nov 1 15:39 libpam_misc.so.0.64
&#8211;r&#8211;xr&#8211;xr&#8211;x 1 root root 35615 Nov 1 15:39 libproc.so.1.2.6
lrwxrwxrwx 1 root root 15 Nov 1 15:39 libpwdb.so.0 &#8211;&#62; libpwdb.so.0.54
&#8211;rw&#8211;r&#8211;r&#8211;&#8211;&#8211; 1 root root 121899 Nov 1 15:39 libpwdb.so.0.54
lrwxrwxrwx 1 root root 19 Nov 1 15:39 libtermcap.so.2 &#8211;&#62; libtermcap.so.2.0.8
&#8211;rwxr&#8211;xr&#8211;x 1 root root 12041 Nov 1 15:39 libtermcap.so.2.0.8
&#8211;rwxr&#8211;xr&#8211;x 1 root root 12874 Nov 1 15:39 libutil&#8211;2.0.7.so
lrwxrwxrwx 1 root root 16 Nov 1 15:39 libutil.so.1 &#8211;&#62; libutil&#8211;2.0.7.so
lrwxrwxrwx 1 root root 14 Nov 1 15:39 libuuid.so.1 &#8211;&#62; libuuid.so.1.1
&#8211;rwxr&#8211;xr&#8211;x 1 root root 8039 Nov 1 15:39 libuuid.so.1.1
drwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 1024 Nov 1 15:39 modules
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 security
/lib/modules:
drwx&#8211;&#8211;x&#8211;&#8211;x 4 root root 1024 Nov 1 15:39 2.0.35
/lib/modules/2.0.35:
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 block
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 cdrom
/lib/modules/2.0.35/block:
drwx&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 7156 Nov 1 15:39 loop.o
/lib/modules/2.0.35/cdrom:
drwx&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 24108 Nov 1 15:39 cdu31a.o
/lib/security:
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 8771 Nov 1 15:39 pam_permit.so
<EM
>*** Directory stubs for mounting</EM
>
/mnt:
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 cdrom
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 floppy
/proc:
/root:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 176 Nov 1 15:39 .bashrc
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 182 Nov 1 15:39 .cshrc
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 455 Nov 1 15:39 .profile
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 4014 Nov 1 15:39 .tcshrc
/sbin:
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 23976 Nov 1 15:39 depmod
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 274600 Nov 1 15:39 e2fsck
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 41268 Nov 1 15:39 fdisk
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 9396 Nov 1 15:39 fsck
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 274600 Nov 1 15:39 fsck.ext2
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 29556 Nov 1 15:39 getty
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 6620 Nov 1 15:39 halt
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 23116 Nov 1 15:39 init
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 25612 Nov 1 15:39 insmod
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 10368 Nov 1 15:39 kerneld
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 110400 Nov 1 15:39 ldconfig
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 6108 Nov 1 15:39 lsmod
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 17400 Nov 1 15:39 mke2fs
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 4072 Nov 1 15:39 mkfs
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 17400 Nov 1 15:39 mkfs.ext2
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 5664 Nov 1 15:39 mkswap
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 22032 Nov 1 15:39 modprobe
lrwxrwxrwx 1 root root 4 Nov 1 15:39 reboot &#8211;&#62; halt
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 7492 Nov 1 15:39 rmmod
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 12932 Nov 1 15:39 shutdown
lrwxrwxrwx 1 root root 6 Nov 1 15:39 swapoff &#8211;&#62; swapon
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 5124 Nov 1 15:39 swapon
lrwxrwxrwx 1 root root 4 Nov 1 15:39 telinit &#8211;&#62; init
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 6944 Nov 1 15:39 update
/tmp:
/usr:
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 bin
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 lib
drwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 1024 Nov 1 15:39 man
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 sbin
drwx&#8211;&#8211;x&#8211;&#8211;x 3 root root 1024 Nov 1 15:39 share
lrwxrwxrwx 1 root root 10 Nov 1 15:39 tmp &#8211;&#62; ../var/tmp
/usr/bin:
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 37164 Nov 1 15:39 afio
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 5044 Nov 1 15:39 chroot
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 10656 Nov 1 15:39 cut
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 63652 Nov 1 15:39 diff
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 12972 Nov 1 15:39 du
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 56552 Nov 1 15:39 find
&#8211;r&#8211;x&#8211;&#8211;x&#8211;&#8211;x 1 root root 6280 Nov 1 15:39 free
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 7680 Nov 1 15:39 head
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 8504 Nov 1 15:39 id
&#8211;r&#8211;sr&#8211;xr&#8211;x 1 root bin 4200 Nov 1 15:39 passwd
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 14856 Nov 1 15:39 tail
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 19008 Nov 1 15:39 tr
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 7160 Nov 1 15:39 wc
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 4412 Nov 1 15:39 whoami
/usr/lib:
lrwxrwxrwx 1 root root 17 Nov 1 15:39 libncurses.so.4 &#8211;&#62; libncurses.so.4.2
&#8211;rw&#8211;r&#8211;r&#8211;&#8211;&#8211; 1 root root 260474 Nov 1 15:39 libncurses.so.4.2
/usr/sbin:
&#8211;r&#8211;x&#8211;&#8211;x&#8211;&#8211;x 1 root root 13684 Nov 1 15:39 fuser
&#8211;rwx&#8211;&#8211;x&#8211;&#8211;x 1 root root 3876 Nov 1 15:39 mklost+found
/usr/share:
drwx&#8211;&#8211;x&#8211;&#8211;x 4 root root 1024 Nov 1 15:39 terminfo
/usr/share/terminfo:
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 l
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 v
/usr/share/terminfo/l:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 1552 Nov 1 15:39 linux
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 1516 Nov 1 15:39 linux&#8211;m
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 1583 Nov 1 15:39 linux&#8211;nic
/usr/share/terminfo/v:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 2 root root 1143 Nov 1 15:39 vt100
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 2 root root 1143 Nov 1 15:39 vt100&#8211;am
/var:
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 log
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 run
drwx&#8211;&#8211;x&#8211;&#8211;x 2 root root 1024 Nov 1 15:39 tmp
/var/log:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 0 Nov 1 15:39 wtmp
/var/run:
&#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 0 Nov 1 15:39 utmp
/var/tmp:</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="a1483.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="utilitylist.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>LILO boot error codes</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Sample utility disk directory listing</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,284 @@
<HTML
><HEAD
><TITLE
>Pre-made Bootdisks</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Resources and pointers"
HREF="a1376.html"><LINK
REL="PREVIOUS"
TITLE="Resources and pointers"
HREF="a1376.html"><LINK
REL="NEXT"
TITLE="Rescue packages"
HREF="x1422.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="a1376.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>A. Resources and pointers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1422.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="PREMADE"
>A.1. Pre-made Bootdisks</A
></H1
><P
>These are sources for distribution bootdisks. <EM
>Please use one of
the mirror sites to reduce the load on these machines.</EM
>
<P
></P
><UL
><LI
><P
> <A
HREF="http://distro.ibiblio.org/pub/Linux/distributions/slackware/bootdsks.144/"
TARGET="_top"
>Slackware bootdisks</A
>,
<A
HREF="http://distro.ibiblio.org/pub/Linux/distributions/slackware/rootdsks/"
TARGET="_top"
>rootdisks</A
>
and <A
HREF="http://www.slackware.com/getslack/"
TARGET="_top"
>Slackware mirror sites</A
></P
></LI
><LI
><P
> <A
HREF="ftp://ftp.redhat.com/pub/redhat/linux/current/en/os/i386/images/"
TARGET="_top"
>RedHat bootdisks</A
> and <A
HREF="http://www.redhat.com/mirrors.html"
TARGET="_top"
>Red Hat mirror sites</A
>&#13;</P
></LI
><LI
><P
> <A
HREF="ftp://ftp.debian.org/debian/dists/stable/main/disks-i386/current/"
TARGET="_top"
>Debian bootdisks</A
> and <A
HREF="ftp://ftp.debian.org/debian/README.mirrors.html"
TARGET="_top"
>Debian mirror sites</A
>&#13;</P
></LI
><LI
><P
><A
HREF="http://www.linux-mandrake.com/en/ftp.php3"
TARGET="_top"
>Mandrake
downloads</A
></P
></LI
></UL
>&#13;</P
><P
>&#13;In addition to the distribution bootdisks, the following rescue disk
images are available. Unless otherwise specified, these are available in
the directory
<A
HREF="http://www.ibiblio.org/pub/Linux/system/recovery/!INDEX.html"
TARGET="_top"
><TT
CLASS="FILENAME"
>http://www.ibiblio.org/pub/Linux/system/recovery/!INDEX.html</TT
></A
></P
><P
>&#13;<P
></P
><UL
><LI
><P
><TT
CLASS="LITERAL"
>RIP</TT
> is a boot/rescue system which comes in several
versions: one that fits on a 1.44M floppy diskette and one that fits on a
CD-ROM. It has large file support and many utility programs for disk
maintenance and rescue. It has support for ext2, ext3, iso9660, msdos, ntfs,
reiserfs, ufs and vfat. RIP is available from
<A
HREF="http://www.tux.org/pub/people/kent-robotti/looplinux/rip/index.html"
TARGET="_top"
>http://www.tux.org/pub/people/kent-robotti/looplinux/rip/index.html</A
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>tomsrtbt</TT
>, by Tom Oehser, is a single-disk boot/root disk
based on kernel 2.0, with a large set of features and support programs. It
supports IDE, SCSI, tape, network adaptors, PCMCIA and more. About 100
utility programs and tools are included for fixing and restoring disks.
The package also includes scripts for disassembling and reconstructing the
images so that new material can be added if necessary.</P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>rescue02</TT
>, by John Comyns, is a rescue disk based on kernel
1.3.84, with support for IDE and Adaptec 1542 and NCR53C7,8xx. It uses ELF
binaries but it has enough commands so that it can be used on any system.
There are modules that can be loaded after booting for all other SCSI
cards. It probably won't work on systems with 4 mb of ram since it uses a
3 mb ram disk.</P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>resque_disk-2.0.22</TT
>, by Sergei Viznyuk, is a
full-featured boot/root disk based on kernel 2.0.22 with built-in
support for IDE, many difference SCSI controllers, and ELF/AOUT. Also
includes many modules and useful utilities for repairing and restoring
a hard disk.</P
></LI
><LI
><P
><A
HREF="http://www.ibiblio.org/pub/Linux/system/recovery/images"
TARGET="_top"
><TT
CLASS="LITERAL"
>cramdisk</TT
> images</A
>, based on the 2.0.23 kernel,
available for 4 meg and 8 meg machines. They include math emulation and
networking (PPP and dialin script, NE2000, 3C509), or support for the
parallel port ZIP drive. These diskette images will boot on a 386 with 4MB
RAM. MSDOS support is included so you can download from the net to a DOS
partition.</P
></LI
></UL
>&#13;</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="a1376.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1422.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Resources and pointers</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1376.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Rescue packages</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,224 @@
<HTML
><HEAD
><TITLE
>How the pros do it</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Miscellaneous topics"
HREF="x1014.html"><LINK
REL="NEXT"
TITLE="Creating bootable CD-ROMs"
HREF="cd-roms.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1014.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="cd-roms.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="PROS"
>10. How the pros do it</A
></H1
><P
>You may notice that the bootdisks used by major distributions such as
Slackware, RedHat or Debian seem more sophisticated than what is described
in this document. Professional distribution bootdisks are based on the
same principles outlined here, but employ various tricks because their
bootdisks have additional requirements. First, they must be able to work
with a wide variety of hardware, so they must be able to interact with the
user and load various device drivers. Second, they must be prepared to
work with many different installation options, with varying degrees of
automation. Finally, distribution bootdisks usually combine installation
and rescue capabilities.</P
><P
>Some bootdisks use a feature called <EM
>initrd</EM
>
(<EM
>initial ramdisk</EM
>). This feature was introduced
around 2.0.x and allows a kernel to boot in two phases. When the
kernel first boots, it loads an initial ramdisk image from the boot
disk. This initial ramdisk is a root filesystem containing a program
that runs before the real root fs is loaded. This program usually
inspects the environment and/or asks the user to select various boot
options, such as the device from which to load the real rootdisk. It
typically loads additional modules not built in to the kernel. When
this initial program exits, the kernel loads the real root image and
booting continues normally. For further information on
<B
CLASS="COMMAND"
>initrd</B
>, see your local file <A
HREF="file:/usr/src/linux/Documentation/initrd.txt"
TARGET="_top"
><TT
CLASS="FILENAME"
>/usr/src/linux/Documentation/initrd.txt</TT
></A
>
and <A
HREF="ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/initrd-example.tgz"
TARGET="_top"
><TT
CLASS="FILENAME"
>ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/initrd-example.tgz</TT
></A
></P
><P
>The following are summaries of how each distribution's installation
disks seem to work, based on inspecting their filesystems and/or
source code. We do not guarantee that this information is completely
accurate, or that they have not changed since the versions noted.</P
><P
> Slackware (v.3.1) uses a straightforward LILO boot similar to what
is described in <A
HREF="x703.html#TRANSFERRINGWITHLILO"
>Section 6.1</A
>. The
Slackware bootdisk prints a bootup message (&#8220;<TT
CLASS="LITERAL"
>Welcome to the
Slackware Linux bootkernel disk!</TT
>&#8221;) using LILO's
<TT
CLASS="LITERAL"
>message</TT
> parameter. This instructs the user to enter a
boot parameter line if necessary. After booting, a root filesystem is
loaded from a second disk. The user invokes a <B
CLASS="COMMAND"
>setup</B
>
script which starts the installation. Instead of using a modular kernel,
Slackware provides many different kernels and depends upon the user to
select the one matching his or her hardware requirements.</P
><P
> RedHat (v.4.0) also uses a LILO boot. It loads a compressed ramdisk
on the first disk, which runs a custom <B
CLASS="COMMAND"
>init</B
> program.
This program queries for drivers then loads additional files from a
supplemental disk if necessary.</P
><P
> Debian (v.1.3) is probably the most sophisticated of the
installation disk sets. It uses the SYSLINUX loader to arrange various
load options, then uses an <TT
CLASS="LITERAL"
>initrd</TT
> image to guide the
user through installation. It appears to use both a customized
<B
CLASS="COMMAND"
>init</B
> and a customized shell.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1014.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="cd-roms.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Miscellaneous topics</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Creating bootable CD-ROMs</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,369 @@
<HTML
><HEAD
><TITLE
>Reducing root filesystem size</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Troubleshooting, or The Agony of Defeat"
HREF="troubleshooting.html"><LINK
REL="NEXT"
TITLE="Miscellaneous topics"
HREF="x1014.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="troubleshooting.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1014.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="SLIMFAST"
>8. Reducing root filesystem size</A
></H1
><P
>&#13;One of the main problems with building bootdisks is getting everything to fit
into one (or even two) diskettes. Even when files are compressed this can be
very difficult, because Linux system components keep growing. Here are some
common techniques used to make everything fit.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN955"
>8.1. Increase the diskette density</A
></H2
><P
>By default, floppy diskettes are formatted at 1440K, but higher density
formats are possible. Whether you can boot from higher density
disks depends mostly on your BIOS.
<TT
CLASS="FILENAME"
>fdformat</TT
> will format disks for
the following sizes: 1600K, 1680K, 1722K, 1743K, 1760K, 1840K, and 1920K.
See the <B
CLASS="COMMAND"
>fdformat</B
> man page and
<TT
CLASS="FILENAME"
>/usr/src/linux/Documentation/devices.txt</TT
>.</P
><P
> But what diskette densities/geometries will your machine support? Here
are some (lightly edited) answers from Alain Knaff, the author of fdutils.</P
><A
NAME="AEN962"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>This is more an issue of the BIOS rather than the physical format of the disk.
If the BIOS decides that any sector number greater than 18 is bad, then
there is not much we can do. Indeed, short of disassembling the BIOS, trial
and error seems to be the only way to find out. However, if the BIOS supports
ED disks (extra density: 36 sectors/track and 2.88MB), there's a chance that
1722K disks are supported as well.</P
><P
>Superformatted disks with more than 21 sectors/track are likely not bootable:
indeed, those use sectors of non-standard sizes (1024 bytes in a sector
instead of 512, for example), and are likely not bootable. It should however
be possible to write a special bootsector program to work around this. If I
remember correctly, the DOS 2m utility has such a beast, as does OS/2's XDF
utilities.</P
><P
>Some BIOSes artificially claim that any sector number greater than 18
must be in error. As 1722K disks use sector numbers up to 21, these
would not be bootable. The best way to test would be to format a test
DOS or syslinus disk as 1722K and make it bootable. If you use LILO,
don't use the option linear (or else LILO would assume that the disk
is the default 18 sectors/track, and the disk will fail to boot even
if supported by the BIOS).</P
></BLOCKQUOTE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN966"
>8.2. Replace common utilities with BusyBox</A
></H2
><P
> Much root filesystem space is consumed by common GNU system utilities
such as <TT
CLASS="LITERAL"
>cat, chmod, cp, dd, df</TT
>, etc. The
<EM
>BusyBox</EM
> project was designed to provide minimal
replacements for these common system utilities. BusyBox supplies one single
monolithic executable file, <TT
CLASS="LITERAL"
>/bin/busybox</TT
>, about 150K, which
implements the functions of these utilities. You then create symlinks from
different utilities to this executable; busybox sees how it was called and
invokes the correct code. BusyBox even includes a basic shell.
BusyBox is available in binary packages for many distributions, and source
code is available from <A
HREF="http://www.busybox.net/"
TARGET="_top"
>the BusyBox
site</A
>.
&#13;</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN973"
>8.3. Use an alternate shell</A
></H2
><P
> Some of the popular shells for Linux, such as <B
CLASS="COMMAND"
>bash</B
>
and <B
CLASS="COMMAND"
>tcsh</B
>, are large and require many libraries. If you
don't use the BusyBox shell, you should still consider replacing your shell
anyway. Some light-weight alternatives are <B
CLASS="COMMAND"
>ash</B
>,
<B
CLASS="COMMAND"
>lsh</B
>, <B
CLASS="COMMAND"
>kiss</B
> and <B
CLASS="COMMAND"
>smash</B
>,
which are much smaller and require few (or no) libraries. Most of these
replacement shells are available from <A
HREF="http://www.ibiblio.org/pub/Linux/system/shells/"
TARGET="_top"
><TT
CLASS="FILENAME"
>http://www.ibiblio.org/pub/Linux/system/shells/</TT
></A
>. Make sure any shell you use is capable of running
commands in all the <TT
CLASS="FILENAME"
>rc</TT
> files you include on your
bootdisk.
&#13;</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN987"
>8.4. Strip libraries and binaries</A
></H2
><P
> Many libraries and binaries are distributed with debugging information.
Running <B
CLASS="COMMAND"
>file</B
> on these files will tell you ``<TT
CLASS="LITERAL"
>not
stripped</TT
>'' if so.
When copying binaries to
your root filesystem, it is good practice to use: <TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> objcopy --strip-all FROM TO</PRE
></FONT
></TD
></TR
></TABLE
>
<DIV
CLASS="IMPORTANT"
><P
></P
><TABLE
CLASS="IMPORTANT"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/important.gif"
HSPACE="5"
ALT="Important"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>When copying libraries, be sure to use <TT
CLASS="OPTION"
>strip-debug</TT
> instead of
<TT
CLASS="OPTION"
>strip-all</TT
>.</P
></TD
></TR
></TABLE
></DIV
>&#13;</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1008"
>8.5. Move files to a utility disk</A
></H2
><P
> If some of your binaries are not needed immediately to boot or login,
you can move them to a utility disk. See <A
HREF="x1014.html#UTILITYDISK"
>Section 9.2</A
> for
details. You may also consider moving modules to a utility disk as well.
&#13;</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="troubleshooting.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1014.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Troubleshooting, or The Agony of Defeat</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Miscellaneous topics</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,495 @@
<HTML
><HEAD
><TITLE
>Troubleshooting, or The Agony of Defeat</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Putting them together: Making the diskette(s)"
HREF="x703.html"><LINK
REL="NEXT"
TITLE="Reducing root filesystem size"
HREF="slimfast.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x703.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="slimfast.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="TROUBLESHOOTING"
>7. Troubleshooting, or The Agony of Defeat</A
></H1
><P
>When building bootdisks, the first few tries often will not boot. The general
approach to building a root disk is to assemble components from your existing
system, and try and get the diskette-based system to the point where it displays
messages on the console. Once it starts talking to you, the battle is half over
because you can see what it is complaining about, and you can fix individual
problems until the system works smoothly. If the system just hangs with no
explanation, finding the cause can be difficult. The recommended procedure for
investigating the problem where the system will not talk to you is as follows:</P
><P
>&#13;<P
></P
><UL
><LI
><P
>You may see a message like this:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Kernel panic: VFS: Unable to mount root fs on XX:YY</PRE
></FONT
></TD
></TR
></TABLE
>
This is a common problem and it has only a few causes. First, check the device
<EM
>XX:YY</EM
> against the list of device codes in
<TT
CLASS="FILENAME"
>/usr/src/linux/Documentation/devices.txt</TT
>. If it is
incorrect, you probably didn't do an <B
CLASS="COMMAND"
>rdev -R</B
>, or you did it
on the wrong image. If the device code is correct, then check carefully the
device drivers compiled into your kernel. Make sure it has floppy disk, ramdisk
and ext2 filesystem support built-in.</P
></LI
><LI
><P
>If you see many errors like:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>end_request: I/O error, dev 01:00 (ramdisk), sector NNN</PRE
></FONT
></TD
></TR
></TABLE
>
This is an I/O error from the ramdisk driver, usually because the kernel is
trying to write beyond the end of the device. The ramdisk is too small to hold
the root filesystem. Check your bootdisk kernel's initialization messages for a
line like:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> Ramdisk driver initialized : 16 ramdisks of 4096K size</PRE
></FONT
></TD
></TR
></TABLE
>
Check this size against the <EM
>uncompressed</EM
> size of
the root filesystem. If the ramdisks aren't large enough, make them
larger.</P
></LI
><LI
><P
>Check that the root disk actually contains the directories you think
it does. It is easy to copy at the wrong level so that you end up
with something like <TT
CLASS="FILENAME"
>/rootdisk/bin</TT
> instead of
<TT
CLASS="FILENAME"
>/bin</TT
> on your root diskette.&#13;</P
></LI
><LI
><P
>Check that there is a <TT
CLASS="FILENAME"
>/lib/libc.so</TT
> with the same link that
appears in your <TT
CLASS="FILENAME"
>/lib</TT
> directory on your hard disk.&#13;</P
></LI
><LI
><P
>Check that any symbolic links in your <TT
CLASS="FILENAME"
>/dev</TT
>
directory in your existing system also exist on your root diskette
filesystem, where those links are to devices which you have included
in your root diskette. In particular,
<TT
CLASS="FILENAME"
>/dev/console</TT
> links are essential in many cases.</P
></LI
><LI
><P
>Check that you have included <TT
CLASS="FILENAME"
>/dev/tty1, /dev/null, /dev/zero,
/dev/mem, /dev/ram</TT
> and <TT
CLASS="FILENAME"
>/dev/kmem</TT
> files.&#13;</P
></LI
><LI
><P
>Check your kernel configuration -- support for all resources
required up to login point must be built in, not modules.
So <EM
>ramdisk and ext2 support must be built-in</EM
>.&#13;</P
></LI
><LI
><P
>Check that your kernel root device and ramdisk settings are correct. </P
></LI
></UL
></P
><P
>Once these general aspects have been covered, here are some more
specific files to check:
<P
></P
><OL
TYPE="1"
><LI
><P
>Make sure <B
CLASS="COMMAND"
>init</B
> is included as
<TT
CLASS="FILENAME"
>/sbin/init</TT
> or <TT
CLASS="FILENAME"
>/bin/init</TT
>.
Make sure it is executable.</P
></LI
><LI
><P
>Run <B
CLASS="COMMAND"
>ldd init</B
> to check init's libraries. Usually
this is just <TT
CLASS="FILENAME"
>libc.so</TT
>, but check anyway. Make
sure you included the necessary libraries and loaders.</P
></LI
><LI
><P
>Make sure you have the right loader for your libraries --
<TT
CLASS="FILENAME"
>ld.so</TT
> for a.out or <TT
CLASS="FILENAME"
>ld-linux.so</TT
>
for ELF.&#13;</P
></LI
><LI
><P
>Check the <TT
CLASS="FILENAME"
>/etc/inittab</TT
> on your bootdisk filesystem for
the calls to <B
CLASS="COMMAND"
>getty</B
> (or some <B
CLASS="COMMAND"
>getty</B
>-like
program, such as <B
CLASS="COMMAND"
>agetty</B
>, <B
CLASS="COMMAND"
>mgetty</B
> or
<B
CLASS="COMMAND"
>getty_ps</B
>). Double-check these against your hard
disk <TT
CLASS="FILENAME"
>inittab</TT
>. Check the man pages of the program you use
to make sure these make sense. <TT
CLASS="FILENAME"
>inittab</TT
> is possibly the
trickiest part because its syntax and content depend on the init program used
and the nature of the system. The only way to tackle it is to read the man
pages for <B
CLASS="COMMAND"
>init</B
> and <TT
CLASS="FILENAME"
>inittab</TT
> and work
out exactly what your existing system is doing when it boots. Check to make
sure <TT
CLASS="FILENAME"
>/etc/inittab</TT
> has a system initialisation entry.
This should contain a command to execute the system initialization script,
which must exist.&#13;</P
></LI
><LI
><P
> As with <B
CLASS="COMMAND"
>init</B
>, run <B
CLASS="COMMAND"
>ldd</B
> on your
<B
CLASS="COMMAND"
>getty</B
> to see what it needs, and make sure the necessary
library files and loaders were included in your root filesystem.&#13;</P
></LI
><LI
><P
>Be sure you have included a shell program (e.g., <B
CLASS="COMMAND"
>bash</B
> or
<B
CLASS="COMMAND"
>ash</B
>)
capable of running all of your rc scripts.&#13;</P
></LI
><LI
><P
>If you have a <TT
CLASS="FILENAME"
>/etc/ld.so.cache</TT
> file on your rescue disk,
remake it.</P
></LI
></OL
>&#13;</P
><P
>If <B
CLASS="COMMAND"
>init</B
> starts, but you get a message like:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> Id xxx respawning too fast: disabled for 5 minutes </PRE
></FONT
></TD
></TR
></TABLE
>
it is coming from <B
CLASS="COMMAND"
>init</B
>, usually indicating that
<B
CLASS="COMMAND"
>getty</B
> or <B
CLASS="COMMAND"
>login</B
> is dying as soon as it
starts up. Check the <B
CLASS="COMMAND"
>getty</B
> and <B
CLASS="COMMAND"
>login</B
>
executables and the libraries they depend upon. Make sure the invocations in
<TT
CLASS="FILENAME"
>/etc/inittab</TT
> are correct. If you get strange messages
from <B
CLASS="COMMAND"
>getty</B
>, it may mean the calling form in
<TT
CLASS="FILENAME"
>/etc/inittab</TT
> is wrong.</P
><P
> If you get a login prompt, and you enter a valid login name but the
system prompts you for another login name immediately, the problem may be
with PAM or NSS. See <A
HREF="buildroot.html#PAMANDNSS"
>Section 4.4</A
>. The problem may also be
that you use shadow passwords and didn't copy
<TT
CLASS="FILENAME"
>/etc/shadow</TT
> to your bootdisk.</P
><P
> If you try to run some executable, such as <B
CLASS="COMMAND"
>df</B
>, which
is on your rescue disk but you yields a message like: <TT
CLASS="LITERAL"
>df: not
found</TT
>, check two things: (1) Make sure the directory containing the
binary is in your PATH, and (2) make sure you have libraries (and loaders) the
program needs. </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x703.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="slimfast.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Putting them together: Making the diskette(s)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Reducing root filesystem size</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,153 @@
<HTML
><HEAD
><TITLE
>Sample utility disk directory listing</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Sample root filesystem listings"
HREF="listings.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="listings.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
>&nbsp;</TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="APPENDIX"
><H1
CLASS="APPENDIX"
><A
NAME="UTILITYLIST"
>D. Sample utility disk directory listing</A
></H1
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>total 579
&#8211;rwxr&#8211;xr&#8211;x 1 root root 42333 Jul 28 19:05 cpio
&#8211;rwxr&#8211;xr&#8211;x 1 root root 32844 Aug 28 19:50 debugfs
&#8211;rwxr&#8211;xr&#8211;x 1 root root 103560 Jul 29 21:31 elvis
&#8211;rwxr&#8211;xr&#8211;x 1 root root 29536 Jul 28 19:04 fdisk
&#8211;rw&#8211;r&#8211;r&#8211;&#8211;&#8211; 1 root root 128254 Jul 28 19:03 ftape.o
&#8211;rwxr&#8211;xr&#8211;x 1 root root 17564 Jul 25 03:21 ftmt
&#8211;rwxr&#8211;xr&#8211;x 1 root root 64161 Jul 29 20:47 grep
&#8211;rwxr&#8211;xr&#8211;x 1 root root 45309 Jul 29 20:48 gzip
&#8211;rwxr&#8211;xr&#8211;x 1 root root 23560 Jul 28 19:04 insmod
&#8211;rwxr&#8211;xr&#8211;x 1 root root 118 Jul 28 19:04 lsmod
lrwxrwxrwx 1 root root 5 Jul 28 19:04 mt &#8211;&#62; mt&#8211;st
&#8211;rwxr&#8211;xr&#8211;x 1 root root 9573 Jul 28 19:03 mt&#8211;st
lrwxrwxrwx 1 root root 6 Jul 28 19:05 rmmod &#8211;&#62; insmod
&#8211;rwxr&#8211;xr&#8211;x 1 root root 104085 Jul 28 19:05 tar
lrwxrwxrwx 1 root root 5 Jul 29 21:35 vi &#8211;&#62; elvis</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="listings.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Sample root filesystem listings</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,307 @@
<HTML
><HEAD
><TITLE
>Miscellaneous topics</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Reducing root filesystem size"
HREF="slimfast.html"><LINK
REL="NEXT"
TITLE="How the pros do it"
HREF="pros.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="slimfast.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="pros.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN1014"
>9. Miscellaneous topics</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="NONRAMDISKROOT"
>9.1. Non-ramdisk root filesystems</A
></H2
><P
><A
HREF="buildroot.html"
>Section 4</A
> gave instructions for building a compressed root
filesystem which is loaded to ramdisk when the system boots. This method
has many advantages so it is commonly used. However, some systems with
little memory cannot afford the RAM needed for this, and they must use root
filesystems mounted directly from the diskette.</P
><P
>Such filesystems are actually easier to build than compressed root filesystems
because they can be built on a diskette rather than on some other device, and
they do not have to be compressed. We will outline the procedure as it
differs from the instructions above. If you choose to do this, keep in mind
that you will have <EM
>much less space</EM
> available.</P
><P
>&#13;<P
></P
><OL
TYPE="1"
><LI
><P
>Calculate how much space you will have available for root files.
If you are building a single boot/root disk, you must fit all blocks for the
kernel plus all blocks for the root filesystem on the one disk.&#13;</P
></LI
><LI
><P
>Using <B
CLASS="COMMAND"
>mke2fs</B
>, create a root filesystem on a diskette of the
appropriate size.&#13;</P
></LI
><LI
><P
>Populate the filesystem as described above. &#13;</P
></LI
><LI
><P
>When done, unmount the filesystem and transfer it to a disk file
but <EM
>do not compress it</EM
>.&#13;</P
></LI
><LI
><P
>Transfer the kernel to a floppy diskette, as described above. When
calculating the ramdisk word, <EM
>set bit 14 to zero</EM
>, to indicate that the
root filesystem is not to be loaded to ramdisk. Run the <B
CLASS="COMMAND"
>rdev</B
>'s as
described.
&#13;</P
></LI
><LI
><P
>Transfer the root filesystem as before.&#13;</P
></LI
></OL
>&#13;</P
><P
> There are several shortcuts you can take. If you are building a
two-disk set, you can build the complete root filesystem directly on the
second disk and you need not transfer it to a hard disk file and then back.
Also, if you are building a single boot/root disk and using LILO, you can
build a <EM
>single</EM
> filesystem on the entire disk,
containing the kernel, LILO files and root files, and simply run LILO as
the last step.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="UTILITYDISK"
>9.2. Building a utility disk</A
></H2
><P
>Building a utility disk is relatively easy -- simply create a filesystem
on a formatted disk and copy files to it. To use it with a bootdisk,
mount it manually after the system is booted.</P
><P
>In the instructions above, we mentioned that the utility disk could be
mounted as <TT
CLASS="FILENAME"
>/usr</TT
>. In this case, binaries could be placed into a
<TT
CLASS="FILENAME"
>/bin</TT
> directory on your utility disk, so that placing
<TT
CLASS="FILENAME"
>/usr/bin</TT
> in your path will access them. Additional libraries
needed by the binaries are placed in <TT
CLASS="FILENAME"
>/lib</TT
> on the utility disk.</P
><P
>There are several important points to keep in mind when designing a utility
disk:</P
><P
>&#13;<P
></P
><OL
TYPE="1"
><LI
><P
>Do not place critical system binaries or libraries onto the utility
disk, since it will not be mountable until after the system has booted.&#13;</P
></LI
><LI
><P
>You cannot access a floppy diskette and a floppy tape drive
simultaneously. This means that if you have a floppy tape drive, you will not
be able to access it while your utility disk is mounted.&#13;</P
></LI
><LI
><P
>Access to files on the utility disk will be slow.&#13;</P
></LI
></OL
>&#13;</P
><P
><A
HREF="utilitylist.html"
>Appendix D</A
> shows a sample of files on a utility disk.
Here are some ideas for files you may find useful: programs for examining
and manipulating disks (<B
CLASS="COMMAND"
>format, fdisk</B
>) and filesystems
(<B
CLASS="COMMAND"
>mke2fs, fsck, debugfs, isofs.o</B
>), a lightweight text
editor (<B
CLASS="COMMAND"
>elvis, jove</B
>), compression and archive utilities
(<B
CLASS="COMMAND"
>gzip, bzip, tar, cpio, afio</B
>), tape utilities
(<B
CLASS="COMMAND"
>mt, ftmt, tob, taper</B
>), communications utilities
(<B
CLASS="COMMAND"
>ppp.o, slip.o, minicom</B
>) and utilities for devices
(<B
CLASS="COMMAND"
>setserial, mknod</B
>).</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="slimfast.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="pros.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Reducing root filesystem size</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>How the pros do it</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,159 @@
<HTML
><HEAD
><TITLE
>Rescue packages</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Resources and pointers"
HREF="a1376.html"><LINK
REL="PREVIOUS"
TITLE="Pre-made Bootdisks"
HREF="premade.html"><LINK
REL="NEXT"
TITLE="LILO -- the Linux loader"
HREF="x1429.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="premade.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>A. Resources and pointers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1429.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN1422"
>A.2. Rescue packages</A
></H1
><P
> Several packages for creating rescue disks are available on
www.ibiblio.org. With these packages you specify a set of files for inclusion
and the software automates (to varying degrees) the creation of a bootdisk.
See <A
HREF="http://www.ibiblio.org/pub/Linux/system/recovery/!INDEX.html"
TARGET="_top"
><TT
CLASS="FILENAME"
>http://www.ibiblio.org/pub/Linux/system/recovery/!INDEX.html</TT
></A
>
for more information. <EM
>Check the file dates carefully</EM
>.
Some of these packages have not been updated in several years and will not
support the creation of a compressed root filesystem loaded into ramdisk. To
the best of our knowledge, <A
HREF="http://www.linuxlots.com/~fawcett/yard/index.html"
TARGET="_top"
>Yard</A
> is the only
package that will.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="premade.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1429.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Pre-made Bootdisks</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1376.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>LILO -- the Linux loader</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,147 @@
<HTML
><HEAD
><TITLE
>LILO -- the Linux loader</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Resources and pointers"
HREF="a1376.html"><LINK
REL="PREVIOUS"
TITLE="Rescue packages"
HREF="x1422.html"><LINK
REL="NEXT"
TITLE="Ramdisk usage"
HREF="x1434.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1422.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>A. Resources and pointers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1434.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN1429"
>A.3. LILO -- the Linux loader</A
></H1
><P
>Written by Werner Almesberger. Excellent boot loader, and the documentation
includes information on the boot sector contents and the early stages of the
boot process.</P
><P
>Ftp from <A
HREF="ftp://tsx-11.mit.edu/pub/linux/packages/lilo/"
TARGET="_top"
>ftp://tsx-11.mit.edu/pub/linux/packages/lilo/</A
>. It is also
available on Metalab and mirrors.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1422.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1434.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Rescue packages</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1376.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Ramdisk usage</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,145 @@
<HTML
><HEAD
><TITLE
>Ramdisk usage</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Resources and pointers"
HREF="a1376.html"><LINK
REL="PREVIOUS"
TITLE="LILO -- the Linux loader"
HREF="x1429.html"><LINK
REL="NEXT"
TITLE="The Linux boot process"
HREF="x1440.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1429.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>A. Resources and pointers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1440.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN1434"
>A.4. Ramdisk usage</A
></H1
><P
>An excellent description of the how the ramdisk code works may be found
with the documentation supplied with the Linux kernel. See
<TT
CLASS="FILENAME"
>/usr/src/linux/Documentation/ramdisk.txt</TT
>. It is
written by Paul Gortmaker and includes a section on creating a compressed
ramdisk.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1429.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1440.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>LILO -- the Linux loader</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1376.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The Linux boot process</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,247 @@
<HTML
><HEAD
><TITLE
>The Linux boot process</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Resources and pointers"
HREF="a1376.html"><LINK
REL="PREVIOUS"
TITLE="Ramdisk usage"
HREF="x1434.html"><LINK
REL="NEXT"
TITLE="LILO boot error codes"
HREF="a1483.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1434.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>A. Resources and pointers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="a1483.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN1440"
>A.5. The Linux boot process</A
></H1
><P
>For more detail on the Linux boot process, here are some pointers:
<P
></P
><UL
><LI
><P
>The <A
HREF="http://linuxdoc.org/LDP/sag/index.html"
TARGET="_top"
><I
CLASS="CITETITLE"
>Linux
System Administrators' Guide</I
></A
> has a section on booting.</P
></LI
><LI
><P
>The <A
HREF="http://www.ibiblio.org/pub/Linux/system/boot/lilo/lilo-t-21.ps.gz"
TARGET="_top"
>LILO ``Technical overview''</A
> has the definitive technical, low-level
description of the boot process, up to where the kernel is started.</P
></LI
><LI
><P
> The source code is the ultimate guide. Below are some kernel
files related to the boot process. If you have the Linux kernel source code,
you can find these under <TT
CLASS="FILENAME"
>/usr/src/linux</TT
> on your machine;
alternatively, Shigio Yamaguchi (shigio at tamacom.com) has a very nice <A
HREF="http://www.tamacom.com/tour/linux/index.html"
TARGET="_top"
>hypertext kernel
browser</A
> for reading kernel source files. Here are some relevant files
to look at:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="FILENAME"
>arch/i386/boot/bootsect.S</TT
> and
<TT
CLASS="FILENAME"
>setup.S</TT
></DT
><DD
><P
>Contain assembly code for the bootsector itself.</P
></DD
><DT
><TT
CLASS="FILENAME"
>arch/i386/boot/compressed/misc.c</TT
></DT
><DD
><P
>Contains code for uncompressing the kernel.</P
></DD
><DT
><TT
CLASS="FILENAME"
>arch/i386/kernel/</TT
></DT
><DD
><P
>Directory containing kernel initialization code.
<TT
CLASS="FILENAME"
>setup.c</TT
> defines the ramdisk word.</P
></DD
><DT
><TT
CLASS="FILENAME"
>drivers/block/rd.c</TT
></DT
><DD
><P
>Contains the ramdisk driver. The procedures
<B
CLASS="COMMAND"
>rd_load</B
> and <B
CLASS="COMMAND"
>rd_load_image</B
> load blocks from a device into a
ramdisk. The procedure
<B
CLASS="COMMAND"
>identify_ramdisk_image</B
> determines what
kind of filesystem is found and whether it is compressed.</P
></DD
></DL
></DIV
>&#13;</P
></LI
></UL
>&#13;</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1434.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="a1483.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Ramdisk usage</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1376.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>LILO boot error codes</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,326 @@
<HTML
><HEAD
><TITLE
>Preface</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="NEXT"
TITLE="Introduction"
HREF="x68.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="index.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x68.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN21"
>1. Preface</A
></H1
><DIV
CLASS="IMPORTANT"
><P
></P
><TABLE
CLASS="IMPORTANT"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/important.gif"
HSPACE="5"
ALT="Important"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> This document may be outdated. If the date on the title page is
more than six months ago, please check the <A
HREF="http://www.linuxlots.com/~fawcett/Bootdisk-HOWTO/index.html"
TARGET="_top"
> Bootdisk-HOWTO homepage</A
> to see if a more recent version exists.
</P
></TD
></TR
></TABLE
></DIV
><P
>Although this document should be legible in its text form,
it looks much better in Postscript, PDF or HTML forms because of
the typographical conventions used.
</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN27"
>1.1. Version notes</A
></H2
><P
>Graham Chapman wrote the original Bootdisk-HOWTO and supported it
through version 3.1. Tom Fawcett started as co-author around the time
kernel v2 was introduced, and he is the document's current maintainer.
Chapman has disappeared from the Linux community and his whereabouts are
currently unknown.
</P
><P
>This information is intended for Linux on the
<EM
>Intel</EM
> platform. Much of this information may be
applicable to Linux on other processors, but I have no first-hand
experience or information about this. If you have experience with
bootdisks on other platforms, please contact me.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN35"
>1.2. To do list</A
></H2
><P
>&#13; <P
></P
><OL
TYPE="1"
><LI
><P
> User-mode-linux (<A
HREF=" http://user-mode-linux.sourceforge.net/"
TARGET="_top"
> http://user-mode-linux.sourceforge.net</A
>) seems like a great
way to test out bootdisks without having to reboot your machine
constantly. I haven't been able to get it to work. If anyone has
been using this consistently with homemade bootdisks, please let
me know.
</P
></LI
><LI
><P
> Re-analyze distribution bootdisks and update the "How the
Pros do it" section.
</P
></LI
><LI
><P
>Figure out just how much of the init-getty-login sequence can
be simplified, and rip it out. A few people have said that
init can be linked directly to /bin/sh; if so, and if this imposes
no great limitations, alter the instructions to do this.
This would eliminate the need for getty, login, gettydefs, and
maybe all that PAM and NSS stuff.
</P
></LI
><LI
><P
>Go through the 2.4 kernel source code again and write a
detailed explanation of how the boot process and ramdisk-loading
process work, in detail. (If only so that I understand it
better.) There are some issues about initrd and limitations of
booting devices (eg flash memory) that I don't understand yet.
</P
></LI
><LI
><P
> Delete section that describes how to upgrade existing
distribution bootdisks. This is usually more trouble than it's
worth.
</P
></LI
><LI
><P
>Replace rdev commands with LILO keywords.
</P
></LI
></OL
>
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN52"
>1.3. Feedback and credits</A
></H2
><P
>I welcome any feedback, good or bad, on the content of this
document. I have done my best to ensure that the instructions and
information herein are accurate and reliable, but I don't know
everything and I don't keep up on kernel development. Please let me
know if you find errors or omissions. When writing, please indicate the
version number of the document you're referencing. Be nice.
</P
><P
> We thank the many people who assisted with corrections and
suggestions. Their contributions have made it far better than we
could ever have done alone.
</P
><P
> Send comments and corrections to the author at the email address
above. <EM
>Please read <A
HREF="troubleshooting.html"
>Section 7</A
>
before asking me questions</EM
>. Do
<EM
>not</EM
> email me disk images.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN60"
>1.4. Distribution policy</A
></H2
><P
> Copyright <20> 1995-2002 by Tom Fawcett and Graham Chapman.
This document may be distributed under the terms set forth in the <A
HREF="http://linuxdoc.org/copyright.html"
TARGET="_top"
>Linux Documentation Project
License</A
>. Please contact the authors if you are unable to get
the license.
</P
><P
> This is free documentation. It is distributed in the hope
that it will be useful, but <EM
>without any
warranty</EM
>; without even the implied warranty of
<EM
>merchantability</EM
> or <EM
>fitness for a
particular purpose</EM
>.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="index.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x68.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>The Linux Bootdisk HOWTO</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Introduction</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,201 @@
<HTML
><HEAD
><TITLE
>Introduction</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Preface"
HREF="x21.html"><LINK
REL="NEXT"
TITLE="Bootdisks and the boot process"
HREF="x88.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x21.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x88.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN68"
>2. Introduction</A
></H1
><P
>Linux boot disks are useful in a number of situations, such as testing a
new kernel, recovering from a disk failure (anything from a lost boot
sector to a disk head crash), fixing a disabled system, or upgrading
critical system files safely (such as <TT
CLASS="FILENAME"
>libc.so</TT
>).</P
><P
>There are several ways of obtaining boot disks:
<P
></P
><UL
><LI
><P
>Use one from a distribution such as Slackware. This will at
least allow you to boot.
</P
></LI
><LI
><P
>Use a rescue package to set up disks designed to be used
as rescue disks.
</P
></LI
><LI
><P
>Learn what is required for each of the types of disk to operate,
then build your own.</P
></LI
></UL
>
Some people choose the last option so they can do it themselves. That way,
if something breaks, they can work out what to do to fix it. Plus it's a
great way to learn about how a Linux system works.</P
><P
>This document assumes some basic familiarity with Linux system
administration concepts. For example, you should know about
directories, filesystems and floppy diskettes. You should know how to
use <B
CLASS="COMMAND"
>mount</B
> and <B
CLASS="COMMAND"
>df</B
>. You should
know what <TT
CLASS="FILENAME"
>/etc/passwd</TT
> and
<TT
CLASS="FILENAME"
>fstab</TT
> files are for and what they look like. You
should know that most of the commands in this HOWTO should be run as
root.</P
><P
>Constructing a bootdisk from scratch can be complicated. If you
haven't read the Linux FAQ and related documents, such as the Linux
Installation HOWTO and the Linux Installation Guide, you should not be
trying to build boot diskettes. If you just need a working bootdisk
for emergencies, it is <EM
>much</EM
> easier to download a
prefabricated one. See <A
HREF="premade.html"
>Appendix A.1</A
>, below, for where to
find these.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x21.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x88.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Preface</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Bootdisks and the boot process</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,175 @@
<HTML
><HEAD
><TITLE
>Choosing a kernel</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Building a root filesystem"
HREF="buildroot.html"><LINK
REL="NEXT"
TITLE="Putting them together: Making the diskette(s)"
HREF="x703.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="buildroot.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x703.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN688"
>5. Choosing a kernel</A
></H1
><P
>At this point you have a complete compressed root filesystem. The next step
is to build or select a kernel. In most cases it would be possible to copy
your current kernel and boot the diskette from that. However, there may be
cases where you wish to build a separate one.</P
><P
>One reason is size. If you are building a single boot/root diskette, the
kernel will be one of the largest files on the diskette so you will have to
reduce the size of the kernel as much as possible. To reduce kernel size,
build it with the minumum set of facilities necessary to support the desired
system. This means leaving out everything you don't need. Networking is a
good thing to leave out, as well as support for any disk drives and other
devices which you don't need when running your boot/root system. As stated
before, your kernel <EM
>must</EM
> have ramdisk and ext2 support
built into it.</P
><P
> Having worked out a minimum set of facilities to include in a kernel,
you then need to work out what to add back in. Probably the most common uses
for a boot/root diskette system would be to examine and restore a corrupted
root file system, and to do this you may need kernel support. For example, if
your backups are all held on tape using Ftape to access your tape drive, then,
if you lose your current root drive and drives containing Ftape, then you will
not be able to restore from your backup tapes. You will have to reinstall
Linux, download and reinstall <B
CLASS="COMMAND"
>ftape</B
>, and then try to read
your backups.</P
><P
>The point here is that, whatever I/O support you have added to your kernel to
support backups should also be added into your boot/root kernel.</P
><P
>The procedure for actually building the kernel is described in the
documentation that comes with the kernel. It is quite easy to follow, so
start by looking in <TT
CLASS="FILENAME"
>/usr/src/linux</TT
>. If you have trouble
building a kernel, you should probably not attempt to build boot/root
systems anyway. Remember to compress the kernel with ``<B
CLASS="COMMAND"
>make zImage</B
>''.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="buildroot.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x703.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Building a root filesystem</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Putting them together: Making the diskette(s)</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,833 @@
<HTML
><HEAD
><TITLE
>Putting them together: Making the diskette(s)</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Choosing a kernel"
HREF="x688.html"><LINK
REL="NEXT"
TITLE="Troubleshooting, or The Agony of Defeat"
HREF="troubleshooting.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x688.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="troubleshooting.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN703"
>6. Putting them together: Making the diskette(s)</A
></H1
><P
>At this point you have a kernel and a compressed root filesystem. If you are
making a boot/root disk, check their sizes to make sure they will both fit on
one disk. If you are making a two disk boot+root set, check the root
filesystem to make sure it will fit on a single diskette.</P
><P
> You should decide whether to use LILO to boot the bootdisk kernel.
The alternative is to copy the kernel directly to the diskette and boot
without LILO. The advantage of using LILO is that it enables you to supply
some parameters to the kernel which may be necessary to initialize your
hardware (Check the file <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
> on your
system. If it exists and has a line like
``<TT
CLASS="LITERAL"
>append=...</TT
>'', you probably need this feature). The
disadvantage of using LILO is that building the bootdisk is more
complicated and takes slightly more space. You will have to set up a small
separate filesystem, which we shall call the <EM
>kernel
filesystem</EM
>, where you transfer the kernel and a few other files
that LILO needs.</P
><P
> If you are going to use LILO, read on; if you are going to transfer
the kernel directly, skip ahead to <A
HREF="x703.html#TRANSFERRINGWITHOUTLILO"
>Section 6.2</A
>.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="TRANSFERRINGWITHLILO"
>6.1. Transferring the kernel with LILO</A
></H2
><P
>First, make sure you have a recent version of LILO.</P
><P
>You must create a small configuration file for LILO.
It should look like this:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> boot =/dev/fd0
install =/boot/boot.b
map =/boot/map
read-write
backup =/dev/null
compact
image = KERNEL
label = Bootdisk
root =/dev/fd0</PRE
></FONT
></TD
></TR
></TABLE
>
For an explanation of these parameters, see LILO's user documentation. You
will probably also want to add an <TT
CLASS="LITERAL"
>append=...</TT
> line to
this file from your hard disk's <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
> file.</P
><P
>Save this file as <TT
CLASS="FILENAME"
>bdlilo.conf</TT
>.</P
><P
> You now have to create a small filesystem, which we shall call a
<EM
>kernel filesystem</EM
>, to distinguish it from the root
filesystem.</P
><P
>First, figure out how large the filesystem should be. Take the size of your
kernel in blocks (the size shown by ``<B
CLASS="COMMAND"
>ls -s KERNEL</B
>'') and
add 50. Fifty blocks is approximately the space needed for inodes plus other
files. You can calculate this number exactly if you want to, or just use 50.
If you're creating a two-disk set, you may as well overestimate the space since
the first disk is only used for the kernel anyway. Call this number
<TT
CLASS="LITERAL"
>KERNEL_BLOCKS</TT
>.</P
><P
>Put a floppy diskette in the drive (for simplicity we'll assume
<TT
CLASS="FILENAME"
>/dev/fd0</TT
>) and create an ext2 kernel filesystem on it:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> mke2fs -N 24 -m 0 /dev/fd0 KERNEL_BLOCKS</PRE
></FONT
></TD
></TR
></TABLE
>
The ``<TT
CLASS="LITERAL"
>-N 24</TT
>'' specifies 24 inodes, which is all you should
need for this filesystem. Next, mount the filesystem, remove the
<TT
CLASS="FILENAME"
>lost+found</TT
> directory, and create <TT
CLASS="FILENAME"
>dev</TT
>
and <TT
CLASS="FILENAME"
>boot</TT
> directories for LILO:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> mount -o dev /dev/fd0 /mnt
rm -rf /mnt/lost+found
mkdir /mnt/{boot,dev}</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Next, create devices <TT
CLASS="FILENAME"
>/dev/null</TT
> and
<TT
CLASS="FILENAME"
>/dev/fd0</TT
>. Instead of looking up the device numbers, you
can just copy them from your hard disk using <TT
CLASS="LITERAL"
>-R</TT
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> cp -R /dev/{null,fd0} /mnt/dev</PRE
></FONT
></TD
></TR
></TABLE
>
LILO needs a copy of its boot loader, <TT
CLASS="FILENAME"
>boot.b</TT
>, which
you can take from your hard disk. It is usually kept in the
<TT
CLASS="FILENAME"
>/boot</TT
> directory.
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> cp /boot/boot.b /mnt/boot</PRE
></FONT
></TD
></TR
></TABLE
>
Finally, copy in the LILO configuration file you created in the last section,
along with your kernel. Both can be put in the root directory:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> cp bdlilo.conf KERNEL /mnt</PRE
></FONT
></TD
></TR
></TABLE
>
Everything LILO needs is now on the kernel filesystem, so you are ready to run
it. LILO's <TT
CLASS="LITERAL"
>-r</TT
> flag is used for installing the boot loader on some other
root:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> lilo -v -C bdlilo.conf -r /mnt</PRE
></FONT
></TD
></TR
></TABLE
>
LILO should run without error, after which the kernel filesystem
should look something like this:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>total 361
1 &#8211;rw&#8211;r&#8211;&#8211;r&#8211;&#8211; 1 root root 176 Jan 10 07:22 bdlilo.conf
1 drwxr&#8211;xr&#8211;x 2 root root 1024 Jan 10 07:23 boot/
1 drwxr&#8211;xr&#8211;x 2 root root 1024 Jan 10 07:22 dev/
358 &#8211;rw&#8211;r&#8211;&#8211;r&#8211;&#8211; 1 root root 362707 Jan 10 07:23 vmlinuz
boot:
total 8
4 &#8211;rw&#8211;r&#8211;&#8211;r&#8211;&#8211; 1 root root 3708 Jan 10 07:22 boot.b
4 &#8211;rw&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 3584 Jan 10 07:23 map
dev:
total 0
0 brw&#8211;r&#8211;&#8211;&#8211;&#8211;&#8211; 1 root root 2, 0 Jan 10 07:22 fd0
0 crw&#8211;r&#8211;&#8211;r&#8211;&#8211; 1 root root 1, 3 Jan 10 07:22 null </PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Do not worry if the file sizes are slightly different from yours.</P
><P
>Now leave the diskette in the drive and go to <A
HREF="x703.html#SETTINGRAMDISKWORD"
>Section 6.3</A
>.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="TRANSFERRINGWITHOUTLILO"
>6.2. Transferring the kernel without LILO</A
></H2
><P
>If you are <EM
>not</EM
> using LILO, transfer the kernel to the
bootdisk with <B
CLASS="COMMAND"
>dd</B
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> % dd if=KERNEL of=/dev/fd0 bs=1k
353+1 records in
353+1 records out</PRE
></FONT
></TD
></TR
></TABLE
>
In this example, <B
CLASS="COMMAND"
>dd</B
> wrote 353 complete records + 1
partial record, so the kernel occupies the first 354 blocks of the
diskette. Call this number <TT
CLASS="LITERAL"
>KERNEL_BLOCKS</TT
> and
remember it for use in the next section.</P
><P
>Finally, set the root device to be the diskette itself, then set the
root to be loaded read/write:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> rdev /dev/fd0 /dev/fd0
rdev -R /dev/fd0 0</PRE
></FONT
></TD
></TR
></TABLE
>
Be careful to use a capital <TT
CLASS="LITERAL"
>-R</TT
> in the second
<B
CLASS="COMMAND"
>rdev</B
> command.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="SETTINGRAMDISKWORD"
>6.3. Setting the ramdisk word</A
></H2
><P
>
Inside the kernel image is the <EM
>ramdisk word</EM
> that
specifies where the root filesystem is to be found, along with other
options. The word can be accessed and set via the <B
CLASS="COMMAND"
>rdev</B
>
command, and its contents are interpreted as follows:
<DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN782"
></A
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
WIDTH="96"
ALIGN="RIGHT"
VALIGN="TOP"
>Bit field</TH
><TH
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
WIDTH="96"
ALIGN="RIGHT"
VALIGN="TOP"
>0-10</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
>Offset to start of ramdisk, in 1024 byte blocks</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="RIGHT"
VALIGN="TOP"
>11-13</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
>unused</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="RIGHT"
VALIGN="TOP"
>14</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
>Flag indicating that ramdisk is to be loaded</TD
></TR
><TR
><TD
WIDTH="96"
ALIGN="RIGHT"
VALIGN="TOP"
>15</TD
><TD
WIDTH="100%"
ALIGN="LEFT"
VALIGN="TOP"
>Flag indicating to prompt before loading rootfs</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></P
><P
>If bit 15 is set, on boot-up you will be prompted to place a new floppy
diskette in the drive. This is necessary for a two-disk boot set.</P
><P
>There are two cases, depending on whether you are building a single
boot/root diskette or a double ``boot+root'' diskette set.</P
><P
></P
><OL
TYPE="1"
><LI
><P
> If you are building a single disk, the compressed root filesystem
will be placed right after the kernel, so the offset will be the first free
block (which should be the same as
<TT
CLASS="LITERAL"
>KERNEL_BLOCKS</TT
>). Bit 14 will be set to 1, and bit
15 will be zero.
For example, say you're building a single disk and the root filesystem will
begin at block 253 (decimal). The ramdisk word value should be 253
(decimal) with bit 14 set to 1 and bit 15 set to 0. To calculate the value
you can simply add the decimal values. 253 + (2^14) = 253 + 16384 =
16637. If you don't quite understand where this number comes from, plug it
into a scientific calculator and convert it to binary,</P
></LI
><LI
><P
>If you are building a two-disk set, the root filesystem will begin at
block zero of the second disk, so the offset will be zero. Bit 14 will be
set to 1 and bit 15 will be 1. The decimal value will be
2^14 + 2^15 = 49152 in this case.</P
></LI
></OL
><P
>After carefully calculating the value for the ramdisk word, set it with
<B
CLASS="COMMAND"
>rdev -r</B
>. Be sure to use the
<EM
>decimal</EM
> value. If you used LILO, the argument to
<B
CLASS="COMMAND"
>rdev</B
> here should be the <EM
>mounted kernel
path</EM
>,
e.g. <TT
CLASS="FILENAME"
>/mnt/vmlinuz</TT
>; if you copied the kernel with
<B
CLASS="COMMAND"
>dd</B
>, instead
use the floppy device name (<EM
>e.g.,</EM
> <TT
CLASS="FILENAME"
>/dev/fd0</TT
>).
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> rdev -r KERNEL_OR_FLOPPY_DRIVE VALUE</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>If you used LILO, unmount the diskette now.</P
><DIV
CLASS="IMPORTANT"
><P
></P
><TABLE
CLASS="IMPORTANT"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/important.gif"
HSPACE="5"
ALT="Important"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Do not believe what the rdev/ramsize manpage says about ramdisk
size.
The manpage is obsolete. As of kernel 2.0 or so, the ramdisk word no
longer determines the ramdisk size; the word is instead interpreted
according to the table at the beginning of section <A
HREF="x703.html#SETTINGRAMDISKWORD"
>Section 6.3</A
>. For a detailed
explanation, see the documentation file <A
HREF="file:/usr/src/linux/Documentation/ramdisk.txt"
TARGET="_top"
>ramdisk.txt</A
> or
<A
HREF="http://www.linuxhq.com/kernel/v2.4/doc/ramdisk.txt.html"
TARGET="_top"
>http://www.linuxhq.com/kernel/v2.4/doc/ramdisk.txt.html</A
>.
</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN831"
>6.4. Transferring the root filesystem</A
></H2
><P
>The last step is to transfer the root filesystem.</P
><P
>&#13;<P
></P
><UL
><LI
><P
> If the root filesystem will be placed on the
<EM
>same</EM
> disk as the kernel, transfer it using
<B
CLASS="COMMAND"
>dd</B
> with the <TT
CLASS="OPTION"
>seek</TT
> option, which
specifies how many blocks to skip:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> dd if=rootfs.gz of=/dev/fd0 bs=1k seek=<EM
>KERNEL_BLOCKS</EM
></PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
><LI
><P
>If the root filesystem will be placed on a <EM
>second</EM
>
disk, remove the first diskette, put the second diskette in the drive, then
transfer the root filesystem to it:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> dd if=rootfs.gz of=/dev/fd0 bs=1k</PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
></UL
>&#13;</P
><P
>Congratulations, you are done! </P
><DIV
CLASS="IMPORTANT"
><P
></P
><TABLE
CLASS="IMPORTANT"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/important.gif"
HSPACE="5"
ALT="Important"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>You should always test a bootdisk before putting it aside for an emergency.
If it fails to boot, read on.</P
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x688.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="troubleshooting.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Choosing a kernel</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Troubleshooting, or The Agony of Defeat</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -0,0 +1,401 @@
<HTML
><HEAD
><TITLE
>Bootdisks and the boot process</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="The Linux Bootdisk HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Introduction"
HREF="x68.html"><LINK
REL="NEXT"
TITLE="Building a root filesystem"
HREF="buildroot.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Bootdisk HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x68.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="buildroot.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN88"
>3. Bootdisks and the boot process</A
></H1
><P
>A bootdisk is basically a miniature, self-contained Linux system on a
diskette. It must perform many of the same functions that a complete
full-size Linux system performs. Before trying to build one you should
understand the basic Linux boot process. Here we present the basics, which
are sufficient for understanding the rest of this document. Many details and
alternative options have been omitted.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN93"
>3.1. The boot process</A
></H2
><P
>
All PC systems start the boot process by executing code in ROM
(specifically, the <EM
>BIOS</EM
>) to load the sector from
sector 0, cylinder 0 of the boot drive. The boot drive is usually the
first floppy drive (designated <TT
CLASS="FILENAME"
>A:</TT
> in DOS and
<TT
CLASS="FILENAME"
>/dev/fd0</TT
> in Linux). The BIOS then tries to execute
this sector. On most bootable disks, sector 0, cylinder 0 contains either:
<P
></P
><UL
><LI
><P
>code from a boot loader such as LILO, which locates the kernel,
loads it and executes it to start the boot proper; or&#13;</P
></LI
><LI
><P
>the start of an operating system kernel, such as Linux.&#13;</P
></LI
></UL
>&#13;</P
><P
>If a Linux kernel has been raw-copied to a diskette, the first sector of the
disk will be the first sector of the Linux kernel itself. This first sector
will continue the boot process by loading the rest of the kernel from the boot
device.</P
><P
>When the kernel is completely loaded, it initializes device drivers and its
internal data structures. Once it is completely initialized, it consults a
special location in its image called the <EM
>ramdisk word</EM
>.
This word tells it how and where to find its <EM
>root
filesystem</EM
>. A root filesystem is simply a filesystem that will be
mounted as ``<TT
CLASS="FILENAME"
>/</TT
>''. The kernel has to be told where to
look for the root filesystem; if it cannot find a loadable image there, it
halts.</P
><P
>In some boot situations &#8212; often when booting from a diskette
&#8212; the root filesystem is loaded into a <EM
>ramdisk</EM
>,
which is RAM accessed by the system as if it were a disk. RAM is several
orders of magnitude faster than a floppy disk, so system operation is fast
from a ramdisk. Also, the kernel can load a <EM
>compressed
filesystem</EM
> from the floppy and uncompress it onto the ramdisk,
allowing many more files to be squeezed onto the diskette. </P
><P
>Once the root filesystem is loaded and mounted, you see a message like:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> VFS: Mounted root (ext2 filesystem) readonly.</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Once the system has loaded a root filesystem successfully, it tries to
execute the <TT
CLASS="FILENAME"
>init</TT
> program (in <TT
CLASS="FILENAME"
>/bin</TT
> or
<TT
CLASS="FILENAME"
>/sbin</TT
>). <TT
CLASS="FILENAME"
>init</TT
> reads its
configuration file <TT
CLASS="FILENAME"
>/etc/inittab</TT
>, looks for a line
designated <TT
CLASS="LITERAL"
>sysinit</TT
>, and executes the named script. The
<TT
CLASS="LITERAL"
>sysinit</TT
> script is usually something like
<TT
CLASS="FILENAME"
>/etc/rc</TT
> or <TT
CLASS="FILENAME"
>/etc/init.d/boot</TT
>. This
script is a set of shell commands that set up basic system services, such as
running <B
CLASS="COMMAND"
>fsck</B
> on hard disks, loading necessary kernel
modules, initializing swapping, initializing the network, and mounting disks
mentioned in <TT
CLASS="FILENAME"
>/etc/fstab</TT
>.</P
><P
>This script often invokes various other scripts to do modular
initialization. For example, in the common SysVinit structure, the directory
<TT
CLASS="FILENAME"
>/etc/rc.d/</TT
> contains a complex structure of subdirectories
whose files specify how to enable and shut down most system services. However,
on a bootdisk the sysinit script is often very simple.</P
><P
>When the sysinit script finishes control returns to <B
CLASS="COMMAND"
>init</B
>,
which then enters the <EM
>default runlevel</EM
>, specified in
<TT
CLASS="FILENAME"
>inittab</TT
> with the <TT
CLASS="LITERAL"
>initdefault</TT
> keyword.
The runlevel line usually specifies a program like <B
CLASS="COMMAND"
>getty</B
>,
which is responsible for handling commununications through the console and
ttys. It is the <B
CLASS="COMMAND"
>getty</B
> program which prints the familiar
``<TT
CLASS="PROMPT"
>login:</TT
>'' prompt. The <B
CLASS="COMMAND"
>getty</B
> program in
turn invokes the <B
CLASS="COMMAND"
>login</B
> program to handle login validation
and to set up user sessions.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN159"
>3.2. Disk types</A
></H2
><P
>Having reviewed the basic boot process, we can now define various
kinds of disks involved. We classify disks into four types. The
discussion here and throughout this document uses the term ``disk'' to
refer to floppy diskettes unless otherwise specified, though most of
the discussion could apply equally well to hard disks.</P
><P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>boot</DT
><DD
><P
>A disk containing a kernel which can be booted. The disk
can be used to boot the kernel, which then may load a root file system on
another disk. The kernel on a bootdisk usually must be told where to find
its root filesystem.</P
><P
>Often a bootdisk loads a root filesystem from another diskette, but it is
possible for a bootdisk to be set up to load a hard disk's root filesystem
instead. This is commonly done when testing a new kernel (in fact,
``<B
CLASS="COMMAND"
>make zdisk</B
>'' will create such a bootdisk automatically
from the kernel source code).</P
></DD
><DT
>root</DT
><DD
><P
>A disk with a filesystem containing files
required to run a Linux system. Such a disk does not necessarily
contain either a kernel or a boot loader. &#13;</P
><P
>A root disk can be used to run the system independently of any other
disks, once the kernel has been booted. Usually the root disk is
automatically copied to a ramdisk. This makes root disk accesses much
faster, and frees up the disk drive for a utility disk.</P
></DD
><DT
>boot/root</DT
><DD
><P
>A disk which contains both the kernel and a root filesystem. In other
words, it contains everything necessary to boot and run a Linux system
without a hard disk. The advantage of this type of disk is that is it
compact &#8212; everything required is on a single disk. However, the gradually
increasing size of everything means that it is increasingly difficult to
fit everything on a single diskette, even with compression.</P
></DD
><DT
>utility</DT
><DD
><P
>A disk which contains a filesystem, but is not
intended to be mounted as a root file system. It is an additional data
disk. You would use this type of disk to carry additional utilities where
you have too much to fit on your root disk.&#13;</P
></DD
></DL
></DIV
></P
><P
>In general, when we talk about ``building a bootdisk'' we mean
creating both the boot (kernel) and root (files) portions. They may
be either together (a single boot/root disk) or separate (boot + root
disks). The most flexible approach for rescue diskettes is probably
to use separate boot and root diskettes, and one or more utility
diskettes to handle the overflow.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x68.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="buildroot.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Introduction</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Building a root filesystem</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>