307 lines
5.7 KiB
HTML
307 lines
5.7 KiB
HTML
<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
|
|
> <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. </P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Using <B
|
|
CLASS="COMMAND"
|
|
>mke2fs</B
|
|
>, create a root filesystem on a diskette of the
|
|
appropriate size. </P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Populate the filesystem as described above. </P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>When done, unmount the filesystem and transfer it to a disk file
|
|
but <EM
|
|
>do not compress it</EM
|
|
>. </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.
|
|
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Transfer the root filesystem as before. </P
|
|
></LI
|
|
></OL
|
|
> </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
|
|
> <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. </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. </P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Access to files on the utility disk will be slow. </P
|
|
></LI
|
|
></OL
|
|
> </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"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>How the pros do it</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |