\input mccinfo

@setfilename interim
@settitle MCC Interim Linux
@setchapternewpage odd
@set version 0.99.p10+
@set date July 1993
@defindex fi

@ifinfo
This file documents the MCC interim version of the Linux
operating system.

Copyright @copyright{} 1993 University of Manchester

Permission is granted to use any parts of this file
for non-profit purposes, provided credit is given to the
University of Manchester, whose support has made this
project possible.
@end ifinfo

@titlepage
@title MCC Interim Linux
@iftex
@vskip 45pt
@end iftex
@subtitle The MCC Distribution of the Linux Operating System
@iftex
@vskip 30pt
@end iftex
@subtitle Version @value{version}
@iftex
@vskip 30pt
@end iftex
@subtitle @value{date}
@author {}

@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1993 University of Manchester

Published by Manchester Computing Centre, University of Manchester.

Permission is granted to use any parts of this document
for non-profit purposes, provided credit is given to the
University of Manchester, whose support has made this
project possible.
@end titlepage

@ifinfo
@node Top, Introduction
@top MCC Interim Linux

This document describes the MCC interim version of Linux.
It applies to version @value{version}, which is the most
recently released version.

@menu
Chapters:

* Introduction::    What is MCC interim Linux?
* Getting::         Getting a copy of MCC interim Linux.
* Preparing::       What to do before you install Linux.
* Installing::      Installing or updating MCC interim Linux.
* Recovering::      Recovering from fatal disasters.
* Adapting::        Tailoring MCC interim Linux to suit your taste.
* Using::           Features of Linux that you should know.
* Acknowledgments:: Where the programs come from.

Indices:

* Concept Index::
* File Index::
* Program Index::
@end menu
@end ifinfo

@node Introduction, Getting, Top, Top
@chapter Introduction

The MCC interim versions of Linux are designed to allow
people who are not Unix experts to install a version
of the Linux operating system on a PC.
The installed system should be self-contained, but easy to extend.

@menu
Sections:

* Linux::      What is Linux?
* MCC::        What are the MCC interim versions of Linux?
* Copyright::  Copyright and conditions of distribution
* Bugs::       Bugs and warnings
@end menu

@node Linux, MCC, , Introduction
@section What is Linux?

Linux is an operating system written by the Finnish programmer
Linus B Torvalds.
@cindex Linux
@cindex Unix
@cindex hardware
@pindex Image
It is designed to look like the Unix operating
system, and the source of the entire system is available.
Binaries and source
can be distributed freely under the terms of the GNU Public License.
@xref{Copyright, , Copyright and conditions of distribution}.
Programs from the various System V and BSD versions
of Unix should compile and run under Linux with few changes.
Linux aims to conform as closely as it can to the various
@sc{posix}, @sc{iso}, and @sc{ansi} standards.

Linux runs only on machines which have processors compatible with the
Intel 386 or 486.  If you intend to run Linux,
your computer must have appropriate hardware and sufficient
resources:

@itemize @minus
@item You must have at least 2 Mb of memory to run Linux.
@cindex memory
For good performance, you need at least 4 Mb of memory, and
the X window system does not work well without at least 8 Mb.

@item Linux requires an @sc{isa} or @sc{eisa} bus.
At present it does not support the @sc{mca} bus architecture.
@cindex MCA bus architecture
@cindex PS2 is unsupported
This means that is does not run on a PS2 machine.

@item Linux supports generic @sc{at} drives, including @sc{ide} and
16 bit hard disk controllers with @sc{mfm} or @sc{rll}.
@cindex disks
It supports generic @sc{xt} controllers (8 bit hard disk controllers
with @sc{mfm} or @sc{rll}).
It supports @sc{scsi} disks and @sc{cd rom}s, provided the @sc{scsi}
adaptor is supported.
Supported adaptors include Adaptec 1542 (but not 1522),
Adaptec 1740 in extended mode (not in 1542 compatible mode), Seagate
ST-01 and ST-02, Future Domain TMC88x series, any board based on the
TMC950 chip, TMC1660 and 1680, Ultrastor 14F, 24F, and 34F, and
WD7000.

@item You will need disk
space for swapping (or paging) and for file systems.  A small
installation can share a 40 Mb disk with DOS, but a full installation
including the X window system may require a full 40 Mb for Linux
files alone.  @xref{Preparing, , Preparing to Install Linux}.

@item Linux supports several Ethernet cards, but the `official' kernel
currently contains code only for the 3c503, DE-600, HP-LAN, NE2000,
and Western Digital 8003 and 8013 cards.
@cindex Ethernet cards
Patches for other cards are available, and will eventually be
included in the `official' kernel.  The most common cards in Manchester
are RM Ethernet cards.  Some of these can be modified to work as
NE2000 cards: AT cards with serial numbers above 20000.
Other models may also support this, but we are still getting information
from Research Machines about this point.

@item Text mode supports @sc{vga}, @sc{ega}, @sc{cga}, and Hercules cards.
@cindex graphics
Linux supports graphics and X11 with @sc{ega}, normal @sc{vga}, some
@sc{svga} cards (ET3000, ET4000, Paradise, and some Trident chips),
some S3 cards (but not Diamond Stealth), 8514/A, and Hercules.
@end itemize

Detailed information about currently supported hardware is published
in the Linux hardware list, which is available by anonymous ftp.
@xref{FTP, , Getting MCC interim Linux by anonymous ftp}.

Among the features of Linux are the following:
@cindex features of Linux

@itemize @minus
@item It is a multi-tasking system: several programs can run at the
same time.
@cindex multi-tasking

@item It is a multi-user system: several users can use the same machine
at the same time.

@item Linux runs in 386 protected mode.
@cindex protected mode
Different processes are
isolated from each other, so that one program cannot bring the system down.

@item Executable files are demand-loaded, so that parts of a program
are in memory only when those parts are being executed.
@cindex demand loading

@item Compiled programs are linked with dynamically loaded shared
libraries to reduce disk and memory usage.
@cindex shared libraries
@cindex libraries, shared

@item Executables share memory pages until one of them writes to it.
@cindex shared memory
@cindex memory, shared
This increases speed and decreases memory use.

@item Programs access virtual memory which is paged to disk.
@cindex virtual memory
@cindex memory, virtual
If you allocate up to 16 swap areas, each up to 16 Mb in size,
all of this memory is available to running processes in a shared pool.

@item Physical memory is organised into a unified memory pool or cache,
which changes in size depending on the system load.

@item The kernel can emulate a maths coprocessor if you have none.
@cindex coprocessor emulation
@cindex maths coprocessor
If you have a coprocessor, you can recompile the kernel without the
emulation code to save memory.

@item The kernel supports multiple virtual consoles, which allow
several independent login sessions on the system console.
@cindex virtual console
@cindex console, virtual

@item The kernel supports several file systems, including its own
extended and extended version 2 file systems, @sc{minix}, @sc{xenix},
and DOS compatible file systems, and a special @dfn{proc} file system
for getting information about running processes.
@cindex xenix file system
@cindex ext file system
@cindex proc file system
@cindex msdos file system
@iftex
@dosubind{cp}{file system}{xenix}@relax
@dosubind{cp}{file system}{ext}@relax
@dosubind{cp}{file system}{proc}@relax
@dosubind{cp}{file system}{msdos}@relax
@end iftex
Linux cannot access DOS 6 compressed partitions.

@item Linux supports TCP/IP networking, including ftp, telnet, @sc{nfs},
and other protocols.
@end itemize

The software which is distributed in the MCC interim versions of Linux
comes from a variety of sources.  Much of it comes from the GNU project,
some of it is taken from the published BSD sources, and some has been
written specifically for Linux.

@table @strong
@item WARNING:
Linux is an operating system which is very different from DOS.
It requires a certain minimal amount of attention if it is to work well.
In particular, you must @strong{never} simply turn off a machine on
which Linux is running.  For more information about using Linux safely,
see @ref{Caring, , Caring for your Linux system}.
@end table

@node MCC, Copyright, Linux, Introduction
@section What are the MCC interim versions of Linux?

When Linux version 0.10 first appeared in the autumn of 1991, it was
released by Linus Torvalds as a pair of floppy disks, known as the
@dfn{boot} and @dfn{root} disks.
Linus himself released several utilities
which did not fit on these disks.  Eventually quite a number of
contributions were available.  Software distribution
was rather chaotic, and you needed a lot of effort to
collect a complete base system.

The Manchester Computing Centre (MCC) is a part of the University
of Manchester, supporting computing at the University, at UMIST (the
University of Manchester Institute of Science and Technology),
and at several other British universities.
@cindex MCC

We began to make Linux available by anonymous ftp in November 1991,
and we released the first MCC interim version of Linux (version 0.12+)
the following February.
@cindex ramdisk as root
@cindex bootable root disk
This version made use of ramdisk code written by Theodore
Ts'o to mount a virtual root disk at boot time from the kernel floppy.
(This type of distribution was used earlier by Andrew Tannenbaum to
distribute his operating system @sc{minix}.)  With version 0.99p8+, we
abandoned the ramdisk-as-root and adopted a combined bootable root disk.
The first combined root disk was created by H J Lu (who made
essential use of Werner Almesberger's @sc{lilo} software).  Unlike H J's
bootable root disk, the MCC disk does not contain an executable shell.

Very shortly after the first MCC interim version of Linux appeared,
other people released similar versions: Dave Safford's @sc{tamu} releases
and Martin Junius's @sc{mj} versions were eventually followed by Peter
Macdonald's massive, comprehensive @sc{sls} releases and H J Lu's small
base systems.  What distinguishes the MCC versions from these others?

From its first release, MCC interim Linux has included basic utilities,
the GNU C compiler, and the sources to the current kernel release.
@cindex contents of MCC distribution
@cindex source files
The software included in MCC distributions comes from a wide variety of
sources, but we try to make sources to all of it available,
though not as part of the distribution.  MCC interim versions aim to
provide a stable base system, which can be installed in a short time, and
to which other software can be added with relatively little effort.  Every
binary file in an MCC distribution has been compiled
under that version of the kernel, by that version of @code{gcc}, is linked
with that version of the libraries, and has been tested to some extent.
The only exception to this
is the GNU C compiler and libraries, which we take directly from H J Lu's
distribution.

We install this version of Linux on small 386-SX machines for
our C and Unix courses, and we need to be able to install it on twelve
machines in about one hour.  We also distribute this version of Linux
to our clients in Manchester.  We make no attempt to include a wide
variety of packages, or large packages such as X386.  The @i{emacs} and
@i{info} packages were added to MCC interim Linux only because we have
been using them for our courses.
@cindex SLS version
People who want a distribution which
contains nearly everything should get the @sc{sls} versions, which are about
five times the size of MCC, and quite comprehensive.

Our versions are called @dfn{interim} because they are not intended to be
final or official.
@cindex interim
They are small, harmonious, and moderately tested.
They do not conform to everyone's taste --- what release does? --- but
they should provide a stable base to which other software can be added.

This version of Linux is prepared to allow you to upgrade an existing
system, as well as to install a complete new system.
@cindex upgrading an existing system
The limitations are mainly that partitions must contain @i{minix} or @i{ext2}
file systems: @i{ext} and @i{xiafs} file systems are not supported in the
installation, though they can be mounted from the installed system
with no difficulty.
Upgrading an old system looks just like installing a new system,
except that you don't need to run @samp{mkswap} and @samp{mkfs}
before installing.  Instead you should run @samp{fsck}, which you
can do from the boot disk.  Old binaries are deleted, except for
some old libraries, which may be required by programs which you
have acquired from somewhere else.

Text files, especially the configuration files in @code{/etc}, are more
of a problem.
@fiindex @code{backupdirs}
We don't want to throw away the old files, which you may have spent
some considerable time polishing, but we must install new configuration
files, or else the system may not boot properly, or may work badly if
it boots at all.  For this reason, the installation creates a special
directory named @code{/backupdirs}.  In this directory it creates
subdirectories such as @code{etc}, @code{etc/lilo}, @code{root}, and
@code{home/user}.  Any old configuration files which might be overwritten
during the upgrade are moved to these directories before the new files
are installed.  After installation, you may cautiously compare the
new files with the old ones, and incorporate your personal preferences
into the new files.

You must be particularly careful with files such as @code{/etc/inittab}
or @code{/etc/rc}, since mistakes in these may prevent the system from
booting, or cause serious problems while the system is running.
@fiindex @code{etc/inittab}
@fiindex @code{inittab}
@fiindex @code{etc/rc}
@fiindex @code{rc}
It is a good idea to read the man pages for @code{init} and @code{inittab}
before making any changes to these files.  A number of other @code{rc}
files are created in @code{/etc} during the installation; these are
described to some extent in @code{/etc/inittab}.
@xref{Adapting, , Tailoring MCC Interim Linux to Your Taste}.

@node Copyright, Bugs, MCC, Introduction
@section Copyright and conditions of distribution

Software today comes under a wide variety of copyright restrictions,
and it is important to know what conditions apply to the software
you use.
@cindex Copyright
The software in MCC interim versions of
Linux, and other software which can be added to it, is copyrighted in
a variety of ways.  In general, all of it is available to be used by
anyone, and the source to all of it is available as well.  If you intend
to use Linux or any of its parts for commercial purposes, you should get
the source files and read the copyrights contained in them.  (A list of
the sources can be found in @ref{Acknowledgments}.)  Most Linux
software falls under one of the following categories:

@table @r
@item GNU @i{copyleft}
@cindex GNU copyleft
The GNU General Public License applies to the Linux kernel, to the GNU
C and C++ compilers, to all utilities distributed by the Free Software
Foundation, and to many contributed utilities.  This copyright, also
known as a @i{copyleft}, is designed to ensure that the source to software
is available, and that you can give away or sell copies of the source
and of compiled binaries.  There is no warranty, but you are obliged to
notify anyone of any changes which you have made to the original.  You
are obliged to publish on each copy an appropriate copyright notice and
a disclaimer of warranty.  Works derived from copylefted works must be
released under the same terms.  The terms are specified in the GNU General
Public License, which is available by anonymous ftp.
@xref{FTP, , Getting MCC interim Linux by anonymous ftp}.

@item GNU library license
@cindex GNU library license
The GNU library license applies to the GNU C++ library and to all works
that must be linked with this library.  This allows commercial binaries
to be supplied in an unlinked form, so that purchasers can link the
binaries with other versions of the library.

@item BSD copyright
@cindex BSD copyright
The BSD copyright applies to all source from the University of California
at Berkeley.  Source may be reused freely, but it should contain a notice
to the effect that all or part of the software was developed by the
University of California at Berkeley.  Moreover, the name of the
University may not be used to endorse or promote such products.

@item MIT copyright
@cindex MIT copyright
@cindex MIT X Consortium
The X Window System, version 11, is copyrighted by the Massachusetts
Institute of Technology, and `X Window System' is a trademark owned
by MIT.  Most of the source for this software was developed by the
MIT X Consortium, and is covered by the MIT copyright.  This is
similar to the BSD copyright in permitting free commercial use of
MIT code, subject to the inclusion of similar notices giving
credit for any MIT code used in the final product.

@item Public domain software
@cindex public domain software
Some programs in this distribution are in the public domain.  They
have no copyright attached and can be used in any way without any
obligation or restriction.
@end table

@node Bugs, , Copyright, Introduction
@section Bugs and warnings

The MCC interim release of Linux assembles code from many sources.
@cindex bugs
@cindex warnings
Bugs have been fixed in some cases, but created in others.
I would appreciate any bug reports or fixes.
Please send them by e-mail to me at @code{LeBlanc@@mcc.ac.uk}.

@enumerate
@item
The command @samp{mkfs.ext2} sometimes fails to create a file system
because there is not enough space for the last superblock.  To work
around this, reduce the number of blocks slightly.  Remy Card
has promised a fix eventually.

@item
The @samp{script} command sometimes fails: the new shell stops
running and the script command terminates.  It is possible to
run @samp{script} by giving the command @samp{sh -login}
just before the command @samp{script}; you may need to repeat
the @samp{script} command several times.

@item
The first release of the tcpip package failed to check whether
@code{/usr/etc} was a pointer.  Fixed 11 July 1993.
@end enumerate

@node Getting, Preparing, Introduction, Top
@chapter Getting a Copy of MCC Interim Linux

There are two ways at present by which you can get a copy of MCC
interim versions of Linux: by anonymous ftp, and by visiting MCC.
The latter method is available as a service only for students and
members of staff of the University of Manchester and of UMIST.

@menu
* FTP::    Getting MCC interim Linux by anonymous ftp
* Shop::   Getting MCC interim Linux from the MCC shop
@end menu

@node FTP, Shop, , Getting
@section Getting MCC interim Linux by anonymous ftp

MCC interim versions of Linux are released on
@t{ftp.mcc.ac.uk [130.88.203.12]} in the directory
@code{/pub/linux/mcc-interim}.
@cindex anonymous ftp
@iftex
@dosubind{cp}{getting MCC Linux}{by anonymous ftp}@relax
@end iftex
In this directory there are subdirectories @code{dos-utils}, which contains
some commands which you may need if you install Linux from DOS,
@code{@value{version}}, which contains the current release, and @code{old},
which contains one or more older releases.
The current MCC release is also available from @t{sunsite.unc.edu [152.2.22.81]}
in the directory @code{/pub/Linux/distributions/MCC}, and also from @t{nic.funet.fi
[128.214.6.100]} in @code{/pub/OS/Linux/images/MCC-interim}.
Other sites sometimes maintain mirrors of the current MCC distribution.

The directory @code{@value{version}} contains the current @code{README} files
and the file @code{BUGS+WARNINGS}, which contain important information.
@fiindex @code{README} files
@fiindex @code{BUGS+WARNINGS}
(The contents of all of these files have been incorporated into the present
document.)  It also contains the following subdirectories:

@table @code
@item images
@cindex bootable root disk
@fiindex @code{boot.gz}
This contains the gzipped image of the bootable root disk.
@samp{gzip} is the GNU compression utility.

@item packages
This contains the packages which are optional parts of the MCC interim
distribution.

@item extra_kernels
@cindex kernels, precompiled
@cindex precompiled kernels
This contains additional kernels which may be installed as if they
were packages.  You should not install more than one of these kernels.
They contain no support for @sc{scsi} or @sc{xt} disks, and one of them
contain no support for @sc{nfs} or networking.
All three MCC kernels contain maths coprocessor emulation code, and support
for @sc{ide} hard disks and for the @i{minix}, @i{ext2}, @i{msdos},
and @i{proc} file systems.

@table @i
@item boot
@sc{scsi}, @sc{xt}, @sc{nfs}, networking.
@item ide
No @sc{scsi}, no @sc{xt}, no @sc{nfs}, no networking.
@item ipide
No @sc{scsi}, no @sc{xt}, networking and @sc{nfs} support.
@end table

@item extra_packages
This contains packages which for one reason or another have a
secondary status.

@table @i
@item emacs@r{,}
@itemx elisp
contain a cut-down
version of the @code{emacs} editor, which we use in our courses
at the Computer Centre.
@pindex emacs
A more complete version, which is compiled
with support for X windows, is available by anonymous ftp.
@item locinf
contains info files which I did not wish to
include in the main distribution; these describe @code{gcc} and
how to port it, @code{cpp}, some of the odder parts of @code{emacs},
and other subjects.
@item manpages
contains unformatted manual pages.
@cindex manual pages, unformatted
@cindex unformatted manual pages
The formatted pages are all that most people need, and they are
already contained in the other packages.
@item maps
contains the available keyboard maps.
@cindex maps, keyboard
@cindex keyboard maps
It is not
needed for US or for UK keyboard maps, which are included in the
@i{base} package on the root disk.
@item patches
contains the patches which, when applied to
the corresponding source files, produce the sources compiled in the
current release.
@end table

@item source_files
This contains the source files which were used to compile all binaries
in the current distribution.
@end table

After you decide what you need, you may transfer those files in binary
mode to any machine which supports ftp.  The bootable root disk must
be gunzipped and copied to a high density floppy disk, either 3.5 inch
1.44 Mb or 5.25 inch 1.2 Mb, of the sort which can be used to boot
the PC on which you intend to install or upgrade Linux.
@iftex
@dosubind{cp}{preparing a boot floppy}{from Linux}@relax
@end iftex
If you have a
Linux system which you are upgrading, you may put a formatted floppy
into your 0 drive (which DOS calls @samp{A:}) and give these commands:

@example
fdformat /dev/fd0H1440                 @r{(for 3.5 inch disks)}
fdformat /dev/fd0h1200                 @r{(for 5.25 inch disks)}
gunzip boot-uk.z
dd if=boot-uk of=/dev/fd0 bs=18432     @r{(for 3.5 inch disks)}
dd if=boot-uk of=/dev/fd0 bs=15360     @r{(for 5.25 inch disks)}
@end example

If you are installing Linux on a machine which already contains a version
of Linux, you may wish to put the MCC packages in a directory in the
existing file system.  MCC interim versions at present support
only the @i{minix} and @i{ext2} file systems.  The kernel will not
allow you to mount older @i{ext} or @i{xiafs} file systems.
The packages you wish to install should be in a single directory, and
they must have the same file names (in lower case) as they do in the
MCC distribution directory.  You may put all the packages in a DOS
directory on the same machine, or you may copy them to floppies.  The
MCC interim distribution prefers DOS-format floppies, though @i{minix}
or @i{ext2} floppies will work as well.  DOS format floppies will
hold more, and will not produce spurious error messages during installation.

If you are installing from DOS, you need commands which will gunzip
the disk image and copy it to a disk.
@pindex RAWRITE.EXE
@pindex GZIP.EXE
@pindex RAWRITE3.COM
@iftex
@dosubind{cp}{preparing a boot floppy}{from DOS}@relax
@end iftex
The commands @samp{GZIP.EXE},
@samp{RAWRITE.EXE}, and @samp{RAWRITE3.COM} can be found at
@code{ftp.mcc.ac.uk} in the directory @code{/pub/linux/mcc-interim/dos-utils}.
Transfer @samp{GZIPxxx.EXE} and one of the @samp{RAWRITE} commands in binary
mode.  (The version number @samp{xxx} is currently 123.)
The command @samp{GZIPxxx.EXE} is a self-unpacking archive, which
creates @samp{GZIP.EXE} and a documentation file.  Documentation
for the two @samp{RAWRITE} commands can be found in the @code{dos-utils}
directory with the commands; you should normally transfer documentation
files in text mode.  After unpacking @samp{GZIP.EXE}, you should
give the following commands:

@example
FORMAT A:
GZIP -D BOOT.GZ
RAWRITE
Enter source file name: BOOT
Enter destination drive: A:
Please insert a formatted diskette into drive A: and press -ENTER- :
@end example

The program @samp{RAWRITE3} is screen-oriented, and may work rather
faster than the older @samp{RAWRITE}.

If you are installing Linux on a system which already contains a DOS
partition, you may find it convenient to put MCC packages
in a single directory on that partition.
@cindex floppy disk installation
@iftex
@dosubind{cp}{installing MCC packages}{using floppy disks}@relax
@dosubind{cp}{installing MCC packages}{from a DOS directory}@relax
@end iftex
You can also copy
them to DOS format floppies.  As explained above, the file names must
be the same as in the @code{packages} directory, though under DOS
they will, of course, be in upper-case.
If you get all packages, they will fit on floppies as follows:

3.5 inch high density floppies:

@table @r
@item disk 1
@i{base}, @i{flex}, @i{gpp}
@item disk 2
@i{bison}, @i{gccb}, @i{info}
@item disk 3
@i{gcca}, @i{gdb}, @i{gprof}, @i{kermit}, @i{tcpip}
@item disk 4
@i{gawk}, @i{groff}, @i{linux}, @i{tar}
@end table

5.25 inch high density floppies:

@table @r
@item disk 1
@i{base}, @i{info}, @i{tar}
@item disk 2
@i{bison}, @i{gcca}, @i{groff}
@item disk 3
@i{gawk}, @i{gccb}, @i{gdb}
@item disk 4
@i{gpp}, @i{kermit}, @i{tcpip}
@item disk 5
@i{flex}, @i{gprof}, @i{linux}
@end table

In the latter case, the final disk contains enough space for one of the
extra kernels, or for anything else you wish.  In either case the @i{maps}
package fits on the final disk as well.  If you wish to get all
of the extra packages and kernels, you can fit them on floppies like this:

3.5 inch high density floppies:

@table @r
@item disk 1
@i{base}, @i{gawk}, @i{gpp}
@item disk 2
@i{elisp}, @i{gcca}, @i{tar}
@item disk 3
@i{gccb}, @i{info}, @i{patches}
@item disk 4
@i{groff}, @i{linux}
@item disk 5
@i{bison}, @i{emacs}, @i{flex}, @i{gdb}
@item disk 6
@i{locinf}, @i{manpages}, @i{tcpip}
@item disk 7
@i{gprof}, @i{ide}, @i{ipide}, @i{kermit}, @i{maps}
@end table

5.25 inch high density floppies:

@table @r
@item disk 1
@i{base}, @i{info}, @i{tar}
@item disk 2
@i{bison}, @i{gcca}, @i{groff}
@item disk 3
@i{gawk}, @i{gccb}, @i{gdb}
@item disk 4
@i{gprof}, @i{linux}
@item disk 5
@i{gpp}, @i{kermit}, @i{ipide}
@item disk 6
@i{elisp}, @i{flex}, @i{tcpip}
@item disk 7
@i{emacs}, @i{ide}, @i{maps}
@item disk 8
@i{locinf}, @i{manpages}, @i{patches}
@end table

This system allows you to create your own packages, which can be installed
along with mine.
@fiindex @code{install.setup}
@fiindex @code{install.clean}
@fiindex @code{install.info}
@fiindex filename@code{.crc}
They must be gzipped tar files with the extension @samp{.tgz}.
Each package is unzipped and untarred in the root directory.
If it contains files @code{install.setup} and @code{install.clean},
these are executed as shell scripts respectively before and after
untarring the archive.
If you wish, you may include a file @code{install.info}, which is
copied to the screen during installation.
@iftex
@dosubind{pg}{@code{brik}}{verifying MCC packages}@relax
@end iftex
The MCC packages all contain a file @i{filename}@code{.crc},
which must have the same basename as the @samp{.tgz} file, and which
has been generated with the command @samp{brik -Gb}.
If such a file exists, the installation uses it to verify the included
checksums after @code{install.clean} is executed.

You may omit any packages you wish.  Obviously, you cannot recompile the
kernel unless you also install @i{gcca} and @i{gccb}.
@i{Bison}, @i{flex}, @i{gdb}, @i{gpp}, and @i{gprof} are
also of little use unless @i{gcca} and @i{gccb} are installed.

The default kernel in the boot disk contain all @sc{scsi} disk
drivers and @sc{xt} disk drivers in the kernel as distributed by Linus
Torvalds, as well as networking, @sc{nfs}, and kernel maths coprocessor
emulation.

It is also possible to install MCC interim packages from a directory on a
remote machine which can be mounted on your Linux system using @sc{nfs}.
@cindex network installation
@iftex
@dosubind{cp}{installing MCC packages}{using NFS}@relax
@end iftex
To do this, you must have a supported Ethernet
card.  You must already have networking software installed and
configured.  If necessary, you can install the @i{base} and
@i{tcpip} packages from a floppy disk, get the networking software
working, and then install other packages.

@node Shop
@section Getting MCC interim Linux from the MCC shop
@cindex MCC shop
@iftex
@dosubind{cp}{getting MCC Linux}{from the MCC shop}@relax
@end iftex

MCC interim Linux is available from the MCC shop to members of the
University of Manchester and of UMIST.  You can buy a set of diskettes
containing the bootable root disk, all the packages, and the two
optional kernels with no @sc{scsi} support.
@xref{FTP, , Getting MCC interim Linux by anonymous ftp}, where these
optional kernels are described.
You can also obtain a free copy of this document.

@node Preparing, Installing, Getting, Top
@chapter Preparing to Install Linux
@cindex preparing to install Linux

There are several things which you must do before installing
MCC interim Linux besides getting the appropriate files and making
a bootable root disk.
The target machine must have free space which
is not included in already allocated partitions.  In some cases this
means that you must back up your hard disk, create a smaller DOS
partition, using the DOS command @samp{FDISK}, and restore your
DOS files to the new DOS partition.

There are procedures which allow you to change the size of a DOS
partition without backing up your files, but
we do not recommend such procedures.  For more information, see
@ref{Dividing, , Dividing up your disk}.

@menu
* Space::     Disk space required for Linux files
* Swap::      Swap space required for Linux
@end menu

@node Space, Swap, , Preparing
@section Disk space required for Linux files

You may wish to have a small Linux system with
only a few of the MCC interim packages.
@ifinfo
@cindex disk space required for Linux files
@end ifinfo
@pindex tune2fs
The following
table gives the approximate size required for each package.  The exact
size depends on the type of file system on which the package is installed;
packages usually take up less space on extended(2) file systems.  Remember
that each file system also uses up a few hundred Kb on each partition,
depending on the type of file system.
Extended(2) file systems also reserve a percentage of each partition
for the superuser; the exact percentage can be selected by an option to
@code{mkfs} and changed by the command @code{tune2fs}.
(The MCC distribution does not allow you to change
the 5% default before installation.)  The package @i{Base} must be
installed from the boot floppy before any other packages.@*

@iftex
@dosubind{cp}{disk space required}{for MCC packages}@relax
@tex
\halign{\hskip1cm \sl{#}\hfil&\quad\hfil\code{#}&\quad#\hfil\cr
\r{Package}&\r{Size in Kb}&Contents\cr
\noalign{\vskip 10pt}
Base&1937&basic binaries and text (on boot floppy)\cr
base&1341&basic binaries, texts, and man pages\cr
bison&94&the GNU {\tt yacc}-compatible parser generator\cr
elisp&2901&lisp support files for the emacs editor\cr
emacs&3072&the emacs editor, without lisp files\cr
flex&199&the GNU fast lexical analyser generator\cr
gawk&140&the GNU version of {\tt awk}\cr
gcca&1511&the GNU C compiler, binaries and include files\cr
gccb&2197&the GNU C libraries and code generator\cr
gdb&706&the GNU debugger\cr
gpp&2382&the GNU C{\tt ++} compiler {\tt g++}\cr
gprof&555&the GNU profiler for use with {\tt gcc} and {\tt g++}\cr
groff&2216&the GNU clone of the {\tt nroff}/{\tt troff} text formatter\cr
info&1910&the GNU utility {\tt info}, plus selected info files\cr
kermit&348&the Kermit communications utility\cr
linux&2783&the kernel source for Linux 0.99 patch level 10\cr
locinf&2318&info files for {\tt gcc}, {\tt gpp}, odd {\tt emacs} modes\cr
manpages&1597&unformatted manual pages\cr
maps&112&keyboard maps for non-English keyboards\cr
patches&116&the patches used to compile this release\cr
tar&72&the GNU version of {\tt tar}\cr
tcpip&528&commands and daemons for networking\cr
&\hrulefill&\cr
Total&29035&\cr
}
@end tex
@end iftex

The amount of disk space you require depends on what software you
intend to install.
@cindex @TeX{}
@cindex X386
@iftex
@dosubind{cp}{disk space required}{for MCC interim Linux}@relax
@dosubind{cp}{disk space required}{for MCC source files}@relax
@dosubind{cp}{disk space required}{for @TeX{}}@relax
@dosubind{cp}{disk space required}{for X386}@relax
@end iftex
For all MCC packages (not including extras),
you need about 21 Mb, while the extras require another 10 Mb.
For the X window system
(which is not included in the MCC distribution), you need a further
20 Mb.  @TeX{} (which is also not included
in the MCC distribution), requires at least 10 Mb more.  The
source files for all MCC packages (which are also not part of
the distribution) require a further 35 Mb.  Additionally,
you must consider the space you need for work, perhaps an
additional 5 or 10 Mb, or 100 Mb or more for large projects.

@ifinfo
@cindex partitions
@end ifinfo
On the other hand, you may plan to have a large system.
@iftex
@dosubind{cp}{partitions}{file system}@relax
@dosubind{cp}{file system}{partitions}@relax
@end iftex
@cindex planning partitions
In that case, you may wish to distribute your
files over several partitions.  Linux allows you to have up to 16
partitions on a @sc{scsi} disk, and up to 64 partitions on an @sc{ide} disk.
How you divide your disk is up to you, of course, but there are some
points you may wish to consider.  If you intend to upgrade
Linux at some point, it may be convenient to have your development
files on a separate partition.  In this way, you can make a new file
system for the new distribution, and you will not risk having large,
unnecessary binaries which you no longer need.  I like to have @TeX{}
and X386 on a separate partition, since these are not included in
MCC distributions.  You may like to put the @code{/usr} subtree on
a partition of its own, or @code{/usr/src}.  The directories @code{/home}
and @code{/tmp} might also have partitions of their own, so that a
user (including you) cannot accidentally fill up the system disk.
@xref{Dividing, , Dividing up your disk}.

@node Swap, , Space, Preparing
@section Swap space required for Linux
@ifinfo
@cindex swap space required for Linux
@end ifinfo
@iftex
@dosubind{cp}{disk space required}{for swapping}@relax
@end iftex
@cindex paging
@cindex swap space

The amount of swap space you require depends on how much memory
you have, and on what you intend to do on your system.  What we
call @dfn{swapping} in the Linux world is sometimes called
@dfn{paging} on other operating systems.  If you use the GNU
C compiler, you may need 6 Mb of memory to compile one file.
If you have only 4 Mb of physical memory, you will also need at
least 2 Mb of swap space for that compilation. When GCC compiles
a very large function with optimisation, it may need much more
memory than this.

If you are using X windows, you may need at least 8 Mb of memory
in addition to your other requirements.  If you have several users
(or if you are running large jobs in several windows or on several
consoles), you must add up all their requirements for swap space.

On the other hand, most people are the sole users of their machines,
and many of them do only one or two things at once.  In such cases,
you might plan on having a total of 8 to 12 Mb if you are not using
X windows, or 16 to 20 Mb if you are using X windows and compiling big
packages at the same time.

Linux can use two kinds of swap areas: @i{swap partitions} and @i{swap
files}.
@cindex swap partitions
@cindex swap files
@cindex planning partitions
@ifinfo
@cindex partitions
@end ifinfo
@iftex
@dosubind{cp}{partitions}{swap}@relax
@end iftex
Swap partitions can be used only for swapping.  Swap files have the
advantage of being easier to create and destroy, but they are less
efficient than swap partitions.  No swap partition or swap file can
contain more than 16384 Kb of usable swap space, so if you need more
than this, you must use several partitions or files.

MCC interim Linux can create and activate swap partitions during
installation, and normally expects you to have a single swap partition,
which it inserts into @code{/etc/fstab}, so that it is activated
automatically whenever you boot the installed system.
@fiindex @code{fstab}
If you wish
to have more than one swap partition, or a swap file in addition to
or instead of a swap partition, you must create them yourself after
installation and put the entries manually into @code{/etc/fstab}.

@node Installing, Recovering, Preparing, Top
@chapter Installing or Updating MCC Interim Linux

This chapter assumes that you have already obtained all the necessary
files and packages, and prepared or obtained a suitable MCC bootable
root disk.
@xref{FTP, , Getting MCC interim Linux by anonymous ftp}, where the
preparation of bootable root disks is described.

@menu
* Overview::              An overview of the MCC installation.
* MCC root::              Booting from the MCC boot disk.
* Running fdisk::         Editing the partition tables.
* Setting up::            Preparing swap and file system partitions.
* Basic installation::    Installing basic files from the boot disk.
* Installing packages::   Installing the MCC interim packages.
* Boot floppy::           Creating a boot floppy.
@end menu

@node Overview, MCC root, , Installing
@section An overview of the MCC installation

In this section I summarise what you should do to install Linux
using the MCC interim distribution.  Exceptions, qualifications, and
alternatives are omitted to keep the picture as simple as possible.

@itemize @minus
@item Read this document carefully, so that you know what the process
of installing Linux involves.  Think about how you will partition your
hard disk.  @xref{Preparing, , Preparing to Install Linux}.

@item Back up your hard disk.

@item Get the boot image, packages, and DOS programs by using anonymous ftp
in binary mode.  @xref{FTP, , Getting MCC interim Linux by anonymous ftp}.

@item Unpack @samp{GZIPxxx.EXE}.

@item Use the new @samp{GZIP.EXE} to unpack the boot image.

@item Use @samp{RAWRITE} to copy the boot image to a high density floppy.
@xref{FTP, , Getting MCC interim Linux by anonymous ftp}.

@item Boot from the MCC boot disk in read-only mode.
@xref{MCC root, , Booting from the MCC boot disk}.

@item Use @samp{fdisk} to edit your partition table.
@xref{Fdisk, , @code{fdisk}: the Linux partition table editor}.

@item Reboot from the MCC boot disk in read-only mode.

@item Use @samp{mkswap} to set up a swap partition.
@xref{Initialising, , Initialising a swap partition}.

@item Use @samp{mkfs} to create file system partitions.
@xref{Creating, , Creating a file system}.

@item Install the Base package from the MCC boot disk.
@xref{Basic installation, , Installing basic files from the boot disk}.

@item Reboot from the MCC boot disk in read-write mode.

@item Install the packages you select.
@xref{Installing packages, , Installing the MCC interim packages}.

@item Use @sc{lilo} to create a boot floppy.
@xref{LILO, , Installing LILO on a floppy or hard disk}.

@item Reboot from your new boot floppy.

@item Log in as root, and use @samp{/etc/lilo/install} to install
@sc{lilo} on your hard disk.
@end itemize

The following sections explain this process in greater detail.

@node MCC root, Running fdisk, Overview, Installing
@section Booting from the MCC boot disk

Put the MCC boot disk in the 0 drive
(the A: drive for DOS) of the machine on which you want to install Linux.
@ifinfo
@cindex booting
@end ifinfo
@iftex
@dosubind{cp}{booting}{from MCC boot disk}@relax
@end iftex
Then reboot by pressing the @samp{RESET} button, or @samp{CTRL-ALT-DEL}.
After the system boots, you should see something like this:@*

@cindex hex code for root
@iftex
@dosubind{cp}{partitions}{hex code at boot}@relax
@end iftex
@cartouche
@example
 LILO
 Press <RETURN> to boot with the floppy as a read-only '/'.
 Type 'rw root=xxx <RETURN>' to mount a hard disk partition as '/'.
    The value 'xxx' is printed after you do an installation.
    Typical values:   /dev/hda1: 301     /dev/hda2: 302
                      /dev/hdb1: 341     /dev/hdb3: 343
                      /dev/sda1: 801     /dev/sdb4: 814
 boot:
@end example
@end cartouche

To install or update MCC interim Linux, you will need to boot
from this floppy at least twice, and possibly three times:

@enumerate
@item You may need to run @samp{fdisk} to edit the partition tables.
After doing this, it is a good idea to reboot the system.
@item You need to set up and mount the hard disk partitions and install
basic files from the boot disk.
@item You need to reboot the system before installing the MCC packages.
@end enumerate

In the first two cases, simply press @t{<RETURN>} after the above message
appears.
@iftex
@dosubind{cp}{booting}{with read-only @code{/}}@relax
@end iftex
This boots Linux using the kernel on the boot disk, and
mounts the boot disk as @code{/} in read-only mode.

In the third case, you need to give a command such as

@example
rw root=302
@end example

where the number @samp{302} varies depending on which root partition
you intend to use.
This also uses the kernel on the boot disk, but it mounts one of the
partitions on your hard disk as @code{/}, and it mounts that partition
in read-write mode.
@iftex
@dosubind{cp}{booting}{with read-write @code{/}}@relax
@end iftex
This is not guaranteed to work unless you have
installed or updated basic files from the MCC interim boot disk.

As the kernel boots, it tries to explore your hardware, and messages
will appear describing what it finds.  If you have only one @sc{ide}
disk, you will see this message:

@example
hard disk I/O error
dev 0340, sector 0
  unable to read partition table of device 0340
@end example

This can be ignored; it means that the kernel cannot access your second hard
disk, which of course does not exist.  If you simply pressed @t{<RETURN>},
the messages which appear should end like this:@*

@cartouche
@example
 Linux version 0.99.pl8-5 (root@@linux) 04/24/93 08:05:03

 f   Run fdisk to manage the partition table.
 s   Set up a new swap partition.
 a   Activate an existing swap partition.
 m   Make a new file system on a partition.
 i   Install basic binaries.
 c   Check (and repair) an existing file system.
 e   Execute /bin/sh on an existing file system.
 r   Run a customise script.
 q   Quit.

 ? _
@end example
@end cartouche

Instead of getting
a shell prompt @samp{#}, you see a small menu.  The choices in the menu
help you execute the commands you need to use to create an installed
MCC interim Linux system, and these commands appear on the menu more or
less in the order in which you need to select them.  To select a command,
type the letter which appears next to it, and then press @t{<RETURN>}.
This procedure differs from that in most older MCC installations.

@node Running fdisk, Setting up, MCC root, Installing
@section Editing the partition tables

To run @samp{fdisk} from the MCC boot floppy, select @samp{f} from the menu.
@ifinfo
@pindex fdisk
@cindex partitions
@end ifinfo
@iftex
@dosubind{pg}{@code{fdisk}}{from MCC boot floppy}@relax
@dosubind{cp}{partitions}{editing with fdisk}@relax
@end iftex
@xref{Fdisk, , @code{fdisk}: the Linux partition table editor},
for more information about the @samp{fdisk} command.
First you need to specify the disk whose partition tables you will
edit.  The menu utility asks:

@example
Run fdisk on (block device; default = /dev/hda): 
@end example

At this point, press @t{<RETURN>} to accept the default.
@fiindex @code{hda}
@fiindex @code{hdb}
@fiindex @code{sda}
@fiindex @code{sdb}
@fiindex @code{xda}
@fiindex @code{xdb}
@code{/dev/hda}
is the first hard disk, @code{/dev/hdb} the second, @code{/dev/sda} the
first @sc{scsi} disk, @code{/dev/sdb} the second, @code{/dev/xda} the first
@sc{xt} disk, and @code{/dev/xdb} the second.  To select one of these, simply
type it after the prompt.  If you decide not to, the `block device' prompts
always accept @samp{q} as an answer, though sometimes the message
@samp{That is not a legitimate device} appears.

At this point the @samp{fdisk} prompt appears:

@example
Command (m for help): _
@end example

If you type @samp{m}, you will see the main menu for @samp{fdisk}:@*

@cartouche
@example
 Command action
    a   toggle a bootable flag
    d   delete a partition
    l   list known partition types
    m   print this menu
    n   add a new partition
    p   print the partition table
    q   quit without saving changes
    t   change a partition's system id
    u   change display/entry units
    v   verify the partition table
    w   write table to disk and exit
    x   extra functionality (experts only)

 Command (m for help): _
@end example
@end cartouche

We can give the command @samp{p} to print the partition table.
Here is a sample from one of the machines I use:

@example
Disk /dev/hda: 14 heads, 35 sectors, 978 cylinders
Units = cylinders of 490 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1   *       1       1      98   23992+   4  DOS 16-bit <32M
/dev/hda3   *     263     263     426   40180   83  Linux native
/dev/hda4         427     427     977  134995    5  Extended
/dev/hda5         427     427     491   15924+  82  Linux swap
@end example

We can create a primary partition in slot 2, or another
logical partition after the swap space:

@example
Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (99-978): 99
Last cylinder or +size or +sizeM or +sizeK (99-262): 262

Command (m for help): _
@end example

The partition type (by default 83 for Linux native file systems)
is actually ignored in practice (unless you are using DR-DOS),
but I like to see things clearly when I look at partition tables;
I want sensible information to appear.  If I have a Linux/MINIX
file system, I can change the partition type as follows:

@example
Command (m for help): t
Partition number (1-8): 3
Hex code (type L to list codes): 81
Changed system type of partition 2 to 81 (Linux/MINIX)
@end example

Next we make the new partition active. In most cases this has no practical
effect, at least if you install @sc{lilo} in your master boot record.
If you use the DOS master boot record, you must have exactly one
active partition, while other programs (such as the OS/2 boot manager)
have their own rules.
@xref{Flags, , Active flags and system types}.
I like to be able to see which partitions are
bootable when the partition table is printed:

@example
Command (m for help): a
Partition number (1-8): 2

Command (m for help): p

Disk /dev/hda: 14 heads, 35 sectors, 978 cylinders
Units = cylinders of 490 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1   *       1       1      98   23992+   4  DOS 16-bit <32M
/dev/hda2   *      99      99     262   40180   83  Linux Ext
/dev/hda3   *     263     263     426   40180   81  Linux/MINIX
/dev/hda4         427     427     977  134995    5  Extended
/dev/hda5         427     427     491   15924+  82  Linux swap
@end example

Being satisfied with this, we decide to save it.

@example
Command (m for help): w
The partition table has been altered!

Calling BLKRRPART ioctl() to re-read partition table
Syncing disks
Reboot your system to ensure partition table is updated
Reboot the system now (Y or N): y

Leave the boot floppy in the drive.

Press <RETURN> at the LILO prompt.
@end example

It is not strictly necessary to reboot the system at this point.
@iftex
@dosubind{pg}{@code{fdisk}}{reboot after running}@relax
@end iftex
It is perfectly safe to run @samp{fdisk} again, whether on the same
partition or on other partitions.  But before you run any other
commands from the boot floppy, it is safer to reboot, at least if
the hard disk contains any data which you would regret losing.

@node Setting up, Basic installation, Running fdisk, Installing
@section Preparing swap and file system partitions

Once partitions have been created, they need to be initialised before
they can be used for swapping or as file system partitions.  Previously
initialised swap partitions should be activated during installation,
and it is a good idea to check existing file systems so that any
inconsistencies that may have arisen are corrected before you copy
new files onto them.  You can select any one of these functions from
the menu which appears after you boot the system in read-only mode.

@menu
* Initialising::   Initialising a swap partition.
* Activating::     Activating a swap partition.
* Creating::       Creating a file system.
* Repairing::      Checking and repairing an existing file system.
@end menu

@node Initialising, Activating, , Setting up
@subsection Initialising a swap partition

Before you can use a swap partition, you must initialise it.
@cindex initialising swap partitions
@iftex
@dosubind{cp}{swap partitions}{initialising}@relax
@end iftex
Once Linux is installed, you can do this with the @samp{mkswap} command.
To run @samp{mkswap} from the MCC boot floppy, select @samp{s} from the
menu.  Here is a typical example:

@example
WARNING: This will destroy any files on this partition.
Do you want to continue (Y or N): y
Run mkswap on (block device; default = /dev/hda5): 
Setting up swapspace, size = 16302080 bytes
Adding Swap: 15920k swap-space
@end example

I find warnings of the type `Are you sure?' irritating, but I print
one here to remind you that this command overwrites an entire partition.
The default swap device is @code{/dev/hda5} because this is the first
logical partition, and it seems sensible not to put a swap partition
in one of the slots of the primary partition table, unless you have a
very small disk.  If you are using a different partition for swap,
type its name before pressing @t{<RETURN>}; for example, type
@code{/dev/hda2} in response to the `block device' query.

The maximum usable size of a swap partition is 16 Mb, or 16384 blocks of
1024 bytes each.
@iftex
@dosubind{cp}{swap partitions}{maximum size}@relax
@end iftex
If you try to initialise a partition larger than this for swap, you
are warned that some of this space will be wasted, and you can choose
to give up before doing so.  If you wish, you can use @samp{fdisk} to
reduce the size of the partition slightly, and you can add the extra
cylinders to another partition.

After the new swap partition is initialised successfully, the boot utility
activates it for you.

@node Activating, Creating, Initialising, Setting up
@subsection Activating a swap partition

If you install Linux on a disk which already contains an initialised
swap partition, you should activate it before doing anything else.
@cindex activating swap partitions
@iftex
@dosubind{cp}{swap partitions}{activating}@relax
@end iftex
On small systems, the installation may fail if you do not, and
on any system, this should make the installation a little faster.
Once Linux is installed, you can activate swap space with the @samp{swapon}
command.
To run @samp{swapon} from the MCC boot floppy, select @samp{a} from the
menu.  Here is a typical example:

@example
Activate swapping on parition (block device; default = /dev/hda5):
Setting up swapspace, size = 16302080 bytes
Adding Swap: 15920k swap-space
@end example

Here again, the default swap partition is @code{/dev/hda5}.

@node Creating, Repairing, Activating, Setting up
@subsection Creating a file system

Creating a file system under Linux is like running the @code{FORMAT}
utility under DOS.
@cindex creating a file system
@iftex
@dosubind{cp}{file system}{creating}@relax
@end iftex
Once Linux is installed, you can do this with the @samp{mkfs} command.
To run @samp{mkfs} from the MCC boot floppy, select @samp{m} from the
menu.  Here is a typical example:

@example
@group
WARNING: This will destroy any files on this partition.
Do you want to continue (Y or N): y
Run mkfs on (block device; default = /dev/hda1): /dev/hda2
@end group
Create a Minix file system (Y or N): n
By default all 40180 blocks of this partition are used for the file system.
Sometimes this causes problems, due to a bug in mkfs.ext2.
Reduce this number (Y or N): n
mke2fs 0.3, 93/04/22 for EXT2 FS 0.3, 93/04/22
@end example

MCC interim Linux currently supports two kinds of file system:
the @i{minix} file system and the @i{ext2} file system.

The @dfn{minix} file system is named after the @sc{minix} operating
system.
@cindex minix file system
@iftex
@dosubind{cp}{file system}{minix}@relax
@end iftex
It comes in two slightly different versions: one in which
file names cannot be more than 14 characters long, and one in which
file names cannot be more than 30 characters long.  Partitions with
the 14 character limit are actually compatible with @sc{minix} and
can be mounted under that system.  The 30 character limit is not
compatible with @sc{minix}, but Linux treats the two versions as
identical in most respects.  The @i{minix} file system is older and
less subject to change, and perhaps slightly more reliable.  We do
not recommend using the 14 character version unless you need to
maintain compatibility with the @sc{minix} operating system.
A @i{minix} file system cannot have more than 64 Mb, or 65536 blocks
of 1024 bytes, on a single partition.

The @dfn{ext2} file system was developed for Linux and eventually
will become the normal Linux file system.
@cindex ext2 file system
@cindex ext file system
@iftex
@dosubind{cp}{file system}{ext2}@relax
@dosubind{cp}{file system}{ext}@relax
@end iftex
An older version of this system, the @dfn{ext} file system, is now
quite stable, but we do not recommend its use, and MCC interim
Linux does not support it any longer.  File names in the @i{ext2} file
system may be up to 255 characters long, and a single partition
may contain up to 4 terabytes (4 million megabytes).  If you tell the MCC
installation utility that a file system is not a @i{minix} file system, it
assumes that it is an @i{ext2} file system.

@node Repairing, , Creating, Setting up
@subsection Checking and repairing an existing file system

It is a good idea to check file systems once in a while, particularly
before you install a new version of Linux on a file system which
already exists.
@cindex repairing a file system
@iftex
@dosubind{cp}{file system}{repairing}@relax
@end iftex
Once Linux is installed, you can do this with the @samp{fsck} command.
This is the Unix equivalent of the DOS command @samp{CHKDSK}.
To run @samp{fsck} from the MCC boot floppy, select @samp{c} from the
menu.  Here is a typical example:

@example
Run fsck on (block device; default = /dev/hda1): /dev/hda2
Does this device contain a Minix file system (Y or N): y
Do you want (possibly dangerous) automatic fixing (Y or N): n
Do you want to fix problems on request (Y or N): y
@end example

In the same way as when you create a file system, the boot floppy assumes
that a Linux
file system is either a @i{minix} file system or an @i{ext2} file system.
@pindex fsck
The @samp{fsck} program reads through a file system, which is usually
described in some detail and with a considerable amount of redundant
information.  If the information is inconsistent, @samp{fsck} does
one of three things:

@enumerate
@item In @dfn{automatic} mode, it tries to fix all problems as well as it can.
@item In @dfn{interactive} mode, it asks you before doing anything.
@item In @dfn{default} mode, it fixes minor problems, but asks you
before fixing major problems.
@end enumerate

If you answer @samp{y} to the query about automatic fixing, @samp{fsck}
runs in automatic mode and fixes everything it can.  This may be
dangerous if the file system is badly corrupted, since the program
might delete a file you wish to keep.  In my view, this is very
unlikely, and I nearly always run @samp{fsck} in automatic mode.
If you answer @samp{y} to the query about fixing problems on request,
@samp{fsck} runs in interactive mode; otherwise, it runs in default mode.

File systems usually become corrupt when a system is shut down or
rebooted improperly; for example, while a file or directory is being
created or deleted.  Chances are that if a file
is being written, you will lose all or part of the file irrevocably.

@node Basic installation, Installing packages, Setting up, Installing
@section Installing basic files from the boot disk

When you have set up the swap and file system partitions, you can select
the @emph{install} option from the menu with the @code{i} command.
@cindex installing
@cindex mounting partitions
The following dialogue shows how to specify partitions to be mounted:

@example
Which device contains the file system you wish to be mounted
on '/'?  Give a name in the form '/dev/hda1', or type
'q' to quit.
This file system is on (block device; default = /dev/hda1): /dev/hda2
Does this device contain a Minix file system (Y or N): n

Is there another partition you wish to mount?  If so, give the
pathname it will have in the installed system, such as '/usr/src'
with a slash at the front and no slash at the end.  (Upper case is
not allowed.)  If not, type 'n': n
@end example

You must always give directories moving away from the root of
the tree: in other words, if you intend to mount @code{/dev/hda8} on @code{/},
@code{/dev/hda7} on @code{/usr}, and @code{/dev/hda6} on @code{/usr/src},
then you must give @code{/} first, then @code{/usr}, and then @code{/usr/src}.
If you specify another directory here, for
example, @code{/usr/src}, then you are asked for the block device where it
lives, and the type of file system it contains.

After you type 'n' to the request for another directory, you should see
some messages as the @i{Base} package gets installed:
@cindex Base package
@iftex
@dosubind{cp}{installing MCC packages}{from the boot floppy}@relax
@end iftex

@example
492 blocks
Installing Base.tgz
Base contains basic binaries and text files for Linux.
..................................................................
2071 blocks
115 blocks
Verifying Base.crc.
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/hda2              40180    3217     35268     8%   /root

Reboot the system now (Y or N): _
@end example

The `blocks' messages refer to 512-byte blocks, half the size of the file
system blocks.  `Verifying' refers to the crc check by @samp{brik}; after
checking, the crc file is moved to @code{/tmp}, so that you can check later
to see whether anything has changed.
@cindex checksum
@cindex verifying files
@iftex
@dosubind{pg}{@code{brik}}{verifying MCC packages}@relax
@end iftex
There is no verification for
most man pages, or for files (like @code{/etc/fstab}, for example) which are
edited by the installation programs.  If a file has a bad checksum,
a message appears like this one:

@example
BAD etc/init
@end example

This warns you that something is wrong.  If there is a small
error (caused perhaps by a bad spot on your floppy?), you might have
only one bad file, but usually there are several.  The @samp{df} listing
(which includes all mounted disks) can be useful if you have insufficient
space to install further packages.

It is in general a good idea to reboot the system at this point during
installation or upgrading.  If you choose not to do so, a shell is
started, and you can poke about in the half-installed system.  If you
choose to do so, you will see this message:

@example
Please type CTRL-D to reboot, not 'reboot' or 'shutdown'.
@end example

This is because the system is set up in an odd way.  The root partition
(the booted floppy) is mounted in read-only mode, and the usual @samp{mount}
and @samp{umount} programs will not work properly.  Similarly, the
@samp{reboot},
@samp{halt}, and @samp{shutdown} utilities are not able to unmount file
systems, which consequently are likely to become corrupt during the shutdown.
If you type CTRL-D or @samp{exit}, you will again see the prompt

@example
Reboot the system now (Y or N): _
@end example

If you answer @samp{y}, you should see a message like this:

@example
Leave the boot floppy in the drive.
Unmounted /dev/hda3
Unmounted /dev/hda2

Type 'rw root=302' at the LILO prompt.
@end example

The message @samp{rw root=302} is important, since you need to type it
after the system has rebooted and printed the @sc{lilo} prompt.
The message printed at that time will jog your memory if you forget
this, or if you did not write it down during the 15 seconds or so
while it appears on the screen.  The important part of the message
is the number @samp{302}, which varies depending on the partition you
wish to be mounted as @code{/}, the root of the new file system.

@node Installing packages, Boot floppy, Basic installation, Installing
@section Installing the MCC interim packages

After you have installed the @i{Base} package from the boot floppy, you
must reboot before you install any other packages.
@ifinfo
@cindex booting
@end ifinfo
@iftex
@dosubind{cp}{booting}{from MCC boot disk}@relax
@end iftex
At this time you should not yet be able to boot Linux from your hard
disk.
@cindex hex code for root
@iftex
@dosubind{cp}{partitions}{hex code at boot}@relax
@end iftex
Leave the boot floppy in the floppy drive, and when the @sc{lilo}
prompt appears, type the command @samp{rw root=xxx} which was printed
at the end of the last step.  The number @samp{xxx} is a hexadecimal
code for the partition which contains the root of the file system,
and which is mounted as @code{/}.

The system should boot, mounting the specified partition as @code{/} in
read-write mode.  Then the following message should appear:@*

@cartouche
@example
 Which drive will you use to install Linux packages:

 1  drive A:  5.25 inch HD floppies
 2  drive A:  3.5  inch HD floppies
 3  drive B:  5.25 inch HD floppies
 4  drive B:  3.5  inch HD floppies
 5  A directory on an unmounted partition on this machine
 6  A directory already mounted at this time
 7  No installation at this time

 ? _
@end example
@end cartouche

If you are installing from floppies, give one of the answers 1 -- 4,
whichever is appropriate.
@iftex
@dosubind{cp}{installing MCC packages}{using floppy disks}@relax
@dosubind{cp}{installing MCC packages}{from a DOS directory}@relax
@dosubind{cp}{installing MCC packages}{from a Linux directory}@relax
@end iftex
If you are installing from a directory, and if you mounted that
directory before you installed the Base package from the boot floppy,
answer @samp{6}.  If you copied the packages to a directory on a
DOS partition, or on a Linux partition which is not currently mounted,
answer @samp{5}.

If you answer @samp{5}, you must give the name of the unmounted
partition which contains the directory which contains the packages.
The partition must be a DOS partition or contain a @i{minix} or @i{ext2}
file system.  You are prompted for the name of the partition:

@example
What is the block device on which this partition lives?
@end example

To this you should answer, for example, @code{/dev/hda1}.

If you are going to mount a partition using @sc{nfs}, then you must
set up networking before you continue.
@iftex
@dosubind{cp}{installing MCC packages}{using NFS}@relax
@end iftex
This requires the new `net-2' networking software.
If you must install the @i{tcpip} package to get this, then give one of
the answers 1 -- 6 as appropriate, and install the @i{tcpip} and @i{base}
packages first.  But if the net-2 software is already installed,
so that you got messages when the system booted about your hostname
and @sc{ip} address, type @samp{7}.
@fiindex @code{rc.net}
In this case, it may be
necessary to change your hostname and run @code{/etc/rc.net} before you
continue.  Once the hostname is correct and networking is active,
mount the remote partition on @code{/mnt} and give the command
@samp{/tmp/install}.  This is done automatically if you give one
of the commands 1 -- 6 at boot time.

Whichever method you use to make packages accessible, you must then
answer this question:

@example
Do you wish to have a prompt before each package (Y or N): _
@end example

I recommend answering @samp{y}, which allows you to omit packages
which you do not wish to install.  On the other hand, when I install
Linux on several machines at once, I make certain the disks contain
only packages which I wish to install on all machines, and I answer
@samp{n} at this point.  If you are confident that only desirable
packages will be installed, and that you have enough disk space to
hold them, answer @samp{y}, then drink some tea while the packages are
installed.  At this juncture you may see all, some, or none
of the following dialogue, depending on the options you have chosen
before this point:

@example
If you wish, you may install other parts of MCC interim Linux
from a directory on another machine, remotely mounted using NFS,
or from a currently available directory mounted in some other way.
This will only work if you have mounted the remote directory
If the directory is not accessible now, do you wish to quit? (Y or N): n
Do you wish to install from a currently mounted directory? (Y or N): y
/dev/hda1 is mounted on /mnt.  In which directory are the packages found?
/mnt/mcc
@end example

After you reach this point, packages from the selected directory or
floppy are installed.  The messages which appear are much like those
for the @i{Base} package on the boot floppy, and include the following
information:

@example
Base contains basic text and binary files, with formatted man pages.
Bison contains the GNU yacc-compatible parser generator.
Elisp contains lisp files for GNU emacs 19.15.
Emacs contains GNU emacs 19.15, except for lisp files.
Flex contains the GNU clone of lex, the lexical analyser generator.
Gawk contains the GNU version of the awk programming language.
Gcca contains executables, include files, and man pages for gcc 2.4.5.
Gccb contains libraries for gcc, release 2.4.5.
Gdb contains the GNU debugger.
Gpp contains the GNU C++ compiler, release 2.4.5, except for those
    files contained in the gcc packages.
Gprof contains the GNU profiler gprof and its associated library files.
Groff contains the GNU clone of the nroff/troff text formatter.
Info contains GNU info, makeinfo, and selected info files.
Kermit contains the Kermit file transfer and serial communications program.
Linux contains the kernel source files for Linux version 0.99-p10+.
Locinf contains extra info files for bison, gcc, texinfo, and gdb.
Manpages contains all unformatted manual pages which are distributed
    formatted as part of MCC interim linux, and a few others.
Patches contains all patches used to compile the binaries included in the
    current MCC interim distribution.
Tar contains the GNU version of tar, the tape archive program.
Tcpip contains networking programs, daemons, and configuration files.
    These will not work unless your kernel was compiled with tcpip.
The kernel in ide has no TCP/IP, NFS, SCSI or xd support.
The kernel in ipide has no SCSI or xd support.
@end example

If you have asked to be prompted, the message is printed before the
prompt, so that you know what you are accepting or rejecting.
During a floppy installation you will also see the following
message from time to time:

@example
You may now remove the floppy disk from the drive.  If you wish
to install from another disk, then put it in the drive and
type 'r' when ready; or type 'q' to stop: _
@end example

If your disks are DOS disks, you should have no other messages at mount
time except @samp{VFS: Disk change detected on device 2/28}, or some such
message, depending on your disk drive.
But if your disks contain @i{minix} or @i{ext2} file systems, you will get
some error messages.  I allowed these to remain, since they might
sometimes contain useful information.

The installation concludes by giving you the opportunity to install
@sc{lilo} either on a floppy or on your hard disk.  If you do not
wish to install @sc{lilo}, you may create a conventional boot floppy
instead.  If you do not create a boot floppy or install @sc{lilo} on
your hard disk, you will not be able to boot your newly installed
system, unless, of course, you use some boot loader which is not
included in the MCC interim distribution.

@node Boot floppy, , Installing packages, Installing
@section Creating a boot floppy

After you install the last of the MCC packages, typing @samp{q} if
necessary to say that you have no more floppies, the installation
procedure allows you to create a boot floppy, using either @sc{lilo}
or your newly installed kernel.  You may also install @sc{lilo} on
your hard disk if you wish, though it is safer to make a boot floppy
first.

@menu
* LILO::          Installing LILO on a floppy or hard disk.
* Conventional::  Making a conventional boot floppy.
@end menu

@node LILO, Conventional, , Boot floppy
@subsection Installing LILO on a floppy or hard disk

@sc{lilo} is Werner Almesberger's utility for booting Linux: it stands
for @i{LInux LOader}.
@cindex LILO
@cindex installing LILO
@pindex lilo
@iftex
@dosubind{cp}{boot floppy}{using LILO}@relax
@end iftex
It is quite versatile.  You can install it in the Master Boot Record
on your hard disk, so that it functions as the primary boot program
when your system boots, or you can install it in any partition on
your hard disk, or on a floppy disk.  @sc{lilo} can allow you to
select from up to 16 possible Linux boot images, or you can boot
another operating system.  It can pass special options to Linux
kernels, such as an instruction to boot in single user mode, or to
mount the root partition in read-only mode.  It can boot a default
option unless you intervene during boot, and it can force you to
choose one of its images interactively.  It can also protect some or all
of your boot options by requiring a password at boot time.

The MCC @i{base} package (not the Base package on the boot disk) installs
@sc{lilo} in the directory @code{/etc/lilo}.
@fiindex @code{etc/lilo}
@fiindex @code{etc/lilo/lilo}
@fiindex @code{lilo}
@fiindex @code{etc/lilo/README}
@fiindex @code{lilo/README}
@fiindex @code{etc/lilo/newinstall}
@fiindex @code{lilo/newinstall}
@fiindex @code{newinstall}
Among the files installed in this directory are a detailed @code{README}
which describes some of the many features of this utility, the command
@samp{/etc/lilo/lilo}, which installs the loader, and the command
@samp{newinstall}, which is a simple utility for installing @sc{lilo}.
The @samp{newinstall} utility is run from the MCC installation
procedure, which asks you the following questions:

@example
LILO can be used to boot Linux from your hard disk.  It
can also give you the choice of booting one or more versions
of Linux or some other operating system.  LILO can install
itself in any partition, or in the Master boot record, or on
a floppy disk, if you wish to be safe.  Would you like to
install LILO now? (Y or N): y

Where should the boot code go?  You may override this later to write a
test floppy before installing LILO on the hard disk.  Possible choices
include /dev/hda (the master boot record on your first hard disk),
/dev/hda3 (the partition you are installing Linux on),
or /dev/fd0 (floppy disk 0, DOS floppy A:).
Give me the name of a block device.  The default is /dev/hda: 
@end example

The default at this point is chosen by taking the name of your root
partition (for example, @samp{/dev/hda3}), removing the end of its
name (leaving @samp{/dev/hd}), and adding @samp{a} (thus producing
@samp{/dev/hda} in this case).  I recommend accepting this default.

At this point, @sc{lilo} needs to construct a `database' of bootable
images and systems.
@fiindex @code{etc/lilo/config}
@fiindex @code{lilo/config}
This information is saved in the file @code{/etc/lilo/config}, which
tells the @sc{lilo} installer what to install, where, and how.
Initially this file contains no systems or images; you must add
each one which you wish @sc{lilo} to be able to boot, including the
system you have just installed.

@example
LILO will boot by default the first system you specify.
Others must be selected by taking special action at boot time.
Is the first system you wish to add a version of Linux or not?
Answer 'n' for other operating systems or 'q' to quit:  (Y, N, or Q): y
The default Linux image in this installation is /etc/Image.
Press <RETURN> if you are using this image, or if you have a
different image somewhere else which is currently mounted,
give its pathname: 

What would you like to call this option?  The default is 'linux'.
Remember, you may not give the same name to two options: 

Is the next system you wish to add a version of Linux or not?
Answer 'n' for other operating systems or 'q' to install:  (Y, N, or Q): n

In what partition does this other system live?  Press <RETURN> if
you do not wish to add this option.  Otherwise give an answer
like /dev/hda1: /dev/hda1

What is the name of the device where this partition lives?
I want the block device which is the whole of the disk.
Press <RETURN> to accept the default /dev/hda, or 'q' to give up: 

What would you like to call this option?  The default is 'dos'.
Remember, you may not give the same name to two options: 

Is the next system you wish to add a version of Linux or not?
Answer 'n' for other operating systems or 'q' to install:  (Y, N, or Q): q
@end example

This little loop repeats, expecting the answer @samp{y} for a Linux
image, @samp{n} for another operating system, and @samp{q} when you
have no more options to add.  You must be careful not to give the
same name to two options.
@fiindex @code{etc/Image}
@fiindex @code{Image}
@fiindex @code{etc/Image.old}
@fiindex @code{Image.old}
The file @code{/etc/Image} is installed by the MCC boot floppy.
When your list is finished, and if you have not added an option named
@samp{linux.old}, @samp{newinstall} inserts such an option to boot an old
kernel named @code{/etc/Image.old} if it exists when @sc{lilo} is installed.
@fiindex @code{usr/src/linux-mcc/install}
@fiindex @code{linux-mcc/install}
The MCC optional kernel packages
produce such a file, and the script @samp{/usr/src/linux-mcc/install}
produces such a file whenever you compile a new kernel.

@example
Now where would you like to install LILO at this time?  You may put
it on /dev/fd0 to be safe; be sure you have a formatted floppy disk
in this drive NOW, and that it is a device you can boot from, not
your DOS B: drive.  Or you may install it in /dev/hda.
Give me the name of a block device.  The default is /dev/fd0: /dev/fd0
Added linux
Added dos
Added linux.old

This release of MCC interim Linux has now been installed.
You may now login as root or as user.
@end example

This installation of @sc{lilo} may fail if you have an odd disk, whose
geometry @sc{lilo} is unable to determine when it is run.
@fiindex @code{etc/lilo/disktab}
@fiindex @code{lilo/disktab}
@fiindex @code{disktab}
In that case, you can log in, edit the file @code{/etc/lilo/disktab}
to insert the correct geometry for your disk, then give the command
@samp{/etc/lilo/newinstall} to try again.

The boot floppy produced at this point will allow you to test whether
@sc{lilo} works properly before you attempt to install it on your
hard disk.
After rebooting from the test floppy, log in as root and give the
command @samp{/etc/lilo/install} to place @sc{lilo} in its permanent
home.

If you do install @sc{lilo} on your hard disk, and for some
reason it fails, or you simply wish to remove it, your original Master
Boot Record is saved in the file @code{/etc/lilo/boot.xxxx}, where
@samp{xxxx} is a hexadecimal number based on the drive number.
@fiindex @code{etc/lilo/boot.}xxxx
@fiindex @code{lilo/boot.}xxxx
@fiindex @code{boot.}xxxx
@cindex removing LILO
@iftex
@dosubind{cp}{LILO}{removing from hard disk}@relax
@end iftex
You can restore this with the command @samp{dd if=/etc/lilo/boot.0300
of=/dev/hda}, using the appropriate names for your system.
You should be very careful: the saved Master Boot Record restores
everything to its original state, including the first four partitions
described in the primary boot sector.

@node Conventional, , LILO, Boot floppy
@subsection Making a conventional boot floppy

If you do not install @sc{lilo} after installing the MCC packages,
you are asked whether you wish to make a conventional boot floppy.
@cindex conventional boot floppy
@iftex
@dosubind{cp}{boot floppy}{conventional}@relax
@end iftex

@example
You can now make a conventional boot floppy which will boot
your newly installed Linux system.  To do this, you must put a
formatted high density diskette into your A drive and answer 'y'.
If you wish to do this now, answer 'y'. (Y or N): _
@end example

If you answer @samp{y}, this simply copies your kernel to the
floppy in drive 0 using the command

@example
/bin/dd if=/etc/Image of=/dev/fd0 bs=3072
@end example

The resulting disk should boot under any circumstances.  Thus, if
you cannot get @sc{lilo} to work, or if you prefer not to use it,
you have a way of rebooting your system without messing about with
the partition tables.  This should not really be necessary.  There
are very few known problems with @sc{lilo} other than the need to
put correct parameters in @code{/etc/lilo/disktab} for a few
awkward disks.

@node Recovering, Adapting, Installing, Top
@chapter Recovering from Fatal Disasters

You can use the MCC boot floppy to recover from fatal disasters.
@fiindex @code{etc/init}
@fiindex @code{init}
@cindex recovering from disasters
What kind of disaster requires such measures?  Sometimes people
accidentally do things which make the system unbootable.  For example,
they may edit or delete one of the configuration files in @code{/etc},
or they may delete a fundamental utility, like @code{/etc/init} or
one of the shared libraries in @code{/lib}.

In many of these cases, the system will still boot in single user mode.
@cindex single user mode
To do this you must have installed @sc{lilo} as your boot loader,
even if it is installed in a file system partition and is called
by another boot loader, such as the DOS or OS/2 loaders.
When @sc{lilo} boots, you must force it to prompt you.  No special action
is necessary if you put the @samp{prompt} command instead of the
@samp{delay} command in @code{/etc/lilo/config}; this forces a prompt
in all cases.

To force @sc{lilo} to prompt, you must perform one of the following actions:
@cindex force LILO to prompt
@iftex
@dosubind{cp}{LILO}{forcing boot prompt}@relax
@end iftex

@itemize @minus
@item Hold the @samp{SHIFT} key down at boot time.
@item Hold the @samp{CTRL} key down at boot time.
@item Hold the @samp{ALT} key down at boot time.
@item Set the @samp{CAPS LOCK} key on at boot time.
@item Set the @samp{SCROLL LOCK} key on at boot time.
@end itemize

When the prompt @samp{boot:} appears, you must type the name of your
default kernel followed by the word @samp{single}; for example,

@example
boot: linux single
@end example

If you don't remember the name of your kernel, press the @samp{TAB} key.
This causes a list of the available options to be displayed.

In very serious cases, when you cannot boot in single user mode,
you may use the MCC boot floppy to recover.
@fiindex @code{bin/sh}
@fiindex @code{sh}
@iftex
@dosubind{cp}{disaster recovery}{using MCC boot floppy}@relax
@end iftex
Simply boot from the floppy in read-only mode, pressing @samp{<RETURN>}
at the @sc{lilo} prompt.  If the file @code{/bin/sh} is intact on your
hard disk, you can choose @samp{e} from the menu, and this will start
a shell after mounting the various partitions.  At this point, most of
the editors and other utilities should work correctly.  The commands
@samp{mount} and @samp{umount} do not work at all.  Repair the damage,
then reboot the system.  Do not use @samp{halt}, @samp{reboot}, or
@samp{shutdown} to reboot; type @samp{CTRL-D} or @samp{exit}.

In the very worst possible case, for example when @code{/bin/sh} has been
deleted, you can re-install Linux from the boot floppy.
@fiindex @code{backupdirs}
@fiindex @code{etc/passwd}
@fiindex @code{passwd}
@fiindex @code{etc/syslogd}
@fiindex @code{syslogd}
@cindex upgrading MCC interim Linux
As with all MCC upgrades, this creates a special directory named
@code{/backupdirs}, in which your existing configuration files are
saved; for example, @code{/etc/passwd} is moved to
@code{/backupdirs/etc/passwd}.  It is not possible --- or desirable ---
to leave such files if they exist, since the newly installed system
might not boot.  The file @code{/etc/syslogd} is also moved to the
@code{/backupdirs} directory when you install the @i{Base} package from
the boot floppy.  You will need to run @sc{lilo} again before rebooting.
Use the command

@example
ROOT=/root;/etc/lilo/lilo
@end example

If you recompile your kernel, or if you use one of the smaller MCC
kernels, you may wish to customise the MCC boot floppy.  Assuming
that you have your kernel in @code{/etc/Image} and the matching
data file @code{/etc/psdatabase}, mount a `standard' MCC boot floppy
in write mode from drive 0 on @code{/mnt}.  Then give these commands:

@example
cp -p /etc/Image /mnt/etc/Image
tar cf - /etc/psdatabase|gzip -9 >/mnt/psdata.tgz
/etc/lilo/lilo -C /mnt/etc/config.lilo
umount /mnt
@end example

This should produce a recovery system that will boot your own kernel
(so that the @samp{ps} commands all work) and reinstall your own
kernel if you install Linux from the floppy.

@node Adapting, Using, Recovering, Top
@chapter Tailoring MCC Interim Linux to Your Taste

There are several changes which you might make to your newly
installed Linux system, whether to make it run better on your machine,
or to adapt it to suit your personal taste.  Some of these changes
are discussed in the following sections of this document.

@menu
* Kernel::          Recompiling the kernel.
* Ethernet cards::  Setting up Ethernet cards.
* Tcpip::           Configuring the tcpip package.
* Configuration::   Editing the system configuration files.
@end menu

@node Kernel, Ethernet cards, , Adapting
@section Recompiling the kernel

There are many good reasons why you might wish, or even need,
to recompile the kernel.
@cindex recompiling the kernel
@iftex
@dosubind{cp}{kernel}{recompiling}@relax
@end iftex
You may wish to remove or include drivers or file systems, to add
some of the available patches,
to remove features you may not need, such as maths coprocessor emulation,
or to add support for more than 16 Mb of @sc{ram}.

To recompile the kernel, you should install the @i{gcc} and @i{linux} packages
from the MCC distribution.
Then @samp{cd} to @code{/usr/src/linux-mcc}.
Edit the Makefile to choose the default @sc{svga} mode, etc,
as described in the @code{README} file in that directory.  Then type

@example
make config
make dep
make
./install
@end example

The last command installs the newly compiled kernel in /etc and uses
@sc{lilo} to prepare to boot from it.
@fiindex @code{usr/src/linux-mcc/install}
@fiindex @code{linux-mcc/install}
@fiindex @code{etc/Image.old}
@fiindex @code{Image.old}
@pindex psupdate
Reboot, login as root, and type the command
@samp{psupdate} immediately.  This changes the file @code{/etc/psdatabase}
so that the @samp{ps} commands work with the new kernel.  The @samp{install}
script also saves the old @code{/etc/Image} as @code{/etc/Image.old}.
This should allow you to boot using @sc{lilo} with the option
@samp{linux.old} if you have any difficulty booting with the new kernel.

@strong{Note}: Several people have commented on the fact that this release
puts the include files in @code{/usr/include/asm} and
@code{/usr/include/linux} in the directory @code{/usr/include} rather than
in @code{/usr/src/linux(-mcc)}.
@fiindex @code{usr/include/asm}
@fiindex @code{include/asm}
@fiindex @code{usr/include/linux}
@fiindex @code{include/linux}
This is actually more convenient if you are not recompiling the kernel
repeatedly.  It means that (1) the C compiler works without installing the
kernel sources, and (2) it continues to work after you delete the kernel
sources.  Nevertheless, if you are doing a lot of work with different
kernels, you may find it more convenient to move these two directories
and their contents to @code{/usr/src/linux/include}, and put symbolic links
to them in the @code{/usr/include} directory:

@example
mkdir -p -m 755 /usr/src/linux /usr/src/linux/include
(cd /usr/include;tar cf - asm include)|(cd /usr/src/linux/include; \
 tar xvfp -)
rm -rf /usr/include/asm /usr/include/linux
ln -s /usr/src/linux/include/* /usr/include
@end example

@node Ethernet cards, Tcpip, Kernel, Adapting
@section Setting up Ethernet cards

The `standard' kernel as distributed by Linus Torvalds currently contains
support only for the 3c503, DE-600, HP-LAN, NE2000,
and Western Digital 8003 and 8013 Ethernet cards.
@cindex Ethernet cards
@cindex @code{WD8003}
@cindex @code{WD8013}
@pindex EZSETUP
@pindex wdsetup
Western Digital cards should be installed with the two jumpers set to
@samp{soft}.
It is a good idea to have the DOS program @samp{EZSETUP} to hand,
so that you can configure the card that way in case @samp{wdsetup}
doesn't work.  The manual page for @samp{wdsetup} is installed
as part of the @i{tcpip} package, and contains more information about
this program.

Login as root, then @samp{cd /etc/inet}.  You should configure the card
before starting the networking software; otherwise you must
(after issuing @samp{shutdown -h}, of course)
press the @samp{RESET} button or switch the power off and on
before the changes take effect.  Give the command

@example
./wdsetup -a 280
@end example

to set the card's address to an appropriate value.
If this doesn't work, you need to read the file @code{README.wdsetup}
for more information.

Besides changing the cards themselves, the new net-2 software allows
you to configure the drivers in the kernel to work with your card.
@cindex @code{3c503}
@cindex @code{HP-LAN}
@cindex @code{NE2000}
@cindex @code{DE-600}
@pindex ifsetup
@pindex iflink
You need to do this only if the kernel fails to recognise your ethernet
card at boot time, and writes the message `No ethernet device found' on
your screen and in the file @code{/usr/adm/messages}.
In this case, after running @samp{/etc/install.net}, read the manpages
for the commands @samp{ifsetup} and @samp{iflink}.
As I understand it, you will need to use @samp{ifsetup} to reconfigure
the driver, and then user @samp{iflink} to link the driver to
@code{/dev/inet}.  Unfortunately, the net-2 @sc{faq} contains
no information about these commands, and I do not find the man pages
clear.  Once you determine the correct form of these commands for your
machine, edit @code{/etc/rc.net} and insert them where the note about
@samp{ifsetup} appears.

@node Tcpip, Configuration, Ethernet cards, Adapting
@section Configuring the @i{tcpip} package

The TCP/IP programs included in this release of MCC interim Linux will
not work unless you use a version of the kernel which includes TCP/IP
and, if you wish, @sc{nfs}.
@cindex configuring TCP/IP
@iftex
@dosubind{cp}{TCP/IP}{configuring}@relax
@end iftex
The default kernel on the boot disk does include
both TCP/IP and @sc{nfs}.  This software should work even if you have no
Ethernet card, though you will need to comment out the last line
beginning with @samp{$CONFIG} in @code{/etc/rc.net}.  In that case,
of course, you cannot contact other machines.

The kernel source supplied, like the compiled kernels, contains
only the Ethernet drivers contained in Linus Torvald's official release
of the kernel.
If you want support for one of the other Ethernet cards, you must get
patches from somewhere else and install them before recompiling the kernel.
A recent version of these patches is available by anonymous ftp from
@code{ftp.mcc.ac.uk} in the directory @code{/pub/linux/newether}.

After installing the @i{tcpip} package, give the command @samp{/etc/install.net}.
@fiindex @code{etc/install.net}
@fiindex @code{install.net}
The following dialogue ensues:

@example
# /etc/install.net
If you really want your hostname to be 'linux', type 'Y'.
Otherwise type your hostname: avl0
HOSTNAME: "avl0"
Enter IP Address for avl0 (aaa.bbb.ccc.ddd): 130.88.201.62
Enter Gateway Address for avl0 (aaa.bbb.ccc.ddd): 130.88.201.250
Enter Domain Name for avl0: mcc.ac.uk
130.88.201.62	avl0.mcc.ac.uk avl0
Name Server for Domain mcc.ac.uk (aaa.bbb.ccc.ddd): 130.88.13.7
You may add more nameservers by editing /etc/resolv.conf
Networking software is now installed.  To start networking,
type '/etc/rc.net'.  This will be done automatically whenever
you reboot your machine.
@end example

Here instead of @samp{avl0} your hostname should appear, and you must
give your own addresses instead of @samp{130.88.x.x}, and your own
domain instead of @samp{mcc.ac.uk}.  Before you try to run any TCP/IP
software, you might need to run @samp{wdsetup} or @code{ifsetup}.
@xref{Ethernet cards, , Setting up Ethernet cards}.

After installing @i{tcpip}, you should edit the file @code{/etc/inetd.conf} to
comment out any services you wish not to allow.
@fiindex @code{etc/inetd.conf}
@fiindex @code{inetd.conf}
To remove a service, insert an initial @samp{#}.  If @samp{inetd} is already
running, you must send it @sc{sighup} or reboot after changing this file;
otherwise the changes have no effect.  Some services,
particularly @code{tftp}, may expose your machine to crackers if you have a
network connection.  Read the man pages and be cautious!

If you have no local domain name server, you may wish to delete the
file @code{/etc/resolv.conf} and to remove @samp{bind} from the file
@code{/etc/host.conf}.
@fiindex @code{etc/resolv.conf}
@fiindex @code{resolv.conf}
@fiindex @code{etc/host.conf}
@fiindex @code{host.conf}

Other networking programs are available from the various Linux
ftp sites.  They should compile and fit into the MCC installation
with little difficulty.  Note that MCC does not use shadow passwords,
so any programs which have the option of shadow password support
must be compiled without it.

@strong{Note}: These programs are compiled from the most recent source I
could find.  I have fixed several bugs, but there may still be more.
The source I actually compiled can be found (with no patches needed) in
the file @code{netsrc23m} in the directory @code{source_files} in the
current MCC interim distribution.

@node Configuration, , Tcpip, Adapting
@section Editing the system configuration files

After installing this version of MCC interim Linux, you may wish to
customise it.
@cindex system configuration files
@cindex configuration files
The following files should probably be edited:

@table @code
@item /etc/rc.local
@fiindex @code{etc/rc.local}
@fiindex @code{rc.local}
This contains the command which sets your host name.
Change @samp{linux} to the actual hostname of your machine.  This
is important if you intend to use TCP/IP.

@item /etc/mtools
@xref{Mtools, , Special commands for DOS floppies and partitions}.

@item /etc/passwd
If you wish to add a new user, edit this file.  The format is
@example
pw_name:pw_passwd:pw_uid:pw_gid:pw_gecos:pw_dir:pw_shell
@end example
@fiindex @code{usr/include/pwd.h}
@fiindex @code{pwd.h}
where the fields have the meanings defined in the file
@code{/usr/include/pwd.h}: user name, encrypted password, user ID number,
group ID number, real name, login directory, login shell.

@item /etc/lilo/config
This contains the command which controls what happens whenever @sc{lilo} is
reinstalled.
@fiindex @code{etc/lilo/config}
@fiindex @code{lilo/config}
You must give the command @samp{/etc/lilo/install} whenever the system file
(@code{/etc/Image} by default) is modified (for example, by the @samp{rdev}
command)
or moved: @sc{lilo} does not use the directory structure to find the file.

@item /etc/lilo/disktab
If you have one of the @sc{scsi} disks for which Linux cannot get the
geometry, you must edit this file before installing @sc{lilo};
otherwise the installation will fail.
@fiindex @code{etc/lilo/disktab}
@fiindex @code{lilo/disktab}
@fiindex @code{disktab}

@item /etc/inetd.conf
Some services for inetd are commented out.
@xref{Tcpip, , Configuring the @i{tcpip} package}.

@item /etc/kbmap
This file contains the key definitions for your keyboard.
@fiindex @code{etc/kbmap}
@fiindex @code{kbmap}
@cindex keyboard maps
@cindex maps, keyboard
By default the British (UK) keyboard map is installed.
The keymap for US keyboards is also supplied by default, and other
available keymaps can be found in the @i{maps} package.
To install any of these, give a command such as
@samp{mv -f /etc/us.map /etc/kbmap} or
@samp{mv -f /maps/dk.map /etc/kbmap} as appropriate.
If your keyboard diverges slightly from the models used to create
these files, you may need to edit @code{/etc/kbmap} slightly.
@end table

No other files should @emph{need} to be changed.

@node Using, Acknowledgments, Adapting, Top
@chapter Using Linux

@menu
* Caring::    Caring for your Linux system.
* Fdisk::     The Linux partition table editor.
* DOS::       The msdos file system.
* Mtools::    Special commands for DOS floppies and partitions.
* Commands::  Commands peculiar to Linux.
@end menu

@node Caring, Fdisk, , Using
@section Caring for your Linux system

Linux is an operating system which must be handled more carefully
than DOS, or at least older versions of DOS.
There are some important facts about Linux which will help you to
have fewer problems and get more out of your system.

Linux has several file systems, but all of the `native' Linux file
systems have one feature in common: they require special care which
a DOS file system does not.
@cindex shutting Linux down
First, information is not written to disk as soon as it becomes available,
but it is flushed at regular intervals (every 30 seconds by default).
This improves performance.  But you must @strong{never} switch off
a PC which is running Linux, since some data
may not get written to disk, and will be lost, and the data describing
the file system may become inconsistent, putting the files in the
system at risk of corruption.

To shut Linux down safely, there are several methods you might use:

@enumerate
@item Give the command @samp{sync} before switching off.
@pindex sync
This forces the system to flush unwritten buffers.  To be a little
safer, give the command twice, and wait for it to finish.

@item Reboot the system either by pressing @samp{CTRL-ALT-DEL}, or
by giving one of the commands @samp{reboot} or @samp{shutdown -r}.
This is better than the @samp{sync} method.

@item Stop the system by giving one of the commands @samp{halt}
or @samp{shutdown -h}.  This is the safest method, but it can only
be done by the user `root'.
@end enumerate

For the same reason, floppy disks may be corrupted if you remove
them from the drive before unmounting them.
@pindex fsck
Should this happen, you can repair them with the command @samp{fsck}.
MCC interim distributions are configured to run @samp{fsck} on all
mounted file systems at boot time, unless you are rebooting after
having given the command @samp{shutdown} with the @samp{-f} option.

There are a few files, system logs and such, which grow without limit.
@fiindex @code{usr/adm}
@fiindex @code{adm}
@fiindex @code{usr/adm/messages}
@fiindex @code{adm/messages}
@fiindex @code{messages}
@fiindex @code{etc/wtmp}
@fiindex @code{wtmp}
The logs in @code{/usr/adm}, particularly the file @code{messages},
are restarted whenever the system is booted, so they should not
cause problems unless you leave the system running for long periods,
or when the file system is nearly full.  But the file @code{/etc/wtmp}
will grow constantly, and you may need to shorten it.  To do this,
log in as root and give the command

@example
> /etc/wtmp
@end example

If you install networking software and connect your machine to the
outside world, you may be exposing yourself to unscrupulous hackers.
@cindex hackers
@pindex passwd
Be careful to set passwords, particularly for the root user, using
the command @samp{passwd}.

The superuser @samp{root} has very great powers, and can easily
damage or delete the entire system.
@cindex root user
@cindex superuser
@pindex chmod
It is a good idea to do most of your work as `user' (or as some
other user name), and to become root only when you need to run
one of the commands which only root can give.  For example, you can
make a file read-only by using the @samp{chmod} command, so that
a simple @samp{rm} command will not delete it, but @samp{rm} does
not normally ask the root user for confirmation before deleting
such a file.

To learn more about Unix systems, get a good book, read it, and
follow some of the advice it gives.

@node Fdisk, DOS, Caring, Using
@section @code{fdisk}: the Linux partition table editor

@code{fdisk} is the Linux partition table editor.
@ifinfo
@pindex fdisk
@cindex partitions
@end ifinfo
@iftex
@dosubind{pg}{@code{fdisk}}{description}@relax
@dosubind{cp}{partitions}{editing with fdisk}@relax
@end iftex
In this section we examine this utility and try to describe it
thoroughly enough so that anyone can use it.

@menu
* Disks::           Disks and how they are described.
* Dividing::        Dividing up your disk.
* Fdisk command::   The @code{fdisk} command.
* Deleting::        Deleting and adding partitions.
* Flags::           Active flags and system types.
* Extra::           Extra commands for experts.
* Warnings::        Warnings for @code{fdisk} users.
@end menu

@node Disks, Dividing, , Fdisk
@subsection Disks and how they are described

A typical disk consists physically of one or more circular objects
called @dfn{platters}, which rotate about a central axis.
@cindex disks
@cindex platters
@cindex heads
Devices called @dfn{heads} move to specified places on the disk surface to
read or write information.  There is usually one head on each side
of every platter, and all these heads are attached to a comb-like
controller arm which moves all of them at the same time, either
closer to the centre of the disk, or closer to the outer edge.

Suppose the arm is in one position, putting an area of the disk
surface within reach of one or another of the heads.
@cindex cylinders
@cindex tracks
This total area, everything that is accessible without moving the arm, is
called a @dfn{cylinder}.  (A cylinder is a barrel-shaped cross section
of a disk, consisting of a circular strip from each side of each
platter.)  The part of a cylinder that one
head can read or write without moving is called a @dfn{track}.

Each track is divided into several pie-shaped slices called
@dfn{sectors}, which are the smallest parts of the disk which can
be read or written at a time.
@cindex sectors
The sectors on one disk are usually all the same size.

In fact, there are not always two heads to
every platter, there are some disks which do not have the same
amount of data in every cylinder, and there may be disks which
do not have the same amount of data in every sector.  These features
are usually hidden on PCs by the controller card or the @sc{bios},
which map the physical geometry of a disk onto a logical geometry,
which is what is actually used to access the disk.

The numbers which describe the @dfn{geometry} of a disk are
@cindex geometry of a disk

@enumerate
@item The number of cylinders it contains.
@item The number of tracks per cylinder, which is the number of heads.
@item The number of sectors per track.
@item The number of bytes per sector.
@end enumerate

These numbers vary from disk to disk, but a typical PC disk might have
about 1000 cylinders, half a dozen heads, and 15 or 20 sectors
per track, with each sector containing 512 bytes or characters;
such a disk contains 40 to 60 megabytes of data.
@cindex double density floppy
@cindex high density floppy
@cindex density
A @dfn{double density}
floppy disk contains 40 cylinders, with 2 heads (2 tracks per cylinder),
and with 9 sectors per track; such a disk contains 360 kilobytes, or
360 * 1024 characters.  A @dfn{high density} 3.5 inch floppy contains
80 cylinders, with 2 heads and 18 sectors per track, or 1.44 megabytes,
or 1440 * 1024 characters.

The exact size of a track or cylinder in bytes varies from one disk
to another.  This @code{fdisk} for Linux deals mainly with cylinders, since
this is the best unit to use when allocating space for partitions.
@cindex block size
It reports partition sizes in @dfn{blocks} of 1024 bytes, or 2 sectors,
since @samp{mkswap} and the various @samp{mkfs} programs require this number.
A block is the smallest amount of space which can be set aside for
a file in the current file systems.

An operating system, such as Linux or DOS or OS/2, may use a disk
in any way that it wishes, but if two operating systems share the
same disk, they must agree on who owns what, or else one will
interfere with the other (that is, by damaging the other's files).
@cindex partitions
@cindex partition tables
A @dfn{partition} is a section of a hard disk which is handled as a unit
by all operating systems which can access the disk.  The standard way
to define partitions (for the moment) is the @dfn{partition table},
a list of information which is stored in parts of the disk that don't
belong to any of the systems using the disk.  The beginning of the
partition table is stored in the disk's primary boot sector, and the
rest is stored in a chain of sectors scattered throughout the disk.

The first sector on the disk is called the @dfn{primary boot block} or
@dfn{primary boot sector} because (1) it comes first, before other,
similar sectors; (2) it tells where the other, similar sectors are
found, so that it is logically `prior' to them; and (3) it usually
contains code which is executed when the system boots up.
@cindex primary boot block
@cindex boot sector
@cindex primary partitions
This
sector contains a table describing at most four partitions.  These
areas are called @dfn{primary partitions}.

The partition table in the primary boot sector may also describe
at most one @dfn{extended partition}.
@cindex extended partitions
@cindex logical partitions
This is a large area of the disk,
usually containing all the space which is not in any primary partition.
Within this space we can set aside other areas which are called
@dfn{logical partitions}, because they look almost exactly like
primary partitions.  In fact, the main difference between them is
that we can boot from primary partitions, while we cannot boot from
logical partitions.  This happens because the address of a primary
partition is in a fixed place, whereas the address of a secondary
partition is not, so we require a more complicated process to
discover it, one which is too difficult for most primary boot programs.

@node Dividing, Fdisk command, Disks, Fdisk
@subsection Dividing up your disk

It is a good idea to plan ahead before you start creating partitions
on your disk.
@cindex changing size of partitions
@cindex resizing DOS partitions
If you set aside a partition for some purpose, it is
not easy to change its size: you must all the data from
the partition, whether to floppies, to another partition, to another
hard disk, or somewhere else; then you must edit the table which
describes this partition, so changing its size; then you must reboot
and initialise the new partition, formatting it, for example,
under DOS, or running @samp{mkfs} under Linux; finally you can copy
all the data back.  It is possible, if you have several partitions,
to copy data back and forth between them while you change their sizes,
but this is a bit risky and time consuming.  It is better to plan ahead
what you will need, since it is hard to change it afterwards.

Many people with large disks and recent versions of DOS have their
entire file system on one large partition.  They usually ask, `Isn't
there any way I can reformat my disk without copying everything off?'
There is no way to do it using standard DOS utilities, and there is
no truly safe way to do it using commercial software, because, if you
make a mistake, you will lose the entire contents of your disk.
If you are going to back up your disk anyway, you might as well
copy the data back safely.  The Linux @sc{faq} contains references to
tools and procedures which will allow you to do this, if you dare.

DOS and Linux both allow you to access several partitions on a
single disk; on DOS these are treated as if they were separate
disks or drives, and under Linux they are treated as different
@dfn{devices}.

You can have up to 64 partitions on a single @sc{ide} disk, or up to
16 partitions on a single @sc{scsi} disk, at least as far as Linux
is concerned; in practice you will rarely want so many.
@cindex maximum number of partitions
The maximum size of a Linux file system on a single
partition depends on the type of file system you use.  Minix file
systems are limited to 64 megabytes.  You may have all of your Linux
files in a single partition, or you may have two, three, or more Linux
file systems.  Similarly you may have one or more DOS partitions.
If you have several small
partitions, you run much less risk of losing all your files if your
disk gets corrupted.  On the other hand, you may run out of space on
a small partition more easily.

Under DOS, you must refer to each partition by a separate drive
letter, but all partitions are automatically accessible.  Under Linux
only the root partition is automatically accessible, but once we mount
another partition, it is indistinguishable from the rest of the file
system.
@fiindex @code{etc/rc}
@fiindex @code{rc}
Disks are usually mounted by a command in one of the system
startup files, @code{/etc/rc}, so you need not worry about having to do
it yourself whenever you boot the system.

Linux requires at least one partition, which is the `root' of the
file system.  You may prefer to have a separate partition for @code{/usr},
which contains most of the executable files, or for @code{/home}, which
contains most of your private files.  You may also wish to set aside
a partition to use for swap space, depending on the amount of memory
your PC has.  You will certainly need swap space if you have less
than 4 Mb of @sc{ram} and wish to compile anything substantial.
You can reserve swap space in a file, but you need a partition big
enough to hold it, and this will probably be less efficient than
having a partition devoted to swap.

The disk space you need for Linux is discussed in
@ref{Space, , Disk space required for Linux files}.

Are you going to boot Linux from the hard disk, or will you boot
from a floppy?  Some boot programs place severe restrictions on where
the boot partition can be.  @sc{lilo} is more relaxed about this, but does
require either the Master Boot Record on your first hard disk, or the
boot record on one of the first four partitions on your first hard disk.

If you have an extended partition with logical partitions in it, you can
have only three primary partitions containing data.

@node Fdisk command, Deleting, Dividing, Fdisk
@subsection The @code{fdisk} command

Every operating system, whether DOS, OS/2, or Linux, should provide
its own utility for editing hard disk partition tables.
@pindex fdisk
At least four
of these utilities have been called @samp{fdisk}, for `Fixed DISK setup
program', where `fixed' means `not removable'.  I believe the first PC
program named @samp{fdisk} came from Microsoft in about 1985; before that time
disks were too small to divide into separate sections.

Every operating system has its own peculiarities.  Normally you should
set up a partition for the use of one operating system by using its own
@samp{fdisk} program.  Do not use the Linux @samp{fdisk} to create partitions
for DOS or for any system other than Linux; otherwise you may have problems.

An @samp{fdisk} program performs two functions: it reports how the disk is
configured, and it changes that configuration by adding or deleting
partitions.  Most @samp{fdisk} programs can also change other information in
partition tables.

This @samp{fdisk} for Linux operates on one hard disk at a time.  If you give
the command

@example
fdisk
@end example

it reports on, and is able to change, @code{/dev/hda}, the first hard disk.
(If you have no @code{/dev/hda}, @samp{fdisk} uses @code{/dev/sda} as the
default device.)
To look at or change the second hard disk, @code{/dev/hdb}, give the command

@example
fdisk /dev/hdb
@end example

To look at or change the first @sc{scsi} disk, give the command

@example
fdisk /dev/sda
@end example

There are some special forms of the @samp{fdisk} command.  One
of them, suggested by Jim Winstead, simply lists all partitions on
all available disks:

@example
fdisk -l     (where `l' is a letter, not the digit `1')
@end example

The option @samp{-v} is provided to list the current version of the
@samp{fdisk} command.  Finally, there is an option @samp{-s} which
is not really intended for interactive use.  It causes fdisk to
print the size of a partition in blocks of 1024 bytes as follows:

@example
fdisk -s /dev/hda7
39934
@end example

Because this is intended to be used by @samp{mkfs} and @samp{mkswap}
programs, it does not return the size of extended partitions or of
partitions whose system type code is less than 10 (hexadecimal a).
If you start @samp{fdisk} without using one of these special options,
it responds by asking for a command:

@example
Command (m for help): _
@end example

Each @samp{fdisk} command consists of a single letter, which must be followed
by @t{<RETURN>} before it is obeyed.  Upper and lower case are not
distinguished.  Anything you type after the first character is ignored.
Give the command @samp{m}, and you should see this menu:@*

@cartouche
@example
 Command action
    a   toggle a bootable flag
    d   delete a partition
    l   list known partition types
    m   print this menu
    n   add a new partition
    p   print the partition table
    q   quit without saving changes
    t   change a partition's system id
    u   change display/entry units
    v   verify the partition table
    w   write table to disk and exit
    x   extra functionality (experts only)

 Command (m for help): _
@end example
@end cartouche

The simplest commands are Print, Verify, and Quit.  On a small disk, the
Print command might produce a display like this one:

@example
Disk /dev/hda: 5 heads, 17 sectors, 977 cylinders
Units = cylinders of 85 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1   *       1       1     236   10021+   1  DOS 12-bit FAT
/dev/hda2         837     837     977    5992+   5  Extended
/dev/hda3   *     237     237     836   25500   83  Linux native
/dev/hda5         837     837     936    4249+  82  Linux swap
/dev/hda6         942     942     977    1522    1  DOS 12-bit FAT
@end example

There are 5 partitions reported; @code{/dev/hda4} does not appear because it is
not allocated.  Partitions 1 and 3 are flagged as bootable.  The size of
each partition is reported in 1 kilobyte blocks; hence the primary Linux
partition, partition 3, is 25 1/2 megabytes in size.  The @samp{+} after three
of the sizes warns that these partitions contain an odd number of sectors:
Linux normally allocates filespace in 1 kilobyte blocks, so the extra
sector in partition 5 is wasted.  Id numbers are reported in hexadecimal
and explained in English.

The display/entry units may be either cylinders or sectors.  The default
is cylinders, but changing the units makes the print command display
the following table for the system reported above:

@example
Disk /dev/hda: 5 heads, 17 sectors, 977 cylinders
Units = sectors of 1 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1   *       1      17   20059   10021+   1  DOS 12-bit FAT
/dev/hda2       71060   71060   83044    5992+   5  Extended
/dev/hda3   *   20060   20060   71059   25500   83  Linux native
/dev/hda5       71061   71061   79559    4249+  82  Linux swap
/dev/hda6       79985   80001   83044    1522    1  DOS 12-bit FAT
@end example

The start of data in both DOS partitions is 16 sectors after
the beginning of the partition: this is one reason why you should use
DOS's own @samp{FDISK} to create DOS partitions.  Changing the units to
sectors also affects the way in which the new partition command asks
for the beginning and end of a new partition.

@strong{Warning}: it is dangerous
to create a new partition when the display/entry units are sectors.

The Verify command is useful because

@enumerate
@item It warns you if anything is wrong.  @strong{Always} give a Verify
command before writing any changes to disk.

@item It reports how many unallocated sectors there are on the disk.
@end enumerate

The Quit command is also useful.  @samp{fdisk} does not actually change any
data on your disk unless you give a Write command.  If you are unhappy
about any changes you may have made, give the Quit command, and your
disk will remain as it was before you ran @samp{fdisk}.  You can also
interrupt @samp{fdisk} with @samp{CTRL-C}.

@node Deleting, Flags, Fdisk command, Fdisk
@subsection Deleting and adding partitions

Deleting a partition is simple.  Give the Delete command by typing @samp{d}.
@samp{fdisk} asks:

@example
Partition number (1-6): _
@end example

Once you get this far, you must either delete a partition or interrupt the
program with @samp{CTRL-C} (or whatever your current interrupt character is).
Note:

@enumerate
@item  You may delete a nonexistent partition.  You will get a warning
message.
@item  You may delete an extended partition.  This has the side effect
of deleting all partitions greater than or equal to 5.
@item  You may delete a logical partition.  In that case, all partitions
above it are renumbered at once.  For example, if you delete
partition 5, then partition 6 becomes known as partition 5, and
partition 7 as partition 6.
@end enumerate

Adding a partition is just a bit more complicated.  Give the New command
by typing @samp{n}.  @samp{fdisk} allows you to

@enumerate
@item  Create a primary partition, if there is a free slot in the
primary partition table.
@item  Create an extended partition if there is a free slot in the
primary partition table, and if there is no extended partition.
@item  Create a logical partition if an extended partition exists.
@end enumerate

If more than one of these actions is possible, you will be asked to
select Primary, Extended, or Logical, depending on what is currently
permissible.  Before you create a primary or an extended partition,
you are asked what slot it is to have in the table (1--4).

You may not add a primary or an extended partition if the selected slot
in the primary partition table is already occupied: in that case you
simply return to the main menu.  You are not allowed to add a new
primary partition unless there are sectors available outside the
extended partition.  You are not allowed to add a new logical partition
unless there are sectors available inside the extended partition.

If space is available, you are prompted for the first cylinder:

@example
First sector (237-977): _
@end example

The limits are the lowest and the highest cylinders in which sectors
are available in the appropriate part of the disk.  Not all numbers in
this range are necessarily available: they may fall inside an existing
partition.  If you select a cylinder which is already in use, you are
told off and prompted again for the first cylinder.  After selecting the
first cylinder, you are prompted again:

@example
Last cylinder or +size or +sizeM or +sizeK (237-836): _
@end example

The limits are the cylinder you have chosen as the first cylinder, and the
highest cylinder which contains a legitimate upper boundary for the new
partition.  In other words, all numbers in the given range are legitimate,
unlike those in the first range of cylinders.  You may also specify the
size of a partition in megabytes, kilobytes, or in the current units
(cylinders or sectors).  A plus sign @samp{+} indicates that your answer is
a size rather than a boundary, and the suffix @samp{m} or @samp{k} (upper or lower
case) indicates that the size is not given in units of sectors or
cyliners, but in megabytes or kilobytes respectively.  Thus possible
answers to the last cylinder request above are

@table @r
@item 700
Make cylinder 700 the last cylinder in the partition.
@item +300
Make cylinder 537 the last cylinder in the partition.
@item +15m
Make the partition at least 15 megabytes in size.
@item +12500k
Make the partition at least 12,500 kilobytes in size.
@end table

If you specify a size which is too large or an end which is out of
range, the prompt is simply repeated.

Adding or deleting partitions has no effect unless you subsequently
give the Write command.  Please remember to give the Verify command
first, just before giving the Write command: this is a safety
precaution.  After giving the Write command, you will see this
message:

@example
Calling BLKRRPART ioctl() to re-read partition table.
Syncing disks.
Reboot your system to ensure partition table is updated.
@end example

Here are some important things to note:

@enumerate
@item  Before you reboot, you @emph{may} run @samp{fdisk} again, either to
manage another disk, or to make additional changes to the same disk, or just
to check that the changes have been made as you expected.

@item  It is not a good idea to run any of the programs @samp{mkfs},
@samp{mkswap}, @samp{mount}, or @samp{swapon} before you reboot.  It is
dangerous to run any programs, but these in particular may cause serious
damage to any data on your disk, including the partition tables themselves.
@end enumerate

@node Flags, Extra, Deleting, Fdisk
@subsection Active flags and system types

The active flag is a bit in the partition table entry which marks a
partition as bootable.
@cindex active flag
@cindex bootable partitions
This is important to some primary boot sector
programs, which will not boot from an unflagged partition.  Other such
programs do not allow more than one partition to be flagged.  Some,
like @sc{lilo}, ignore the flags completely.  I prefer to flag all bootable
partitions as active so that they stand out on the menu which @samp{fdisk}
lists.  Fdisk prints a star after the name of a partition's device file
if its active flag is set.

The Active command changes, or toggles, a partition's active flag.
Give the Active command, and select a partition by number.
If it was marked inactive, it will be flagged as active; if it was flagged
as active, it will be marked inactive.  You may set the active flag on an
extended or logical partition, though the meaning of such a flag is by no
means clear.  This can be used to install @sc{lilo} as a secondary boot
loader to boot a Linux which lives on a second hard disk.

The Type command changes the ID number which describes what type
a partition is.  @samp{fdisk} currently recognises 30 system IDs, in the
sense that it prints a string for each of them, but it allows you
to change any system ID to any other, with the following exceptions:
you may not change any partition to or from the type Extended, and
you may not change a partition whose type is Empty (0) to any other
type.  You may, however, change the type of any data partition to
0, which is equivalent to deleting it.

The new system ID or type code is a hexadecimal number.
@cindex partition ID codes
There are two ways of listing the numbers which @samp{fdisk} recognises:
use the List command, which prints the list, or use the Type command, which,
when it prompts you for the code, says

@example
Hex code (type L to list codes): _
@end example

where the upper case @samp{L} is used for clarity.  The codes printed are:@*

@iftex
@tex
\halign{\hskip1cm\hfil\tt#&\quad#\hfil&\quad\hfil\tt#&\quad#\hfil
 &\quad\hfil\tt#&\quad#\hfil&\quad\hfil\tt#&\quad#\hfil\cr
1&DOS 12-bit FAT & 9&AIX bootable&80&Old MINIX   &c7&Syrinx\cr
2&XENIX root     & a&OPUS        &81&Linux/MINIX &db&CP/M\cr
3&XENIX usr      &40&Venix 80286 &82&Linux swap  &e1&DOS access\cr
4&DOS 16-bit $<$32M&51&Novell?   &83&Linux native&e3&DOS R/O\cr
5&Extended       &52&Microport   &93&Amoeba      &f2&DOS secondary\cr
6&DOS 16-bit $>=$32M&63&GNU HURD &94&Amoeba BBT  &ff&BBT\cr
7&OS/2 HPFS      &64&Novell      &b7&BSDI fs\cr
8&AIX            &75&PC/IX       &b8&BSDI swap\cr
}
@end tex
@end iftex

Some of these numbers are a trifle uncertain.  By default
@samp{fdisk} uses a type of 83.  It used to use 81, the type code
used by the @sc{minix} @samp{fdisk}.
It seemed prudent to change the default since (a) many Linux `minix'
file systems are no longer compatible with MINIX, (b) the @i{ext2}
file system, a native Linux file system, is fairly stable, as is the
Xia file system, and (c) the number 81 causes problems with @sc{dr-dos}.
Linux does not usually care what values you use for type codes, but
other systems, in particular DOS, OS/2, and @sc{dr-dos}, may.

The value of 82 for Linux swap partitions is my own invention, and
is intended to give some recognisable distinction to the partitions
when the values are displayed in hexadecimal.

New active flags and new system type codes are not written to the
disk until you exit from @samp{fdisk} with the Write command, as described
above, in the section on deleting and adding partitions.

@node Extra, Warnings, Flags, Fdisk
@subsection Extra commands for experts

The eXtra command @samp{x} puts @samp{fdisk} into `expert' mode, in which a
slightly different set of commands is available.  The Active, Delete,
List, New, Type, Verify, and `eXpert' commands are not available in
expert mode.  The commands Write and Quit are available as in
ordinary mode, the Print command is available, but produces output
in a slightly different format, and of course the Menu command prints
the expert menu.  There are several new commands.

@enumerate
@item  The Return command brings you back to the main menu.

@item  The Extended command prints the list of table entries which
point to other tables.  Ordinary users do not need this
information.  The data is shown as it is stored.  The same
format is used for the expert Print command.

@item  The dangerous Begin command allows you to move the start of
data in a partition away from its beginning.  Other systems
create partitions with this format, and it is sometimes useful
to be able to reproduce it.

@item  The slightly dangerous Cylinders command allows you to change
the available number of cylinders.  For @sc{scsi} disk owners, note
that we require not the actual number of physical cylinders, but the
number of logical cylinders used by DOS and other operating systems.

@item  The extremely dangerous Heads and Sectors commands allow you
to change the number of heads and sectors.  It should not be
necessary to use these commands unless you have a @sc{scsi} disk,
whose geometry Linux is not always able to determine.
@sc{scsi} disk owners note that we need not the actual number of
heads or of sectors per track, but the number believed to
exist by DOS and other operating systems.
@strong{Warning}: If you set either of these numbers to a bad value,
you may lose all data on your disk.
@end enumerate

Always, after giving any of the commands Begin, Cylinder, Heads, or
Sectors, you should Return to the main menu and give the Verify
command.

@node Warnings, , Extra, Fdisk
@subsection Warnings for @code{fdisk} users

In general, you should not use this @samp{fdisk} program to create
partitions for other operating systems, only for Linux.
Nor should you use @samp{fdisk} commands from other operating systems
do create partitions for Linux.

@sc{dr-dos} 5.0 and 6.0 are reported to have difficulties with partition
ID codes of 80 or more.
The Linux @samp{fdisk} used to set the system type of new partitions
to hexadecimal 81.
@sc{dr-dos} seems to confuse this with hexadecimal 1, a DOS code.
The values 82 for swap and 83 for file systems should not cause problems
with @sc{dr-dos}.  If they do, you may use the
@samp{fdisk} command @samp{t} to change the system code of any Linux
partitions to some number less than hexadecimal 80; I suggest 42 and 43 for
the moment.

Partitioning a hard disk may destroy data which is on that disk
if you are not careful.  Go slowly, write down a description of
what you started with, and always verify before you write.

Most operating systems and utilities expect that all partitions end
at cylinder boundaries.  This version of @samp{fdisk} does so by default,
but you can use it to create partitions which begin or end anywhere.
This does not normally affect Linux, but it is very dangerous, as
other operating systems (including DOS) may try to `correct' the partition
boundaries.

It is dangerous
to create a new partition when the display/entry units are sectors.

The Verify command warns you if anything is wrong.  @strong{Always} give a
Verify command before writing any changes to disk.

If you set the disk geometry (tracks per cylinder, or sectors
per track) to an incorrect value, you may lose all data on your disk.

@node DOS, Mtools, Fdisk, Using
@section The @i{msdos} file system

The @i{msdos} file system provides the most convenient way of accessing
DOS floppies and hard disk partitions from Linux.
@cindex msdos file system
@iftex
@dosubind{cp}{file system}{msdos}@relax
@end iftex
@pindex mount
It allows you to mount a DOS disk or partition as part of the Linux
directory tree, using the command

@example
mount -t msdos @emph{options device directory}
@end example

Here is a particular example of a @samp{mount} command:

@example
mount -t msdos -o ro,uid=100,umask=027,conv=text /dev/hda1 /mnt
@end example

There are some special options to the @samp{mount} command
which apply to the @i{msdos} file system, and which are not included
in the man page for @samp{mount}.  Among these are the following:

@table @code
@item uid=nnn
When an @i{msdos} file system is mounted, its files and directories have
no `owner' as Linux understands it, so they are given, by default,
the owner `root'.  If you wish to access these systems from another
user name, it is convenient to pretend that another user owns
everything in the mounted system.  To do this, use @samp{uid=nnn},
where @samp{nnn} is the user's ID number from @code{/etc/passwd}.

@item umask=nnn
When an @i{msdos} file system is mounted, its files have only the `write'
permission (if they are not read-only files), and its directories
have no permissions at all.  Permissions are set on the files and
directories using the mounter's @samp{umask}.  To change this, you may
set the permissions by specifying an explicit @samp{umask} on the
@samp{mount} command line.

@item conv=@emph{conversion}
DOS text files and Unix text files have different conventions for
terminating lines.  By default, @i{msdos} file systems are mounted in
such a way that no conversion is done.  This may be inconvenient
if you are editing files on a DOS partition.  The option @samp{conv=t}
or @samp{conv=text} converts all line terminators when files are
read from or written to the mounted DOS file system.  This may
lead to corruption of binary files.  A safer (but still risky) option
is @samp{conv=a} or @samp{conv=auto}, which tries to guess whether
a file is a text file or a binary from its extension.
@end table

@node Mtools, Commands, DOS, Using
@section  Special commands for DOS floppies and partitions

Mtools is a public domain collection of programs to allow Unix systems
to read, write, and manipulate files on a DOS file system.
@cindex @code{mtools}
The DOS file system itself is usually a more convenient way to access
DOS file systems, but mtools provides the ability to format and label
DOS partitions, and they can allow non-root users to access floppy
disks if you change the permissions on the @samp{/dev/fd*} files.

@iftex
The following DOS commands are emulated:@*

@catcode `#=6
@def@pitem#1{@doind{pg}{@code{#1}}@code{#1}}
@catcode`@#=@other
@tex
\halign{\hskip1cm\pitem{#}\hfil&\quad\tt#\hfil&\quad#\hfil\cr
mattrib&ATTRIB &change DOS file attribute flags\cr
mcd&CD         &change DOS directory\cr
mcopy&COPY     &copy DOS files to/from Unix\cr
mdel&DEL/ERASE &delete a DOS file\cr
mdir&DIR       &display a DOS directory\cr
mformat&FORMAT &add DOS file system to a low-level format\cr
mlabel&LABEL   &make a DOS volume label\cr
mmd&MD/MKDIR   &make a DOS subdirectory\cr
mrd&RD/RMDIR   &remove a DOS subdirectory\cr
mread&COPY     &low level read (copy) a DOS file to Unix\cr
mren&REN/RENAME&rename an existing DOS file\cr
mtype&TYPE     &display contents of a DOS file\cr
mwrite&COPY    &low level write (copy) a Unix file to DOS\cr
}
@end tex
@end iftex

These commands should not be used on mounted DOS file systems, since
the kernel may not recognise that changes have been made without using
the usual file system interface.

The pattern matching routine more closely resembles Unix than DOS.
For example, @samp{*} matches all DOS files; it is not necessary
to use @samp{*.*}.

The use of wildcards (or the '\' separator) requires the names to be
enclosed in quotes, so that the shell does not expand them.  For example,

@example
mcopy "a:*.c" .
@end example

copies all files on the A: disk with the extension @samp{.C} to the
current Unix directory.  On the other hand,

@example
mcopy *.c a:
@end example

copies all files with the extension @samp{.c} in the current Unix
directory to the A: drive.  This time you @emph{want} the shell
the expand the @samp{*.c}.

The original programs have been modified so that the
device configuration is read at run-time from a file @code{/etc/mtools}.
@fiindex @code{etc/mtools}
@fiindex @code{mtools}
Moreover a check is performed to detect incorrect @sc{fat} type settings.

The configuration file @code{/etc/mtools} defines the mapping of DOS
drives to Unix devices.
An entry in /etc/mtools can have any of the following formats:

@example
@i{drive device
drive device fat
drive device fat cylinders heads sectors
drive device fat cylinders heads sectors offset}
@end example

@i{Drive} is the DOS drive letter, @i{device} is the name of the device on
Unix, @i{fat} is the number of bits a @sc{fat} entry has (either 12 or 16),
@i{cylinders}, @i{heads}, and @i{sectors} describe the disk geometry.
On hard disks, the geometry parameters should all be zero.
@i{Offset} specifies how many bytes should be skipped when accessing
the device. This is necessary when using non-standard disk configurations.

The abbreviated entries are valid only on systems for which mtools can
`guess' the disk parameters by looking at the Unix device name.
If this is not possible, an error message is issued.

Here is a sample configuration file:

@example
# /etc/mtools - mtools device definitions

A /dev/fd0 12 80 2 15	# A: 5.25" HD
A /dev/fd0 12 40 2 9	# A: 5.25"
B /dev/fd1 12 80 2 18	# B: 3.5" HD
B /dev/fd1 12 80 2 9	# B: 3.5"
C /dev/hda1 16 0 0 0	# C: 30 MB HD partition
@end example

A portable entry for floppies can be created by using @samp{0 0 0} for
the disk geometry:

@example
# /etc/mtools - portable mtools device definitions

A /dev/fd0 12 0 0 0	# any A:
B /dev/fd1 12 0 0 0	# any B:
@end example

This has the slight disadvantage that @samp{mformat} refuses to work.

It is important to set the @sc{fat} type right because this parameter can't
be computed reliably from other parameters. Mtools tries to detect
possibly incorrect settings and issues an error message. If this check
should be bypassed, the @sc{fat} type has to be specified as a negative
number; for example:

@example
D /dev/hda2 -16 0 0 0
@end example

Determining the correct @sc{fat} type is critical for hard disks.
Writing to a hard disk with an incorrectly set @sc{fat} type will destroy
vital information. If you're not sure whether you have a 12 or a 16
bit @sc{fat}, you should try reading a text file which is bigger than 8 Kb
with the @samp{mtype} command. You can use the commands @samp{mcd} and
@samp{mdir} to locate such a file. The @sc{fat} type is wrong if @samp{mtype}
outputs data from other files after a while. The first few kilobytes are
always read correctly, whether the @sc{fat} type is good or not.

@node Commands, , Mtools, Using
@section  Commands peculiar to Linux

There are several commands peculiar to Linux, or with features
peculiar to Linux, of which you ought to be aware.
Most of these commands have man pages which give useful information.
After the system is installed, I suggest giving particular attention
to the following commands:

@example
clock(8)      fsck.minix(8)  mkfs.ext2(8)     setfdprm(8)
doshell(8)    fstab(5)       mkfs.minix(8)    setserial(8)
fdformat(8)   halt(8)        mklost+found(8)  shutdown(8)
frag(8)       init(8)        mkswap(8)        swapon(8)
fsck(8)       kbdrate(8)     mount(8)         tune2fs(8)
fsck.ext2(8)  mkfs(8)        rdev(8)          update(8)
@end example

The command for reading about each of these corresponds to

@example
man 5 fstab
@end example

where the @samp{5} is replaced by the appropriate section number
(usually @samp{8} for these commands), and @samp{fstab} is replaced
with the name of the command.  The exception is the command
@samp{mklost+found}, whose man page can be read with the command

@example
man 8 mklost+fou
@end example

in order to comply with the constraints imposed on the current
distribution.

@node Acknowledgments, , Using, Top
@appendix Acknowledgments

@ifinfo
The details in this section are available only in the printed manual.
@end ifinfo

@iftex
The following commands are installed from the boot floppy:@*

@catcode `#=6
@def@pitem#1{@doind{pg}{@code{#1}}@code{#1}}
@catcode`@#=@other
@tex
\halign{\hskip1cm\pitem{#}\hfil&\quad#\hfil&\quad#\hfil\cr
basename&shellutils-1.8&GNU\cr
bash&bash-1.12&GNU\cr
brik&brik-1.55&Rahul Dhesi\cr
cat&textutils-1.6&GNU\cr
chgrp&fileutils-3.6&GNU\cr
chmod&fileutils-3.6&GNU\cr
chown&fileutils-3.6&GNU\cr
clock&utile-1.5&Charles Hedrick\cr
cp&fileutils-3.6&GNU\cr
cpio&cpio-2.2&GNU\cr
ctrlaltdel&utile-1.5&Peter Orbaek\cr
cut&textutils-1.6&GNU\cr
date&shellutils-1.8&GNU\cr
dd&fileutils-3.6&GNU\cr
df&fileutils-3.6&GNU\cr
dir&fileutils-3.6&GNU\cr
dirdump&e2fsprogs-0.3a&Remy Card\cr
doshell&utile-1.5&Jim Wiegand\cr
du&fileutils-3.6&GNU\cr
ed&utilb-1.3&Brian Beattie, et al\cr
egrep&grep-2.0&GNU\cr
env&shellutils-1.8&GNU\cr
expr&shellutils-1.8&GNU\cr
false&shellutils-1.8&GNU\cr
fdisk&fdisk-1.4&A V Le Blanc\cr
fgrep&grep-2.0&GNU\cr
file&file 1.9&Ian F Darwin\cr
find&find-3.8&GNU\cr
frag&utile-1.5&Werner Almesberger\cr
free&procps-0.7&Brian Edmonds\cr
fsck&fsutil-1.7&David Engel\cr
fsck.ext2&e2fsprogs-0.3a&Remy Card\cr
fsck.minix&utile-1.5&Linus Torvalds\cr
fuser&procps-0.7&Werner Almesberger\cr
getty&utile-1.5&W Z Venema\cr
grep&grep-2.0&GNU\cr
gunzip&gzip-1.2.3&GNU\cr
gzip&gzip-1.2.3&GNU\cr
halt&sysvinit-2.4&Miquel van Smoorenburg\cr
head&textutils-1.6&GNU\cr
hostname&netsrc23m&Fred N van Kempen\cr
Image&linux-0.99p8a&Linus Torvalds\cr
init&sysvinit-2.4&Miquel van Smoorenburg\cr
install&fileutils-3.6&GNU\cr
kill&utilb-1.3&Peter MacDonald\cr
killall&procps-0.7&Werner Almesberger\cr
last&sysvinit-2.4&Miquel van Smoorenburg\cr
ldd&utilb-1.3&David Engel\cr
less&less-1.77&GNU\cr
lesskey&less-1.77&GNU\cr
ll&fileutils-3.6&GNU\cr
ln&fileutils-3.6&GNU\cr
login&utilb-1.3&BSD\cr
ls&fileutils-3.6&GNU\cr
lsf&fileutils-3.6&GNU\cr
mesg&sysvinit-2.4&Miquel van Smoorenburg\cr
mkdir&fileutils-3.6&GNU\cr
mkfifo&fileutils-3.6&GNU\cr
mkfs&fsutil-1.7&David Engel\cr
mkfs.ext2&e2fsprogs-0.3a&Remy Card\cr
mkfs.minix&utile-1.5&Linus Torvalds\cr
mklost+found&e2fsprogs-0.3a&Remy Card\cr
mknod&fileutils-3.6&GNU\cr
mkswap&utile-1.5&Linus Torvalds\cr
more&utilb-1.3&BSD\cr
mount&mount-0.99.6&Doug Quale\cr
mv&fileutils-3.6&GNU\cr
newgrp&admutils-1.4&Michael Haardt\cr
passwd&utila-1.5&Peter Orbaek\cr
powerd&sysvinit-2.4&Miquel van Smoorenburg\cr
printenv&shellutils-1.8&GNU\cr
ps&procps-0.7&Branko Lankester\cr
pstree&procps-0.7&Werner Almesberger\cr
psupdate&procps-0.7&Branko Lankester\cr
ramsize&utile-1.5&Werner Almesberger\cr
rdev&utile-1.5&Werner Almesberger\cr
reboot&sysvinit-2.4&Miquel van Smoorenburg\cr
rm&fileutils-3.6&GNU\cr
rmdir&fileutils-3.6&GNU\cr
rootflags&utile-1.5&Werner Almesberger\cr
sed&sed-1.14&GNU\cr
setfdprm&utile-1.5&Werner Almesberger\cr
setserial&setserial-2.02&Rick Sladkey\cr
setterm&utilb-1.3&Gordon Irlam\cr
sh&bash-1.12&GNU\cr
shutdown&sysvinit-2.4&Miquel van Smoorenburg\cr
sort&textutils-1.6&GNU\cr
strings&utila-1.5&BSD\cr
stty&shellutils-1.8&GNU\cr
su&shellutils-1.8&GNU\cr
swapoff&mount-0.99.6&Doug Quale\cr
swapon&mount-0.99.6&Doug Quale\cr
sync&utile-1.5&Linus Torvalds\cr
tail&textutils-1.6&GNU\cr
telinit&sysvinit-2.4&Miquel van Smoorenburg\cr
test&shellutils-1.8&GNU\cr
tload&procps-0.7&Branko Lankester\cr
top&procps-0.7&Branko Lankester, Roger Binns\cr
touch&fileutils-3.6&GNU\cr
true&shellutils-1.8&GNU\cr
tunefs&e2fsprogs-0.3a&Remy Card\cr
umount&mount-0.99.6&Doug Quale\cr
update&utile-1.5&Linus Torvalds\cr
uptime&procps-0.7&Michael K Johnson\cr
utmpdump&sysvinit-2.4&Miquel van Smoorenburg\cr
vdir&fileutils-3.6&GNU\cr
vidmode&utile-1.5&Werner Almesberger\cr
w&procps-0.7&Larry Greenfield\cr
wall&sysvinit-2.4&Miquel van Smoorenburg\cr
who&shellutils-1.8&GNU\cr
write&utilb-1.3&BSD\cr
xargs&find-3.8&GNU\cr
zcat&gzip-1.2.3&GNU\cr
}
@end tex

The following commands are contained in the @i{base} package:@*

@tex
\halign{\hskip1cm\pitem{#}\hfil&\quad#\hfil&\quad#\hfil\cr
apropos&man-1.1&John Eaton\cr
banner&utila-1.5&BSD\cr
cal&utila-1.5&BSD\cr
chsh&utila-1.5&Peter Orbaek\cr
cksum&textutils-1.6&GNU\cr
clear&-&A V Le Blanc\cr
cmp&diffutils-2.3&GNU\cr
col&utila-1.5&BSD\cr
colcrt&utila-1.5&BSD\cr
colrm&utila-1.5&BSD\cr
column&utila-1.5&BSD\cr
comm&textutils-1.6&GNU\cr
compress&compress-4.0.1&Joseph M Orost\cr
csplit&textutils-1.6&GNU\cr
ctags&elvis-1.7&Steve Kirkendall\cr
diff&diffutils-2.3&GNU\cr
diff3&diffutils-2.3&GNU\cr
dirname&shellutils-1.8&GNU\cr
echo&shellutils-1.8&GNU\cr
elvis&elvis-1.7&Steve Kirkendall\cr
elvprsv&elvis-1.7&Steve Kirkendall\cr
elvrec&elvis-1.7&Steve Kirkendall\cr
ex&elvis-1.7&Steve Kirkendall\cr
expand&textutils-1.6&GNU\cr
fdformat&utile-1.5&Werner Almesberger\cr
fmt&elvis-1.7&Steve Kirkendall\cr
fold&textutils-1.6&GNU\cr
groups&shellutils-1.8&GNU\cr
gzexe&gzip-1.2.3&GNU\cr
hexdump&utila-1.5&BSD\cr
id&shellutils-1.8&GNU\cr
joe&joe-0.1.5&Joseph H Allen\cr
join&textutils-1.6&GNU\cr
kbdrate&utile-1.5&Rickard E Faith\cr
lilo&lilo9&Werner Almesberger\cr
locate&find-3.8&GNU\cr
logger&utila-1.5&BSD\cr
logname&shellutils-1.8&GNU\cr
look&utila-1.5&Rickard E Faith\cr
makehole&utile-1.5&H J Lu\cr
makewhatis&-&Rickard E Faith\cr
man&man-1.1&John Eaton\cr
manpath&man-1.1&John Eaton\cr
mattrib&mtools-2.0&Emmet P Gray\cr
mcd&mtools-2.0&Emmet P Gray\cr
mcopy&mtools-2.0&Emmet P Gray\cr
mdel&mtools-2.0&Emmet P Gray\cr
mdir&mtools-2.0&Emmet P Gray\cr
mformat&mtools-2.0&Emmet P Gray\cr
mkmanifest&mtools-2.0&Emmet P Gray\cr
mlabel&mtools-2.0&Emmet P Gray\cr
mmd&mtools-2.0&Emmet P Gray\cr
mrd&mtools-2.0&Emmet P Gray\cr
mread&mtools-2.0&Emmet P Gray\cr
mren&mtools-2.0&Emmet P Gray\cr
mtype&mtools-2.0&Emmet P Gray\cr
mwrite&mtools-2.0&Emmet P Gray\cr
nice&shellutils-1.8&GNU\cr
nl&textutils-1.6&GNU\cr
nohup&shellutils-1.8&GNU\cr
od&textutils-1.6&GNU\cr
paste&textutils-1.6&GNU\cr
patch&patch-2.1&Larry Wall\cr
pathchk&shellutils-1.8&GNU\cr
pr&textutils-1.6&GNU\cr
printf&shellutils-1.8&GNU\cr
ref&elvis-1.7&Steve Kirkendall\cr
script&utila-1.5&BSD\cr
sdiff&diffutils-2.3&GNU\cr
sleep&shellutils-1.8&GNU\cr
split&textutils-1.6&GNU\cr
sum&textutils-1.6&GNU\cr
syslogd&utile-1.5&BSD\cr
tac&textutils-1.6&GNU\cr
tee&shellutils-1.8&GNU\cr
time&time-1.4&GNU\cr
tr&textutils-1.6&GNU\cr
tty&shellutils-1.8&GNU\cr
ul&utila-1.5&BSD\cr
uname&shellutils-1.8&GNU\cr
uncompress&compress-4.0.1&Joseph M Orost\cr
unexpand&textutils-1.6&GNU\cr
uniq&textutils-1.6&GNU\cr
updatedb&find-3.8&GNU\cr
users&-&?\cr
uudecode&utila-1.5&BSD\cr
uuencode&utila-1.5&BSD\cr
vi&elvis-1.7&Steve Kirkendall\cr
virec&elvis-1.7&Steve Kirkendall\cr
wc&textutils-1.6&GNU\cr
whatis&man-1.1&John Eaton\cr
whereis&utila-1.5&BSD\cr
whoami&shellutils-1.8&GNU\cr
yes&shellutils-1.8&GNU\cr
zcmp&gzip-1.2.3&GNU\cr
zdiff&gzip-1.2.3&GNU\cr
zforce&gzip-1.2.3&GNU\cr
zgrep&gzip-1.2.3&GNU\cr
zmore&gzip-1.2.3&GNU\cr
znew&gzip-1.2.3&GNU\cr
}
@end tex

The following commands are contained in the @i{groff} package:@*

@tex
\halign{\hskip1cm\pitem{#}\hfil&\quad#\hfil&\quad#\hfil\cr
addftinfo&groff-1.07&GNU\cr
afmtodit&groff-1.07&GNU\cr
geqn&groff-1.07&GNU\cr
gindxbib&groff-1.07&GNU\cr
glookbib&groff-1.07&GNU\cr
gnroff&groff-1.07&GNU\cr
gpic&groff-1.07&GNU\cr
grefer&groff-1.07&GNU\cr
grodvi&groff-1.07&GNU\cr
groff&groff-1.07&GNU\cr
grog&groff-1.07&GNU\cr
grops&groff-1.07&GNU\cr
grotty&groff-1.07&GNU\cr
gsoelim&groff-1.07&GNU\cr
gtbl&groff-1.07&GNU\cr
gtroff&groff-1.07&GNU\cr
lkbib&groff-1.07&GNU\cr
pfbtops&groff-1.07&GNU\cr
psbb&groff-1.07&GNU\cr
tfmtodit&groff-1.07&GNU\cr
}
@end tex

The following commands are contained in the @i{tcpip} package:@*

@tex
\halign{\hskip1cm\pitem{#}\hfil&\quad#\hfil&\quad#\hfil\cr
finger&netsrc23m&BSD\cr
fingerd&netsrc23m&BSD\cr
ftp&netsrc23m&BSD\cr
ftpd&netsrc23m&BSD\cr
host&netsrc23m&Rutgers\cr
ifconfig&netsrc23m&Fred N van Kempen\cr
iflink&netsrc23m&Fred N van Kempen\cr
ifsetup&netsrc23m&Fred N van Kempen\cr
inetd&netsrc23m&BSD\cr
netstat&netsrc23m&Fred Baumgarten\cr
nslookup&netsrc23m&BSD\cr
nsquery&netsrc23m&BSD\cr
ntalkd&netsrc23m&BSD\cr
ping&netsrc23m&BSD\cr
rcp&netsrc23m&BSD\cr
rlogin&netsrc23m&BSD\cr
rlogind&netsrc23m&BSD\cr
route&netsrc23m&Fred N van Kempen\cr
rsh&netsrc23m&BSD\cr
rshd&netsrc23m&BSD\cr
talk&netsrc23m&BSD\cr
telnet&netsrc23m&David Borman\cr
telnetd&netsrc23m&David Borman\cr
wdsetup&wdsetup-0.6&Gregg Weber\cr
}
@end tex

The following commands are contained in other packages, as indicated:@*

@tex
\halign{\hskip1cm\pitem{#}\hfil&\quad\sl#\hfil&\quad#\hfil
 &\quad#\hfil\cr
ar&gcc&binutils-1.9l&GNU\cr
as&gcc&gas-1.38.1l&GNU\cr
as86&gcc&bin86&Bruce Evans\cr
awk&gawk&gawk-2.15.2&GNU\cr
bison&bison&bison-1.21&GNU\cr
c++&gpp&gcc-2.4.5&GNU\cr
cc&gcc&gcc-2.4.5&GNU\cr
cpp&gcc&gcc-2.4.5&GNU\cr
ctags&emacs&emacs-19.15&R M Stallman\cr
emacs&emacs&emacs-19.15&R M Stallman\cr
emacsclient&emacs&emacs-19.15&R M Stallman\cr
emacsserver&emacs&emacs-19.15&R M Stallman\cr
env&emacs&emacs-19.15&R M Stallman\cr
etags&emacs&emacs-19.15&R M Stallman\cr
flex&flex&flex-2.3.8&Vern Paxson\cr
g++&gpp&gcc-2.4.5&GNU\cr
gawk&gawk&gawk-2.15.2&GNU\cr
gcc&gcc&gcc-2.4.5&GNU\cr
gdb&gdb&gdb-4.9&GNU\cr
gprof&gprof&binutils-1.9l&GNU\cr
hexl&emacs&emacs-19.15&R M Stallman\cr
info&info&texinfo-3.1&GNU\cr
kermit&kermit&ckermit-5a-188&Frank da Cruz\cr
ld&gcc&binutils-1.9l&GNU\cr
ld86&gcc&bin86&Bruce Evans\cr
make&gcc&make-3.67&GNU\cr
make-path&emacs&emacs-19.15&R M Stallman\cr
makeinfo&info&texinfo-3.1&GNU\cr
nm&gcc&binutils-1.9l&GNU\cr
objdump&gcc&binutils-1.9l&GNU\cr
protoize&gcc&gcc-2.4.5&GNU\cr
ranlib&gcc&binutils-1.9l&GNU\cr
size&gcc&binutils-1.9l&GNU\cr
strip&gcc&binutils-1.9l&GNU\cr
tar&tar&tar-1.11.2&GNU\cr
texi2dvi&info&texinfo-3.0&GNU\cr
texindex&info&texinfo-3.0&GNU\cr
timer&emacs&emacs-19.15&R M Stallman\cr
unprotoize&gcc&gcc-2.4.5&GNU\cr
wakeup&emacs&emacs-19.15&R M Stallman\cr
}
@end tex
@end iftex

@node Concept Index, File Index, , Top
@unnumbered Concept Index
@printindex cp

@node File Index, Program Index, Concept Index, Top
@unnumbered File Index
@printindex fi

@node Program Index, , File Index, Top
@unnumbered Program Index

Linux programs appear in lower case, and DOS programs
appear in upper case.

@printindex pg

@contents
@bye
