This book is available for $38.95 which includes:

Call 888-770-4330 (Toll Free in the U.S.) or 707-773-4916

Help Support Continuing Linux Development!


The Debian Linux User's Guide
Dale Scheetz
Linux Press

Linux Press
P. O. Box 220
Penngrove, California 94951
U. S. A.

For information on software, translations, or book distributors in both the U. S. A.
and outside the U. S. A., please write to Linux Press at the above address.

The Debian Linux User's Guide
Copyright (c) 1998 by Dale Scheetz

All rights to the publication and distribution of this book in printed form
are held by Dale Scheetz, with exclusive license of those rights granted to
Linux Press. Any production for resale of this document in hard copy form is
strictly forbidden outside this exclusive license to Linux Press.

Distribution of the print version of this book must be arranged through
Linux Press.

Although distribution of printed copies of this book are restricted,
electronic copies of this book may be distributed freely via any electronic
media. Proper use of the electronic form of this book permits the end user
to make hard copy printouts for personal use only.

ISBN 0-9659575-1-9
Trademark Acknowledgements
All terms mentioned in this book that are known to be trademarks or service marks
have been appropriately capitalized. Linux Press cannot attest to the accuracy of
this information. Use of a term in this book should not be regarded as affecting
the validity of any trademark or service mark.

Apple and Macintosh are registered trademarks of Apple Computer, Inc.
CP/M is a registered trademark of Caldera, Inc.
IBM is a registered trademark of International Business Machines, Inc.
MS is a trademark of Microsoft Corporation.
Windows is a trademark of Microsoft Corporation.

dedicated
to
Linux users everywhere

Second Edition
Author's Notes
Debian 2.0 represents a major integration effort to get the new glibc working with
most of the distribution packages. With the total number of packages in the main
distribution (the totally free software) above 1500, the shear size of the distribution
has made everything more difficult.

The boot floppies have also been heavily reworked, with the install program written
in C. The install menus have not changed much from last release, but the interface
has some subtle differences from previous versions.

There is a new chapter in this edition, called "What Next", which represents a
simple approach to System Administration and discusses the basic system
management tools provided in the Debian distribution, and examples of how to use
them to manage accounts and resources on a Debian system.

Be sure to look at the README.1ST file on the Extras CD-ROM for any last
minute issues that did not make it into the book. As with most software, Debian is
constantly being updated. You may find minor variations, in the book, from the
software included.

Luck,
Dwarf

Table of Contents
1 Introduction
1.1 History
1.2 The Debian Development Team
1.3 What Makes Debian Different?
1.4 How This Book Was Written

2 Installation
2.1 Introduction
2.2 Quick Start
2.3 Floppy Installation
2.3.1 Making Boot Floppies
2.3.2 Creating Floppies With DOS
2.3.3 Using RAWRITE2.EXE
2.3.4 Creating Floppies with Unix/Linux
2.4 Installation From Floppy
2.5 Two Floppies and a CD
2.6 Zero Floppy Installation
2.6.1 What you will need
2.6.2 Getting Started
2.6.3 Installation
2.7 Forcing Hardware Detection
2.7.1 LILO
2.7.2 Loadlin
2.7.3 rdev
2.7.4 Argument Format
2.7.5 Usage
2.8 Bootable CDs
2.9 Installation Via FTP
2.9.1 General
2.9.2 Straight FTP
2.9.3 Installation using dftp
2.9.4 Dselect FTP method
2.9.5 Installation via NFS
2.9.6 Ethernet connected install
2.9.7 PPP connected installation
2.9.8 Boot Managers supporting Multiple Operating Systems

3 dpkg: The Package Management Tool
3.1 Introduction
3.2 Running dpkg
3.3 Options Recognized by dpkg
3.3.1 Installation and Removal Options
3.3.2 Available Packages File Management
3.3.3 Package System Information
3.3.4 Force Options
3.3.5 Miscellaneous Options

4 Dselect
4.1 Introduction
4.2 Using Dselect
4.3 Upgrading with dselect

5 X11 Installation
5.1 Introduction
5.2 Using Dselect

6 Networking with Debian
6.1 Introduction
6.2 Network Installation
6.3 PPP Configuration
6.3.1 Verifying the Connection
6.3.2 Shutting Down the Connection

7 Compiling the Kernel
7.1 Hardware
7.2 Building the Kernel
7.2.1 Non-Debian Kernel Construction
7.2.2 Debian Kernel Construction
7.3 Modules
7.3.1 Advantages
7.3.2 Disadvantage

8 What Next?
8.1 Managing many accounts
8.1.1 Adding a user
8.1.2 Removing a user
8.1.3 Managing passwords
8.2 Managing Root Access
8.2.1 su
8.2.2 sudo
8.3 File Protection by Owner
8.4 File Protection by Group
8.5 Mounting and Unmounting File Systems
8.6 Monitoring System Activity
8.6.1 Process Status
8.6.2 top CPU Processes
8.6.3 fuser: Who has it?
8.6.4 Who is logged on?
8.7 Where is the printer?
8.8 Finding knowledge
8.8.1 Additional info
8.9 Finding packages
8.9.1 Searching the file system

Appendix 1: Common UNIX Commands
Introduction
chgrp
chmod
chown
cp
df
du
ls
mkdir
mv
rm
rmdir

Appendix 2: Text Editors
Introduction
ae
joe
vi
emacs

Appendix 3: The Loop Device
Appendix 4: Multiple OS Installation
Appendix 5: Building Packages Files
Appendix 6: Linux as a Server
Appendix 7: Arguments
Appendix 8: What is Free Software

Index:Index

The author wishes to thank everyone who made a contribution to the
creation of this book.

Primary among them is Linux Press. Without their support and
encouragement the author would not have had the opportunity to walk
this particular path. Without their editorial contributions, this book
would be less than it is.

The continued support from my family during the work on the second
edition has been as wonderful as ever. Even if there were to be no
mention here, their encouragement would not go unnoticed.

Certainly many valuable people will be missing from this list, but most
of them will be included with thanks to all those responsible for the
Debian Distribution. Special thanks go to all those developers who
have spent freely of their own time, for the creation of Debian and its
distribution. Without these fine folks there would be no distribution and
thus no book.


1 Introduction

1.1 History

In late 1993, a college student and computer enthusiast named Ian Murdock was
using SLS, an early distribution of Linux. He liked Linux but found himself
disappointed that SLS had many problems and that, even worse, new releases of it
failed to fix many of them. Convinced that this was mostly due to an overloaded,
overworked maintainer, he decided to adapt the model used in the development of
Linux itself and use it to create a new distribution with a decidedly different
philosophy. He called the new distribution "Debian Linux", and it was to be
developed by a distributed group of volunteers. This group was completely open
and anyone was welcome to get involved.

Ian posted his intentions to the Usenet in August of 1993 and immediately found
outside interest in his idea, including that of the Free Software Foundation, the
creators of much of the core software of all Linux-based systems. Ian credits this
early interest as being pivotal to the acceptance of Debian into the free software
world.
Through the fall and winter of 1993, development of Debian proceeded through
several internal releases, culminating in the public release of Debian 0.91 in
January of 1994. Debian 0.91 gave the world its first glimpse of the Debian
philosophy in action. By this time, a dozen or so people were involved in
development, though Ian was still largely packaging and integrating the releases
himself.

After the first public release of Debian, attention was turned toward developing the
package system called dpkg. A rudimentary dpkg existed in Debian 0.91, but at
that time was mostly used for manipulating packages once they were installed,
rather than as a general packaging utility. By the summer of 1994, early versions of
dpkg were becoming usable, and other people besides Ian began to join in the
packaging and integration process by following guidelines that explained how to
construct packages that were modular and integrated into the system without
causing problems.

By the fall of 1994, an overloaded Ian Murdock, now coordinating the efforts of
dozens of people in addition to his own development work, transferred responsibility
of the package system to Ian Jackson, who proceeded to make many invaluable
enhancements, and shaped it into the current system.

After months of hard work and organization, the Debian Project finally made its first
distributed release in March of 1995, Debian 0.93 Release 5. Debian 0.92 had
never been released, and Release 1 through Release 4 of Debian 0.93 had been
development releases made throughout the fall and winter of 1994.

By this time, the Debian Project, as it had come to be called, had grown to include
over sixty people. In the summer of 1995, Ian Murdock transferred responsibility of
the base system, the core set of Debian packages, to Bruce Perens, giving Ian
time to devote to the management of the growing Project. Work continued
throughout the summer and fall, and a final a. out binary format release, Debian
0.93 Release 6, was made in November of 1995 before attention turned to
converting the system to the ELF binary format.
Ian Murdock left the Debian Project in March of 1996 to devote more time to his
family and to finishing school; Bruce Perens assumed the leadership role, guiding
the Project through the its first ELF release, Debian 1.1, in June 1996.

With the release of 1.1 the project began to snowball and by the time of the release
of Debian 1.2 in December 1996 it had grown to nearly two-hundred volunteers. This
massive growth created management problems for the group.

As a result of the discussions that ensued, several subgroups were formed within
the development group. These smaller teams took on specific issues and by the
release of 1.3 there were teams in place to deal with documentation, publicity,
quality assurance, testing, and most important, the Deity team. Most of these
teams took on the long term tasks that could not be dealt with during one release,
while QA and Testing have specific tasks related to releases. The Deity team has
taken on the task of improving dselect.

On the road to the 2.0 release, Diety got renamed Apt, from discussions aimed at
improving name acceptance. While this product is a long way from what it is finally
expected to be, there are already improvements to dselect from the use of one of
the working Apt Methods. While these tools may not get shipped with 2.0, they are
available on the FTP sites for those who are fearless, and wish to try out the latest
advances.

One of the major developments during the 2.0 release cycle was the replacement of
Bruce Perens as Debian's Leader with Ian Jackson. The completion of the 2.0
release was accomplished under his leadership, together with the construction of a
Debian Constitution, which now awaits ratification by the Debian developers.

From its inception as an idea in the mind of Ian Murdock, this project has grown to
produce a professional, high quality distribution. Given its current size and quality,
Debian can be expected to continue to produce an up-to-date distribution of the
highest quality.


1.2 The Debian Development Team

From its humble beginnings, with a mere hand full of developers, the Debian
Development Team has grown to over 270 active developers and enough additional
help from regular contributors to bring the total list of participants to over 300
people. Most of these people have never met; almost all of the communication
between developers takes place via e-mail and the various mailing lists that the
project supports.

All contributions to the project are completely voluntary, including the many fine
people, businesses, and institutions that contribute hardware to operate those lists
and disk space to store the Archives. What little actual cash is necessary, has in
the past, been paid out of pocket by the person taking care of the issue. There is
now a mechanism for the project to collect donations for such cash necessities.
This volunteer organization, by its very nature, does not lend itself to the
hierarchical structures usually found in development organizations. Control from a
central location is ineffective, at best, and counter productive in many cases. The
reason this process works without those controls stems from the modular package
scheme that was developed so early in the project. This allows an individual
developer to take responsibility for a "known" piece of the distribution.

The combination of mailing lists and bug reporting system provides the only checks
and balances needed to adequately control each individual developer. If developers
have any questions about the proper way to deal with package responsibilities, the
mailing list provides the access to other developers who will gladly assist with
suggestions and comments. If developers generate packages which are poorly
formed, the bug tracking system allows anyone who notices the problem to bring it
to their attention. With the recent rapid growth of the development group, this
system became inadequate for dealing with the problems brought on by that rapid
growth. This need has created multiple small teams within the larger structure,
whose specific task has some narrowly focused agenda. Some of the current
agendas include: Publicity; Documentation; Dselect redesign (Deity); Quality
Assurance; and Testing.

These subgroups operate on the same general principles as the larger group,
usually with their own mailing list and a team leader. These teams have a far better
chance of coming to closure on the issues that they deal with, than the larger
group was ever able to accomplish. Within this loose structure, the driving forces
come from the universal desire of all participants to create an exceptional product
of the highest possible quality. This helps to quell personal agendas and keep
folks focused on the general goals. It is this development model, borrowed from
the Kernel Development Team and modified to suit the needs of this team, that has
allowed Debian to become the powerful distribution that it is today.



1.3 What Makes Debian Different?

As described above, the major difference between the Debian distribution and the
other Linux distributions that are currently available is its open, volunteer,
development model. This is not, however, the only difference between Debian and
others.

The second, most important difference, is Debian's strict adherence to the "Free
Software" ideal. It is quite impressive, when you think about it, that this distribution
is composed of freely redistributable software, complete with source code. Now,
most other distributions also supply source code and these same programs, but
they are also willing to put packages into their distributions that can not be
redistributed under certain conditions, without any concern for the legal problems
that they deliver to their end users. Users of the Debian distribution can be
assured that what they find in that distribution will have no constraints on the free
distribution of that software, leaving them free to build "value added" systems from
this Distribution without fear that they will find themselves in court for misuse of
someone else's intellectual property.

Debian provides areas within the archives for packages that do not meet these rigid
standards, but are desired by the Debian community. Because of its free software
status, the Debian packaging system can be used to package software that does
not meet its own standards for free distribution.
Packages that are not freely distributable are found in the " non-free" section of the
distribution. An additional category, called "contrib" is for those packages that
would otherwise be free, except that they depend on some other package that is
"non-free". In this way, Debian provides a wide variety of software outside the
distribution, in a way that protects its users from the legal ramifications of the
non-free nature of that software.

There are substantial technical issues that separate Debian from the other
distributions available today. Debian is dedicated to a strict interpretation of the
Linux File System Standards, soon to be known as simply the File System
Standards. It is this strict adherence to these technical guidelines that helps make
Debian such a dependably useful system. Foreign packages brought to a Debian
system are typically easier to integrate into the system than with other Linux
distributions.

As important as this standard is, the real technical superiority provided by Debian
is its unique packaging system. This system allows for incremental upgrades of
individual packages without the constant danger of ending up with a broken
system. The modularity of the packaging system keeps each potential disaster
localized within the narrow confines of the offending package. There are still plenty
of ways to break the system, but the packaging system goes a long way toward
protecting the system from such failures. Most of this protection comes from the
dependency checking that is provided by this packaging system. Packages can
declare their dependency on other packages and even declare that dependency to
encompass a particular version of that other package. The installation software
enforces these dependencies in a way that allows the dependencies to be
satisfied, yielding a functional package at the end of the installation. The major
package management tool, dselect, is, by its nature, a complex tool for a complex
job. For detailed instructions see the Dselect section (page 129).

Even with Debian's high quality, the complexity of Linux systems provides many
ways to confuse the unwary user. Although Debian attempts to create an
installation default that will fit the most general needs of the user, there are many
areas where knowledge and skill are required to get the most value from this
operating system. Debian provides for these needs with mailing lists. The debian-
user mailing list is an open subscription list. To subscribe one simply sends an
e-mail message to debian-user-REQUEST@lists.debian.org with the subject and
message body containing the single word subscribe. This will bring you into
contact with other users, potentially having had your problem in the past, who can
help reduce your confusion. The strength of this list is that developers lurk on the
list as well as users, so there is the possibility of getting expert advice from
someone who understands your problem.

In addition, the debian-devel mailing list is also open to public subscription,
although its goals are far more technical in nature, much useful information can be
gleaned from lurking on this list. As with the user list, a simple e-mail to
debian-devel-REQUEST@lists.debian.org with the subscribe statement in the subject and
message body will result in mail from this list being sent to your e-mail address.
The volume of these lists is quite high at times, which tends to scare folks new to
the Internet, but the quality response is also quite high. This is in stark contrast
to other distributions, many of which don't even supply any e-mail address for
questions. Those which do manage user mailing lists tend to be more closed and
less helpful to the average user. Much of the difference comes from Debian's open
development model, which welcomes the synergy created by multiple points of
view. The helpful nature of these lists is way above average for this type of
mechanism and most users find it a happy place to be while learning the ins and
outs of the Debian system.

It is these differences that have made Debian a competitive system with all the
current leaders in the Linux community. The fact that this is being done with
literally "no money" and without corporate sponsorship makes Debian's ability to
compare favorably against these other products a very remarkable achievement.


1.4 How This Book Was Written

Several months before the release of Debian GNU/Linux version 1.3 the author and
the publisher could find no Debian specific books available. They decided that this
would be a valuable commodity for the Linux community and set about producing
this book. From the very start it was determined that the electronic version,
distributed in HTML format, could be distributed freely and used privately in any
fashion. The print publication rights are held by the author, exclusively licensed to
the publisher for wide distribution.

The text of this book was primarily constructed from the author's extensive
experience as a Debian developer. This experience includes maintaining a variety of
packages as well as participating on both the development and users mailing lists.
However, without the many contributors to all the Fine documentation that is
available for Linux systems, however scattered and difficult it may be, the details of
this book would not have been possible.

Special thanks and gratitude go to Ian Murdock for his contribution to the accuracy
of the section on the early history of Debian and for his moral support. Many
thanks also go to all of the other Debian developers who contributed to this author's
understanding of the Debian system.

While all of the above is true, it was the author's work as testing coordinator that
provided an understanding of the minor quirks of the installation and package
management system. This experience provided many of the details that are
contained in the following text.
This book was written primarily to address the 2.0 version of Debian. It is also
expected to grow and change side by side with the distribution. There will be
changes and modifications to the content to keep the book in sync with Debian as
it grows and changes.

To aid in improving the content of this book, Linux Press provides an e-mail
address at books@linuxpress.com. Both complaints and compliments (the
author and Linux Press like those too) can be sent to the aforementioned e-mail
address. In particular, if you indicate areas where the book is incorrect or where it
can be improved, let us know. Reader input is eagerly accepted and will be the
prime motivator of future modifications to this book.

For those interested in purchasing the printed book, e-mail can be sent to
sales@linuxpress.com.

Orders can also be placed at http://www.linuxpress.com.
Linux Press can be contacted by mail or phe at:
Linux Press
P. O. Box 220
Penngrove, CA 94951

Phone: (707) 773-4916
Fax: (707) 765-1431
Web: http://www.linuxpress.com
E-mail: sales@linuxpress.com



2 Installation

2.1 Introduction

There are several ways to begin the installation of Debian. This section will
describe three methods. They range from using several floppies to the hard disk
and CD-ROM as the medium used to boot the installation software.

As with any new purchase, there is a desire to start using the product NOW!
What follows is a Quick Start section to accommodate that urge. However, we
caution that this isn't necessarily the best approach and may result in the loss of
existing data on your computer.


2.2 Quick Start

If the target machine can boot a CD then you will be able to begin the installation
by putting the CD in the drive and re-booting the machine. If you don't have that
luxury, boot the machine in DOS, either from a "DOS rescue" floppy or from the
hard disk. As a last resort you may need to build a boot disk and a drivers disk on
another DOS machine to get the installation started. These methods are covered in
detail later. What follows next is a simplified, step by step, procedure that will
result in the installation of a Standard Debian GNU/Linux system.


2.3 Floppy Installation

If the target machine has no operating system installed and, for one reason or
another, you don't want to install DOS on this machine, the floppy installation
method is the one to use. This will require 8 high quality, 3.5 inch, floppy disks (9 if
your machine has less than 6 megabytes of memory).

The boot floppy, known as the rescue disk, boots up a Linux system and runs the
installation program described later.

The Rescue Disk boots up the Linux kernel and provides a file system
capable of installing the base system. The disk image is contained in
either resc1440.bin or resc1200.bin depending on the size floppy being
used. It is formatted for DOS, which makes it easy to exchange a custom
kernel for the one provided.

The Installation Program is the first to run after the kernel has booted.
This is a C program, that uses elements of the Whiptail package, to
present the interface for installation interactions. This interface enables
the installation of the base system as well as a boot floppy if necessary.

The second diskette, known as the drivers disk, provides device driver modules
needed for mounting a CD-ROM as well as for establishing an Internet connection
early in the installation process.
The Drivers Disk contains various device drivers not compiled into the
kernel. The image for the disk is found in the files d1440.bin or
drv1200.bin depending on which size floppy is used. The modules
contained on the floppy are installed, both in the existing file system and
the target file system, as early in the installation as possible, providing
access to devices useful in completing the installation.

Modules. UNIX operating systems deal with access to devices by using
device drivers. Linux has several features that allow these drivers to be
built separately from the kernel and loaded when needed. These drivers
are called modules. Modules provide many useful capabilities not
available to "built in" drivers. Primarily they give the system flexibility in
managing system drivers without need for recompiling the kernel.

The Base System contains all of the programs required for booting a Linux system
on the target machine. It also has all the needed programs for continuing the
installation of a system, tailored to specific needs and desires.

The Base System takes 5 floppy disks and can be found in the file,
base2_0.tgz, as well. This provides a Linux system which can be used
to install the rest of the Debian system.

One more floppy should be set aside and marked "Boot Disk". This floppy disk will
be used to create a disk that will boot the newly installed system.

If you are installing on a machine with less than 6 megabytes of memory, as long
as there are at least 4 megabytes of memory, an additional floppy known as the
lmemroot disk will be needed to accomplish the installation. If you have less than
4 megabytes of memory or less than a 386 Intel processor, tie a rope around it and
take it fishing. It will make a passable anchor, but it will not run Linux. A 386 with 4
megabytes of memory can be coaxed into running Linux, but it is sort of like trying
to swim laps in a mud puddle. On the other hand, a 486 with 8 megabytes of
memory makes a reasonable work station that will even run X-Window, though 16
megabytes will improve performance immensely.
The lmemroot disk. This floppy is only necessary if the target system
has less than 6 megabytes of memory. If the system has less than 4
megabytes this floppy will not solve the problem. It contains the image
found in the file lmemroot.bin, that contains a root file system, trimmed
down from the one normally used. Already unpacked for mounting as
the root file system, this saves enough memory for a successful
installation on these machines.

If this machine-without-an-operating-system has a CD-ROM that is recognized by
the kernel, chances are very good that you will be able to get by with only the
boot/rescue disk and the drivers disk.

In some instances this bare machine may need to have DOS installed, or even
Windows, as well as Debian GNU/Linux. In this case the DOS/Windows OS
should be installed first. See the appendix sections on DOS Installation and
Multiple OS Installation for more details.

DOS Installation. Most Intel class machines come with some kind of
DOS installed. Machines that don't may require the use of a DOS rescue
disk. This floppy must boot DOS and contain the utility programs fdisk
and format. Once the hard disk has been partitioned and formatted, the
DOS installation disks will perform their job successfully.

Multiple OS Installation. There are several ways that more than one
Operating System can reside on the same machine. DOS and Windows
can easily reside on the same machine with Linux and each can be
booted at the choice of the operator. Windows 95/98 is a little bit trickier
since it enforces its own boot record. Attempts to install LILO may fail
with Windows 95/98 because of this behavior but loadlin can be used
instead.

If this is the case, or the machine already has DOS installed, the entire
installation can be performed without the use of a single floppy.

2.3.1 Making Boot Floppies

Everything needed to produce a set of installation floppies can be found in the
release Debian Archive in the sub-directory "disks-i386/". The files that will be
transferred to a floppy are known as "image" files. (Note: the word used here is
transferred, not copied. This is not a file copy procedure.) These image files contain
within them an image of a file system taken from a device. In this case the device
is a floppy disk.

A Debian Archive contains the packages distributed by the Debian
Project. Each release resides in its own sub-directory tree. Release 1.3
started life as bo, referred to publicly as unstable. Passing through frozen,
bo eventually became release as 1.3 and given the public link stable.
Rex, formerly 1.2.18 and stable, passed over the horizon into history. Bo
will do the same when hamm matures into stable.

Image Files/File Systems: Image Files are complete file systems that
masquerade as a single file. File systems are composed of directories

and files. The loop device allows such file systems to be mounted as
though they were actual physical devices. Image files thus provide "device
oriented file systems" in a modular fashion.

Creating a set of installation floppies is a process of transferring the images
contained in these files to the floppy disks that will be used to perform the
installation. The files containing these floppy disk images are as follows:

The following can be written to a 3 1/2" or 5 1 4" floppy
lowmem.bin Low memory root file system.

The following are for 3 1/2" floppies while their 5 1/4" counterparts have the name
base12 and contain one more image. (for a total of 6)

base14-1.bin First image of base system.
base14-2.bin Second image of base system.
base14-3.bin Third image of base system.
base14-4.bin Fourth image of base system.
base14-5.bin Last image of base system.

The method used to transfer these images from their file to the floppy will depend
on what is available. Many folks install Linux using a DOS machine as the starting
point, so this platform will be discussed first. The second section will describe
doing the same thing from a Linux platform, for those lucky enough to already be
working on a Linux machine.

2.3.2 Creating Floppies With DOS

Whether the disks used are 5 1/4" that hold 1.2 megabytes of data, or 3 1/2" disks
that hold 1.44 megabytes of data. (I am always intrigued by the fact that smaller
physical size means higher precision, yielding more overall storage capacity in this
particular instance.) Mark the floppies: boot/rescue, drivers, base-1, base-2, base-3,
base-4, base-5, boot-disk, and possibly one marked lmemroot (only needed for
low memory installation) which should be prepared from high quality, formatted
disks. It is important that, for those files that contain either 1200 or 1440 in their file
names, the correct file is used with its particular floppy. So 1200 files go on 5 1/4"
floppies while 1440 files will only fit on 3 1/2" disks.

DOS systems typically don't provide programs for transferring these image files to
floppy disk. The copy command certainly will not provide the desired results. The
earliest installations of Linux solved this deficit with a program called rawrite.exe.
The current version, rawrite2.exe, is used today by Debian and the rest of the Linux
community to provide this capability. This program is provided in the disks-i386/
directory in any Debian Archive. It can therefore be found on the "Official Debian
CD" provided with the print version of this book. This DOS executable is used to
create the rescue floppy, the drivers floppy, the 5 base floppies, and, if necessary, a
low memory root floppy from lowmem.bin.

Be sure to put labels on these floppies so you can tell them apart. You should end
up with at most eight floppies labeled: rescue, drivers, base-1, base-2, base-3,
base-4, base-5, and lowmem. A ninth formatted disk labeled boot should be set
aside for the end of the base installation phase.

2.3.3 Using RAWRITE2.EXE

As a result of rawrite2's place in history it is totally unaware of many of the latest
DOS advances and knows absolutely nothing about Windows or Windows 95/98.
Because of this there are several issues that should be kept in mind when using
rawrite2.

1. Though not always necessary, it is advised to put rawrite2.exe in the same
directory as the image files that are to be transferred to the floppy. If you have
a CD containing the Debian archive, the program is provided in the disks-i386/
sub-directory. This will only require changing to that directory on the CD
and the transfers can be made directly from the CD to the floppies without the
intermediate step of copying to the hard disk.

2. Let rawrite2 prompt you for the file name and the drive letter. Various
instructions give command line options, but these produce less than the
expected results when used on some machines. The process of creating a
floppy disk from an image file will look like:

rawrite2.exe
RaWrite 2.0 -Write disk file to raw floppy diskette

Enter disk image source file name: [resc1440.bin]
Enter target disk drive: [a]
Please insert a formatted disk into drive A: and press -ENTER-:
Number of sectors per track for this disk is 18
Writing image to drive A:. Press ^C to abort.
Track: XX Head: Y
Done.

Where those items enclosed in [ ] are the entered responses to the prompts
by the program. XX will range from 1 to 79 during the course of the transfer,
while Y alternates between 1 and 0.

3. Exit Windows completely before trying to use rawrite. In Windows 95/98 you
may need to build a DOS Boot Disk (boot floppy) in order to make this work.
Alternatively, if, while booting, when the first beep is heard from the computer,
press the F8 key. Select the option COMMAND, which will allow running
without the Windows 95/98 GUI being loaded. You will be presented with a
DOS prompt from which rawrite can be used.

A DOS Boot Disk must be bootable, contain the utilities fdisk and
format, and have config.sys and autoexec.bat and any drivers
necessary for making a CD-ROM work, if available. Some operating
systems are delivered on CD, including Debian, of course. A DOS
rescue disk provides tools to prepare the hard disk for installation of
the operating system.

4. If you still have problems and the disks produced fail to work properly, try
turning off caching and see if that helps.

5. The most common problems are caused by bad floppies, so always use the
best floppies you can find, preferably new ones, and verify them if you can.

The "Extras CD" contains a batch program called START. BAT that will completely
automate this process under "normal" circumstances.

2.3.4 Creating Floppies with Unix/Linux

The program to use in a Unix environment (Linux is just such an environment) is
dd. This program will transfer the image file to the floppy in much the same way
that rawrite2 did. The command line will look similar to:

dd if=resc1440.bin of=/dev/fd0 bs=1k count=1440

Note that if you are making 1.2 megabytes floppies the last value should be 1200
instead and look like:

dd if=resc1200.bin of=/dev/fd0 bs=1k count=1200

The if= parameter is the input file. The of= parameter is the output device. Note
that this will become /dev/fd1 if you are writing to the second floppy (i. e. B: drive in
DOS). The bs= parameter is the block size on the floppy and the count= declares
how many blocks may be copied. If there are fewer blocks than the disk will hold,
dd will do the right thing. In fact, in the case of these files, dd will perform as
desired even if the bs= and count= parameters are not included on the command
line. It is, however, a good idea to get into the habit of including these options with
this command as they will be necessary under other circumstances.

2.4 Installation From Floppy

You will need the boot/rescue disk, drivers disk, and the 5 floppies that hold the
base system, built in the previous section. A formatted floppy will be needed to
create a floppy to boot from when the installation is complete. Even if the intent is
to use LILO or some other method of booting the new system it is still highly
advisable to build a boot floppy, just in case there is a system problem.

If you have a DOS partition to work from, the method described in Zero Floppy
Installation
in the next section is likely to be more applicable. It will still be
valuable to read over this section, just to get a feel for the components of the
installation.
Step 1
Begin by booting the system with the boot/rescue disk. When the boot up is
successful, the initial choice menu of the install script will be presented that looks
something like:

Step 1
Debian GNU/Linux System Installation
| Select Color or Monochrome display. |
If your monitor displays color, please select "Color" here.
Select Continue when you are satisfied with the display.

Next : Continue with the installation.
Color : Select color display.
Monochrome : Select black-and-white display.

<Up>/< Down> between elements | <Enter> selects
If there is a color monitor on the machine it is highly recommended that the "Color"
item be chosen from this menu. Color screens have better contrast which makes
them easier to read. Of course, if there is only a monochrome monitor available the
color choice will be unhelpful and the Monochrome display (the default) should be
selected.
Once the display type has been selected, accepting the "Next" option on the menu
will display the following screen.

Press enter here to move on to the main menu.
Step 1.1
Debian GNU/Linux System Installation
| Release Notes |
Software in the Public Interest
presents
*** Debian GNU/Linux 2.0 ***

This is the Debian Rescue floppy. Keep it once you have installed
your system, as you can boot from it to repair the system on your
hard disk if that ever becomes necessary.

Release note: This floppy was built on May 12, 1998 by
Enrique Zanardi <ezanardi@ molec1. dfis. ull. ex>

Please be sure to visit the Debian WWW site: http://www.debian.org/
Debian's developers are unpaid volunteers from all around the world,
collaborating via the Internet. We have formed the non-profit
organization "Software in the Public Interest" to sponsor this
development. We'd like to thank the many businesses, universities, and
individuals who contributed the free software upon which Debian is
based. The Free Software Foundation should also be recognized for the
many programs they have contributed and for their pioneering role in
developing the free software concept and the GNU project.

<Continue>
<Up>/< Down> between elements | <Enter> selects
Every time the script returns to the main menu the installation program will inspect
the current state of the machine to determine which step in the installation is
supposed to be performed next. It will then present several possible options for the
next step in the installation at the top of the menu. The most likely choice is
offered first with the highlight bar placed for its selection.

Step 2
During this first time entry into the main menu, the installation program will
determine that the installation has just begun, and the highlight bar will rest on
Configure the keyboard. The menu will look like:

Step 2
Debian GNU/Linux System Installation
| Debian GNU/Linux Installation Main Menu |
Your keyboard has not yet been configured. Please select "Next" from the menu
to configure the keyboard.

Next : Configure the Keyboard
Alternate : Partition a Hard Disk

Configure the Keyboard
Partition a Hard Disk
Initialize and Activate a Swap Partition
Activate a Previously-Initialized Swap Partition
Do Without a Swap Partition
Initialize a Linux Partition
Mount a Previously-Initialized Partition
Un-Mount a Partition
Install Operating System Kernel and Modules
Install the Base System
Configure Device Driver Modules
Configure the Base System
Configure the Network
Make Linux Bootable Directly From Hard Disk

<Up>/< Down> between elements | <Enter> selects
Note that, although the listing visible on the screen stops at item N for lack of
space on the screen, the down arrow key can be used to move the highlight bar
from the top of the menu down to the bottom. This will reveal the last five items on
the menu:

O Make Linux Bootable Directly From Hard Disk
P Make a Boot Floppy
Q Reboot The System
R View the Partition Table
S Execute a Shell

Use the up arrow to move back to the top of the screen and press enter. This
presents a screen for choosing the keyboard template that fits the machine.

Step 2.1
Debian GNU/Linux System Installation
| Select a Keyboard |
Please select a keyboard. If you don't find the exact right
choice below, please choose something close.
You'll be able to configure more keyboard choices by running
kbdconfig once you have installed the base system.

(*) us U. S. English (Qwerty)
( ) axerty AZERTY
( ) be-latin1 Belgium
( ) bg Bulgarian Cyrillic
( ) cf French Canadian
( ) cz-lat2 Czech
( ) de-latin1-nodeadkeys Germany
( ) dk-latin1 Danish
( ) es Spain
( ) fi Finland

< OK > <Cancel>

<Up>/< Down> between elements | <Space> toggle selection | <Tab> next button
Note: All of the options that are available are visible on the screen. There
are many more keyboard choices available once the system is installed.
However, in order to fight the constant space constraints of the boot disk,
the numbers provided here are only those considered absolutely
necessary. After the system has been installed, log in as root and execute
kbdconfig. This will present the full list of keyboard maps, so that a more
appropriate selection can be made.

Step 3 Once the keyboard is configured, the installation software looks over the system
again. If partitions don't already exist on the installed drives, then the menu will
look something like the following:

Step 3
Debian GNU/Linux system Installation
| Debian GNU/Linux Installation Main Menu |
There are no "Linux swap" partitions present on the system. A swap partition is
necessary to provide virtual memory for Linux. Please select "Next" from the menu
to partition your hard disk. Use the partitioning program to add "Linux native"
and Linux swap" partitions to your disks.

Next : Partition a Hard Disk
Alternate : Go Without a Swap Partition

Configure the Keyboard
Partition a Hard Disk
Initialize and Activate a Swap Partition
Activate a Previously-Initialized Swap Partition
Do Without a Swap Partition
Initialize a Linux Partition
Mount a Previously-Initialized Partition
Un-Mount a Partition
Install Operating System Kernel and Modules
Install the Base System

<Up>/< Down> between elements | <Enter> selects
Note: Even if you are going to operate without a swap partition (not highly
recommended) you will need a root partition on which to install your system. If
partitions have already been built, the menu will look like the one in the next step
and you can proceed to step 4 now.

The opportunity to select which physical drive will be partitioned is presented when
the option to Partition a Hard Disk is chosen. Cfdisk is used to partition the
specified drive.

Use this tool to create at least one Linux partition and, unless circumstances get
in the way, a swap partition. With a 24 Megabytes swap partition, and 8
Megabytes RAM, a 486 will compile a kernel without running out of virtual memory.
However, when compiling very large packages, 24 megabytes is nowhere near
enough, even on a Pentium, with 16 megabytes of memory. However, with 16 meg,
a 48 megabytes swap partition becomes quite adequate. From this it can be seen
that deciding on the size of the swap partition isn't really a simple formula.
Depending on the tasks the system is expected to perform, the formula will be
different for each configuration. The principle involved can be explained.

There is "real" memory or RAM (Random Access Memory) that is used for system
memory and sometimes external cache, and there is virtual memory on disk on the
swap partition. This virtual memory is primarily used to hold "pages" of real
memory when they are not in use. The kernel parcels out pages of memory to
processes that need them. These pages age when not in use and, when memory
gets in short supply, the kernel "swaps" the oldest out to disk. If these swapped
pages are needed by the process that created them, the kernel swaps them back
into memory. Processes that create a lot of data can, at some level, consume all
available memory. This means that no matter how much physical memory the
machine has, some process will consume all of it. Swap space allows for the
expansion of that limit. A knowledge of the memory needs of the system is
required before the "correct" value for swap space can be computed.

Several simple rules:
You can't have too much swap space. Although excessive swap space may
amount to wasted resources, it will not cause the system to exhibit thrashing or
otherwise cause operational problems. It simply will not get used unless memory
usage escalates.

Thrashing -When the operating system spends most of its time paging
real memory in and out of the swap space it is said to be "thrashing" and
no useful work gets done. This can happen for a variety of reasons. On
another operating system, larger than "optimum" swap space would
quickly drive the system into thrashing. Deciding the amount of RAM that
will be swapped out based on the size of swap space causes "all"
pages to be swapped out immediately after they are used and the
machine spends all its time moving pages in and out of memory and
never gets anything done (Well, at least it seems like it) This is pretty
clearly "thrashing through stupidity". The more reasoned approach is to
base swapping activity on the age of the unused page and the amount of
free memory. As the amount of free memory decreases, pages get
swapped at an earlier age. This can still be made to thrash if placed
under enough load. With many processes allocating and using many
buffers, memory can fill up faster than it can be swapped out. The end
result is either machine lockup because of exhausted memory (ever
seen "can't get a free page" error?) or it goes into thrashing mode when
the swap age gets to zero. Whew!

More real memory does not necessarily mean more swap space. The need for
swap is much more dictated by the demands of the processes that consume
memory. Thus a swap ratio of 3 to 1 which works fine compiling kernels, as in the
24 megabytes swap to 8 megabytes RAM in the above example, fails when given a
larger task. But the same ratio on a 16 megabytes machine gives 48 megabytes of
swap space. This will be adequate for a large task but may still fail under a heavier
load.

Although large disk drives are dirt cheap, there is not always any dirt available, and
you are forced to compromise. Often after parceling out the disk, the left over
partition space is not adequate to the swap needs. You are better off to take the
space from the root partition and live in cramped disk space, than to fall short of
swap space. A work station with 16 megabytes of memory will be able to do most
any relatively complex work, including compilation of a math intensive package,
without running out of virtual memory, with only a 48 Megabyte swap partition. More
memory in this environment means less swap. Less memory means more swap.
Now that decisions about swap size are as clear as mud, lets see if Linux partition
sizes are any easier to determine. The base system takes slightly less than 20
Megabytes of disk space, while the "standard" installation consumes somewhat
more than 200 Megabytes of disk space. A "complete" installation may exceed
400 Megabytes, but doesn't need to go on one partition. Here is where the first
decision must be made. Is the whole installation going to go on one partition? Well,
if there is one physical drive large enough, what reason would there be to create
more than one large partition? (leaving room for a swap partition, of course) There
are, of course, several. Consider two of the most likely.

First, control of the user's consumption of disk space. If /home is contained on the
root partition the user disk consumption can consume all but 5% of the available
disk space choking off all disk use except by the root account. This 5% is set
aside for root privilege specifically so this event would not kill system activity. Root
can then remove the offending files and return the machine to usefulness. Placing
/home on another partition allows that partition to contain only the space you wish
to give to user activity, rather than the complete root partition. This means that even
when users have exhausted their disk space the rest of the system has plenty to
continue servicing other processes needs. The system continues happily along,
oblivious of the plight of the poor user. This is, of course, very useful when the
same platform is supporting both user activity and serving web pages. Having users
plug up the web server is highly undesirable. There are also other solutions to this
problem, such as the quota package, found in the admin section but, this is a
complete hardware solution requiring no additional software or configuration-management.

Second, control over the contents of /usr. Many systems do this by making /usr
read-only. The simplest way to accomplish this is to put /usr on its own partition
and mount it read-only. When the system administrator wants to add something to
/usr the partition gets remounted read-write, the changes get made and, the
partition gets remounted read-only. This partition could just as easily be on a CD-ROM
which would guarantee the read-only nature of the file system. Of course any
changes to /usr would require remastering a CD.

All of this mounting information is kept in the file /etc/fstab, which the installation
software will modify correctly for each of the partitions created. The install program
will expect that the first partition is to be used for the root (/) file system. This can
be modified if there already is a root partition. As you add additional partitions a
suggested mount point will be presented. This too can be modified. After each
partition is created it is mounted on the declared mount point. Once you have
created all the partitions they are thus all mounted and ready to accept the
installation of software.

When "Partition a Hard Disk" is selected, the following dialogue box is presented:

Note that this machine has two physical drives installed.
Step 3.1
Debian GNU/Linux System Installation
| Select Disk Drive |
Select the drive to partition. SCSI drives are listed in disk ID
number order. Only drives that were connected and operating when
the system was started will show up in this display. CD-ROM drives
may be miss-identified as writable disk drives by this menu.

/dev/hda
/dev/hdb

< OK > <Cancel>

<Up>/< Down> between elements | <Enter> selects
In this example let us choose the second drive, /dev/hdb. If this drive has not been
partitioned yet, the screen presented will look something like:

Debian Linux uses cfdisk which is a smaller, more trimmed down, partition editor
than fdisk, and provides all the functionality necessary for partitioning a new device
from scratch. Everything in the installation system has been chosen for its small
size and cfdisk is no exception.

Step 3.2
cfdisk 0.8j
Disk Drive: /dev/hdb
Heads: 16 Sectors per Track: 63 Cylinders: 2100

Name Flags Part Type FS Type Size (MB)
---------------------------------------
Pri/Log Free Space 1033.61

[ Help ] [ New ] [ Print ] [ Quit ] [ Units ] [ Write ]
Print help screen
With no partitions created the obvious choice is
[ New ]
which will give the options:
[Primary] [Logical] [Cancel ]
Only 4 Primary partitions can be created on any one physical drive. Usually this is
sufficient. When it isn't, Logical partitions are used to extend the number. Logical
partitions, sometimes known as "extended" partitions live inside a Primary
partition. To add logical partitions will thus require the removal of one of the 4
possible primary partitions. With only 3 Primary partitions whatever space that is
left on the drive can be divided up into as many logical partitions as needed. The
limit on logical partitions is only constrained by the space on the disk.

Whether you are constructing a Primary, or a Logical partition, the total space left
on the device will be offered for the new partition. Simply type in a new value to
override the displayed size. Pressing enter to accept the value typed will present
the options:

[Beginning] [ End ] [ Cancel ]
The new partition may be placed at either the beginning of the free space, or at the
end of it, or its creation can be canceled all together, by choosing the appropriate
option.
A few suggestions:

Whenever cfdisk creates a partition, it assumes that it will be a Linux partition and
creates it so. When creating a swap partition the FS (file system) type is not
correct. It should be a Linux Swap FS type. When the highlight bar rests on a
partition the options section of the screen looks like:

[Bootable] [ Delete ] [ Help ] [Maximize] [ Print ]
[ Quit ] [ Type ] [ Units ] [ Write ]
While the up/down arrow keys move from one partition information line to the next,
the left/right arrow keys move the highlight bar from one option to the next/previous
one. In addition the first letter of the option will activate it as well, so pressing the 't'
key will allow the FS type to be changed. This will display a list of all the allowed
FS types. Typing the number of that FS type will change the partition to the new
type when enter is pressed. The correct FS type for a swap partition is number 82,
Linux Swap.

In addition, the first partition should be marked bootable if it is to be the boot
partition. This is not necessary for additional drives that get added to the system.
In the current example, with a root partition, a swap partition, and a partition to
mount as /home the screen would look like the following when these partitions are
completed.

When the partitioning is complete there is still the need to Write the partition
information to the disk. Pressing 'w' at this screen will begin that process. The
program will ask if you are sure you wish to write the new partition information.
While most programs accept a simple 'y' to indicate agreement, this particular tool
demands that the word 'yes' be typed in full. This is a potentially dangerous
operation. The program is about to wipe out all data currently on this device when
it constructs the new partition table. It wants to make very sure that this is the
desired result.

Step 3.3
cfdisk 0.8j
Disk Drive: /dev/hdb
Heads: 16 Sectors per Track: 63 Cylinders: 2100

Name Flags Part Type FS Type Size (MB)
---------------------------------------

/dev/hdb1 boot Primary Linux 655.11
/dev/hdb2 Primary Linux Swap 78.26
/dev/hdb3 Primary Linux 300.24

[Bootable] [ Delete ] [ Help ] [Maximize] [ Print ]
[ Quit ] [ Type ] [ Units ] [ Write ]

Toggle bootable flag of the current partition
Step 4
If the drive was pre-partitioned, or if Step 3 was performed, the installation software
will now suggest initializing and activating a swap partition. The menu will look
something like:

Step 4
Debian GNU/Linux System Installation
| Debian GNU/Linux Installation Main Menu |
There are "Linux native" and "Linux swap" partitions
present on your system. The next step would be to initialize
and activate a swap partition to provide virtual memory to your
system. If you have not finished partitioning your disks or wish to
change the partitions, please select "Previous" from the menu
to partition them. If you are satisfied with your partitions,
please select "Next" from the menu to initialize and activate
your swap partition, or "Alternate" to activate a
previously-initialized swap partition. If you absolutely insist one
doing without a swap partition, select "Alternate1".

Next : Initialize and Activate a Swap Partition
Alternate : Activate a Previously-Initialized Swap Partition
Alternate1 : Do Without a Swap Partition
Previous : Partition a Hard Disk

Configure the Keyboard
Partition a Hard Disk
Initialize and Activate a Swap Partition

<Up>/< Down> between elements | <Enter> selects
As we built a swap partition in the last section the Next choice is the correct one
to follow. In the above case this will present the following dialogue box:

Step 4.1

Notice that only the partition that was marked 'Linux Swap' is presented as an
option for a swap device.

Pressing OK here will present an information box asking if the partition should be
checked for bad blocks. Answer yes here and the next question is "Are you sure
you want to do this?". Answer yes here and the swap partition begins to be
initialized. When the initialization is complete the swap partition in mounted and
the program returns to the main menu, after checking out the system to see how
far the installation has progressed.

Debian GNU/Linux System Installation
| Select Swap Partition |
Please select the partition to initialize as a swap device.

/dev/hdb3

<Up>/< Down> between elements | <Enter> selects
Step 5
Upon returning from setting up the swap partition the menu will look like:

Step 5
Debian GNU/Linux System Installation
| Debian GNU/Linux Installation Main Menu |
There are "Linux Native" partitions present on your system but none are
mounted. You must mount a root filesystem, and you may mount other
filesystems, before installing the system. If you have just created the
partitions, you must initialize them before you can mount them. Please
select "Next" to initialize and mount a Linux partition, or "Alternate" to
mount a previously-initialized partition.

Next : Initialize a Linux Partition
Alternate : Mount a Previously-Initialized Partition

Configure the Keyboard
Partition a Hard Disk
Initialize and Activate a Swap Partition
Activate a Previously-Initialized Swap Partition
Do Without a Swap Partition
Initialize a Linux Partition
Mount a Previously-Initialized Partition
Un-Mount a Partition

<Up>/< Down> between elements | <Enter> selects
If the Linux partitions have not already been initialized then Next is the correct
choice at this menu. When selected, the following dialogue box will provide the
available partitions for initialization:

Step 5.1

After choosing a partition to initialize, the option of checking for bad blocks is
offered. Even though it will extend the time it takes to initialize the partition, this is
time well invested. On the 655 block partition created for hdb1, in the example
being used here, the total time to initialize the partition was 10 minutes and 30
seconds. The time taken to check for bad blocks was 10 minutes and 5 seconds.
Even at this cost in time, checking for bad blocks is highly recommended.

Debian GNU/Linux System Installation
| Select Partition |
Please select the partition to initialize as a Linux ext2
filesystem.

/dev/hda1
/dev/hda3
/dev/hdb1
/dev/hdb2
/dev/hdb3

<Up>/< Down> between elements | <Enter> selects
When the initialization is complete an inquiry box will ask if this partition should be
mounted as the root file system ("/"). The first time through this step should be to
create just such a root file system, so the answer should be yes. Additional
partitions will be mounted on mount points within this root partition.

Step 6

After the first initialization step is complete, the main menu will be redrawn like:

Step 6

If there are still additional partitions to initialize and mount choose the Alternate
selection as many times as is necessary to complete the partition initialization
process on all desired partitions. (see the previous step)

Debian GNU/Linux System Installation
| Debian GNU/Linux Installation Main Menu |
You've mounted you root filesystem. You may initialize and mount
additional filesystems, or you may go on to install the operating system
kernel and the modules.

Next : Install Operating System Kernel and Modules
Alternate : Initialize a Linux Partition
Alternate1 : Mount a Previously-Initialized Partition

Configure the Keyboard
Partition a Hard Disk
Initialize and Activate a Swap Partition
Activate a Previously-Initialized Swap Partition
Do Without a Swap Partition
Initialize a Linux Partition
Mount a Previously-Initialized Partition
Un-Mount a Partition
Install Operating System Kernel and Modules
Install the Base System

<Up>/< Down> between elements | <Enter> selects
Once all of the desired partitions have been initialized and mounted it is time to
choose Next, and install the operating system kernel and any modules that will be
needed. Since the machine was booted from the boot/rescue disk, there is every
likelihood that it is still in the drive. If it has been removed, find it as it will be
needed shortly. First the installation medium must be chosen from the following
dialogue box:

Step 6.1
At this point, unless it operates as a SCSI or ATAPI device, the cdrom can't work
because the kernel doesn't have a driver for the CD-ROM drive yet.

Under the current installation conditions we must rely on the floppy disk since
there are no "preexisting" file systems that could contain the image files needed for

Debian GNU/Linux System Installation
| Select Installation Medium |
Please select the medium you will use to install the
system

/dev/fd0 : First floppy drive
/dev/fd1 : Second floppy drive
cdrom : CD-ROM drive
harddisk : filesystem on the hard disk
mounted : already mounted filesystem

<Cancel>

<Up>/< Down> between elements | <Enter> selects
a Zero Floppy Installation (see page 89). Remember that this discussion is
focused on a bare machine. Your mileage may vary.

If your machine will boot the CD you should read section 2.8 for details on using
the bootable feature of the CD. If the CD-ROM drive is a supported SCSI or ATAPI
(IDE) interface, then simply choose cdrom from the Select Installation Medium
dialog box in each place where the following text indicated that the floppy should
be selected.

Normally the first floppy will be the correct choice for this operation. If there is need
to use the second one instead, that choice is also available. Once a drive is
chosen, instructions will ask that the Rescue Floppy be placed in that drive. Insert
the disk and press enter. The message " Installing from the rescue floppy ..." will
hang on the top of the screen until the copy is completed. Next the Drivers Floppy
will be requested. Replace the boot/rescue floppy with the drivers floppy and press
enter. A similar " Installing from the drivers floppy ..." message lasts for the period
of the transfer, after which, if there have been no failures of the floppy disk medium
during this step in the installation, the main menu presents one, single, option:

Next Configure Device Driver Modules
As this has been the first opportunity for a disk failure since the kernel was booted
off of the boot/rescue disk, such a failure during this step will almost certainly
require the reconstruction of the offending floppy disk. In addition, although the
installation software recovers, several steps may need to be repeated to get back
to this configuration step. All of the partition work and file system creation will
survive, but the swap partition will probably need to be "activated" again. Barring
severe hardware problems, like broken floppy drives and other tricks "Murphy" uses
to turn perfectly good things into useless junk, a repaired floppy will allow this step
to complete successfully.

(On second thought, entropy turns working machines to junk. Murphy is that
invisible elf sitting on my shoulder laughing at me for what I have forgotten to say.
Take care that he isn't sitting on your shoulder during this installation.)
Step 7
Configuring device drivers can be a crucial step in a floppy installation.
If the hardware includes either a modem useful for connecting to an Internet Service
Provider, or a CD-ROM drive supported by the current kernel, here is where their
drivers are to be configured. If the connection is through an Ethernet card, very
likely the driver is already built into the installation kernel. Some are not and will
be found in the network section of the configuration menu. Upon successful
installation of these drivers the source of the base system need no longer be the
five floppy disks constructed earlier. If these options are not open, or not to be
taken for some reason, this step need not be performed. Any of the included
modules can be set up later by either editing the appropriate files or running
modconf (as root, of course). (See Modules section)

Even if you do configure all of the necessary modules at this time, it may become
desirable to edit /etc/modules and activate the "auto" line by removing the leading
'# ' character. This will allow modules to be loaded as needed and earlier in the boot
up process than kerneld is normally running. Modules explicitly declared after the
auto will be loaded at boot-up and never unloaded by kerneld until shutdown. This
is useful in maintaining start-up configuration on some drivers, most notably a
serial driver with nonstandard interrupts.

In addition to the option to configure device drivers, there is an alternate selection
that allows the PCMCIA support to be configured as well. This is of primary interest
to laptop machines with removable devices like modems, Ethernet cards, and even
CD-ROM drives and other SCSI devices.

Choosing the PCMCIA configuration option will present the options to configure: a
PCMCIA controller, Serial, and CD-ROM devices. Configuration now will make the
rest of the installation possible via these devices.
When the modules configuration option is chosen, the program modconf will
display the following screen:

Work through the menu selecting and installing those modules that will be useful to
the new system, as well as those that may aid in the installation process. Once all
necessary modules have been added to the system, choose Exit and return to the
main menu.

Step 7
| Select Category |
Modules are loadable device drivers. Please go through the menus
for each category and look for devices, network protocols, filesystems,
etc. that you would like to have supported by your system. You should
not install modules for devices that aren't installed in your system,
as they will sometimes cause the system to pause for a long time while
it is searching for the device. Also, drivers for devices that you
don't have use memory that you could put to better use.

Please select the category of modules.

Exit Finished with modules. Return to previous menu.
block Disks and disk-like devices.
cdrom Device drivers for CD-ROM drivers.
fs Drivers that allow many different filesystems to be accessed.
ipv4 Internet Protocol drivers.
misc Drivers that don't fit in the other categories.
net Drivers for network interface cards and network protocols.

< OK > <Cancel>
Step 8
It is now time to "Configure the Network". This option is presented at this time to
provide the possibility of installing the Base System over an Ethernet card or even
a dial up connection. Even if the base system is to be installed from floppy disk, it
is probably a good idea to go through this section anyway, as it creates files that
will be of use later if networking is desired. Whether you are going to use
networking or not, at least answer the first question posed by this option.
Selecting this option presents the following dialogue box:

Step 8

Whether or not the machine is going to be on a network, a name should be entered
here. Simply pressing the carriage return will assign the hostname debian. If you

Debian GNU/Linux System Installation
Choose the Host name

Every Debian system has a name -even if it is not on a network.
This name is called its hostname. You should now specify a
hostname for your new system.

If your system is going to be on a network, you should talk to the
administrator of the network before you choose a hostname. If not,
you may choose any name you like.

The hostname must not contain dots, and you must not append the
domain name here.

If you can't think of a hostname for your new system, you may
press <ENTER> to use the default hostname of debian.

debian__________________________________________
< OK > <Cancel>

<Up>/< Down> between elements | <Enter> selects
want a more distinctive name for your system, replace the string displayed with
one of your own choosing. It could even be your own name! The author's machine
is named dwarf. The only requirement of a name is that it not contain the '. ' (dot)
character. (Along with the fact that it probably can't be a buzzillion characters
long... shorter is better here.)

Since the name can be changed by editing /etc/hostname, there is no need to
expend much effort at this point in the installation. Whatever is chosen with the
press of the enter key, the following question is then asked:

Step 8.1

If your net connection is going to be via PPP, say "No" here and you will be given
the option of configuring PPP after the first reboot.

Debian GNU/Linux System Installation
| Network Connection |
Is your system connected to a network?
If you decide to use a network you must ask your network
administrator for an IP address and the network parameters !
If you plan to use a PPP connection to an ISP, say "No"
here.

< Yes > < No >

<Up>/< Down> between elements | <Enter> selects
There are three files that are created during this process that will be of interest
later. The first of these files, the /etc/hosts file, provides functionality even on
machines not connected to the net. Multi-user servers will use the dummy network
driver and the address found in the first line of /etc/hosts (127.0.0.1
localhost) which provides the routing when a user executes ftp localhost.

After selecting < Yes > the following selection screen will be displayed:

Step 8.2

If the machine is part of a LAN via Ethernet, the domain name will be that of the
server, most likely. Discuss this issue with the LAN administrator to get it right, but
at the moment any place holder value will do. Together with the IP address

Debian GNU/Linux System Installation
| Choose the Domain name |
As with individual systems, every network has a name. This
name is called the domain name.
Please enter your Domain Name.

_____________________________________________
< OK > <Cancel>

<Up>/< Down> between elements | <Enter> selects
requested later, this domain name and the host name will be used to make a
second entry in /etc/hosts that looks like:

<IP address> <host name>.< domain name> <host name>

In addition to the /etc/hosts file, this information, and what has yet to be entered
this step, will be used to construct the files /etc/resolv.conf and /etc/init.d/
networks. See the section on Networking for details on these files and other
information needed for this section. After entry of a domain name, the host name
and domain name are combined to create the "full name" of the system
(debian.domainname.com). A simple request box will ask if the name presented is
correct. If the answer is no, then an opportunity will be presented to do the last two
dialogues over.

If the answer is yes, then a new entry box will be presented requesting the IP
address of this system. The value presented is 192.168.1.1, and while this is very
unlikely to be the correct IP address for this machine, it is an example of what an
IP address looks like. It can be used as a place holder until the correct value can
be determined, or it can be overwritten with the correct value.
In either case the enter key will move on to the question of the net mask, which is
used if this machine will have a sub-net. The value presented (255.255.255.0) is
most likely to be the appropriate value, but your network administrator would be
able to tell you if it was not. Entering a value for net mask displays the following
screen:

Step 8.3
Debian GNU/Linux System Installation
| Choose Broadcast Address |
What is your IP broadcast address?
Unless your network has very specific needs choose the
first option

Last bits set to one : 192.168.1.255
Last bits set to zero : 192.168.1.0
choose another broadcast address : another

<Up>/< Down> between elements | <Enter> selects
As with the other information requests, enter the value if known, otherwise this can
wait until after the installation. Selecting < OK > will present the next question:

Step 8.4
Debian GNU/Linux System Installation
| Choose the Gateway |
A gateway system is one that connects your network to other
networks such as your company wide-area net or the
Internet. Is there a gateway system on your network?

< Yes > < No >

<Up>/< Down> between elements | <Enter> selects
Again, you may answer < Yes > here with no ill consequences, only to be asked
for your "IP gateway address". The default of 192.168.1.1 may be accepted or the
correct value entered, if it is known, which will deliver the following to the screen:

Step 8.5
Debian GNU/Linux System Installation
| Choose the DNS |
Where is the DNS (Domain Name Service) server ?

1 System <hostname> will be its own DNS server.
2 Another system will be the DNS server for system <hostname>
3 There will be no DNS server.

<Up>/< Down> between elements | <Enter> selects
The values determined here will be used to make DNS entries in /etc/resolv.conf. If
option 2 is chosen the actual IP addresses will be requested. Option 1 uses the IP
address supplied earlier in this step and, of course, option 3 doesn't need an IP
address.

The final screen:

Step 8.6
Debian GNU/Linux System Installation
| Confirmation |
IP Address: 192.168.1.1
Netmask: 255.255.255.0
Network Address: 192.168.1.0
Broadcast Address: 192.. 168.1.0
Gateway Address: 192.168.1.1
Nameserver Addresses: 127.0.0.1

Correct?
< Yes > < No >

<Up>/< Down> between elements | <Enter> selects
is presented with all the values entered during this step in the installation. If there
are any incorrect values presented here, they can be corrected by choosing <No>,
otherwise selecting < Yes > will move the installation along to the next final
network configuration screen:

Step 8.7

Make the choice from this list based on the later needs of the installation and the
type of interface available. If you have configured the modules correctly and have an
Ethernet card (or token ring) you will be able to establish a connection right away. If
you want to use PPP, SLIP or PLIP you will need to do some additional setup to
establish a net connection. See the section on PPP for more details.

Debian GNU/Linux System Installation
| Choose network interface |
Choose the type of your primary network interface.
If you have more than one network interface, choose the one
that you will need for installing Debian (via NFS or FTP)

Ethernet or Fast Ethernet : eth0
Token Ring : tr0
Point-To-Point Protocol : ppp
Serial-line IP : slib

<Up>/< Down> between elements | <Enter> selects
Step 9
Upon returning to the main menu the "Next" option will be, Install The Base
System.
If none of the other installation options are available, and floppies are the
only recourse, here is where those floppies that were marked base-1 through base-5,
selecting "Next" will present the previously seen selection screen:

Step 9
Notice there is an additional entry available now. Once the network has been
configured, the Ethernet connection can be used for NFS installation. The Base
System can be installed this way or from another medium. Reminder: See section
2.5 if this is a CD-ROM install.

Debian GNU/Linux System Installation
| Select Installation Medium |
Please select the medium you will use to install the
system

/dev/fd0 : First floppy drive
/dev/fd1 : Second floppy drive
cdrom : CD-ROM drive
harddisk : filesystem on the hard disk
mounted : already mounted filesystem
nfs : NFS (network filesystem)

<Cancel>

<Up>/< Down> between elements | <Enter> selects
If none of the others are appropriate, selecting the correct floppy drive will produce
the prompt: "Please insert disk 1 and press ENTER.". You will be prompted for
each succeeding disk and provided a progress report as it copies the contents of
the disk onto the new partition, until all five disks have been copied.

If any of the disks fail (an occurrence that does happen sometimes), the installation
program will restart, and may loose such things as the swap partition, and
sometimes, even the root partition will be unmounted. Follow the steps that are
indicated in next to get back to "Install the Base System". Of course, you will need
to rebuild the offending diskette. One way or the other, when the base disks have
been copied and unpacked successfully the installation program will return to the
main menu and the next step.
Step 10
Time zone configuration is the principle task in this step. Choosing the Next option
of "Configure the Base System" will display:

Step 10

The object is to choose the time zone that represents your version of local time.
You may either choose a time zoned from the list on the left, or choose a
geographical area from the list on the right. This can be very misleading at times.

For example: If you are in the Eastern time zone in the United States, you would
be tempted to choose America which leads to a list of cities, instead of the US
section which leads to the Eastern time zone.

Timezones:
CET
CST6CDT
Cuba
EET
EST
EST
EST5EDT
Egypt
Eire
Factory

Directories:
..
Africa
America
Antarctica
Arctic
Asia
Atlantic
Australia
Brazil
Canada

<Cancel>

<Up>/< Down> between elements | <Enter> select zone or change dir | <Tab> next

| Select Timezone |
Please select the appropriate location in the world in which
you live.
On the other hand you can choose a reasonable time zone from the list on the
right. If you want daylight savings time to take effect at the appropriate time choose
EST5EDT, otherwise choose EST.

Whatever you choose at this time can be changed later by running tzconfig.
The last question asked in this step is, "Is your system clock set to GMT
(y/n) [y]?". Unix system clocks are generally set to Greenwich Mean Time, also
known as Universal Time, and use time zone files to display the local time. If this
machine is to be set up in this fashion then the answer is yes. Most MS-DOS
machines set their clocks to "local time" for convenience. If you wish to maintain
this compatibility with a DOS system then the proper answer is "no".

Step 11
After configuring the time zone, the main menu will now suggest " Make Linux
Bootable Directly From Hard Disk", with the alternatives: " Make a Boot Floppy"
and " Reboot the System". Even if you choose to accept the first option, you should
make a boot floppy as well. This gives an alternative method of booting the
machine in a crisis. If the LILO configuration does not work as expected, there is
still a reliable way to boot up the new system. The floppy can thus be used until
the LILO configuration can be fixed.

Unless you wish to boot multiple operating systems and use loadlin, or another
boot loader, then you should choose this option. It will install LILO as the boot
manager and make the system bootable. There are many things that may still
make the system unbootable with LILO. For instance, if the system is installed on
a second hard disk device, where the first device is bootable, LILO will not be
properly installed and the system will continue to boot the first drive. Re-configuring
LILO on the first drive will fix the problem, but this is not always possible. If the first
drive boots Windows 95/98, then LILO must be installed after Windows 95/98, as
otherwise Windows will overwrite the master boot record, wiping out LILO. Loadlin
can also be used in these circumstances.
After making Linux bootable the menu may still present the same options that it
did before, but now the correct choice is " Make a Boot Floppy". You will need to
insert a blank floppy into the drive. The drive will be formatted and a kernel installed
and made bootable. On successful completion this will have produced a floppy that
can be used to reboot the system.

Step 12
After building a boot floppy the only thing left to do for a base install is " Reboot The
System". The new system can be booted from the hard disk (assuming that LILO
installed correctly) or using the new boot floppy. The DOS partition, if there is one,
can be rebooted now and a loadlin installation can be set up if that is the desired
boot path. No matter which method will be used, the final step in the base
installation is " Reboot The System"!

The base system installation is now complete and the rest of the system can be
installed from various sources using a selection of methods.

The first time the new system boots up a request for a "root" password will be
displayed, after which the creation of a user account and password will be offered..
A password for root account is required before the next step.

If you chose "No" during the Network Configuration phase, because you are using a
PPP connection, the next step will be setting up the PPP connection. The
pppconfig script can also be run later if you are going to install from CD.

Once this has been done the script will start-up dselect to continue the installation.
If you are going to use ppp to connect to the net for the rest of the installation, you
will wish to switch to a different Virtual Console and set up the net link first before
continuing. For more information on how to continue the installation using dselect
see the section on Dselect.


2.5 Two Floppies and a CD

If the target machine has a CD-ROM device mounted on a SCSI interface
supported by the kernel, you will only need the boot/rescue floppy to boot a "bare
machine". This means that with the Official CD supplied with the print version of
this book, and one floppy containing the image found in the file resc1440.bin,
Debian can be installed on a machine with no existing operating system. If the CD
is bootable, you will not even need that one floppy. See section 2.8 on Bootable
CDs for more information.

If the CD-ROM device is not connected to the machine through a SCSI connection,
or using the IDE/ATAPI interface, the second, drivers disk, will be required to install
the proprietary driver before data can be obtained from the CD-ROM.
Starting with the boot/rescue floppy and the drivers floppy, the installation proceeds
just like a normal floppy installation until it comes time to " Install the Base
System". (Step 9) Instead of choosing a floppy drive from the installation medium
selection screen, choose the cdrom option. Choosing this option will present the
following dialogue box:

Step 9.1

It should be fairly obvious which of the above choices is correct. If the CD-ROM
device is neither a SCSI device, nor an ATAPI drive, it must be one of the
proprietary drives. If this is the case, the driver for it was installed during the
configure device drivers step of the installation. For instance, if the device is a
Sound Blaster Pro with a Creative Labs CD-ROM, the proper module to configure
was the sbpcd driver. When this driver was installed earlier, the installation software

Debian GNU/Linux System Installation
| Select CD interface type |
Choose the type of your CD interface

/dev/scd0 : SCSI
/dev/hda : ATAPI (IDE), first drive on the primary controller
/dev/hdb : ATAPI (IDE), second drive on the primary controller
/dev/hdc : ATAPI (IDE), first drive on the secondary controller
/dev/hdd : ATAPI (IDE), second drive on the secondary controller
/dev/hde : ATAPI (IDE), first drive on the third controller
/dev/hdf : ATAPI (IDE), second drive on the third controller
/dev/hdg : ATAPI (IDE), first drive on the fourth controller
/dev/hdh : ATAPI (IDE), second drive on the fourth controller
proprietary : proprietary CD-ROM interface

<Cancel>

<Up>/< Down> between elements | <Enter> selects
made a link to it from /dev/cdrom. When the "proprietary" option is chosen this
device is used to mount the CD-ROM. Once the CD-ROM is mounted, an option
window asks for the choice of archive path. Unless you have specific CD
instructions to the contrary, accept the default of /debian. In almost all other cases,
/will be correct.

When this path is entered the following selections appear on the screen:

Step 9.2

The list option is best choice if the CD is of standard structure. If you are using a
CD with nonstandard locations for these files then manually is the better choice.

Debian GNU/Linux System Installation
| Select Archive file |
Please select the directory containing a file base2_0.tgz that you
will use to install the Base System.

list Choose from a list of all Base Archive Files
manually Enter the directory containing the Archives

<Cancel>

<Up>/< Down> between elements | <Enter> selects
If manually is chosen, accept the path of the mount point with no additions, and the
base system will install. This is where the base2_0.tgz file will be found in any
"complete" archives of the Debian distribution.

When pointed at the base2_0.tgz file, the installation program will copy it to the
root partition and unpack it. This will have the same result as the 5 floppies but with
far less work for both human and machine.

The remainder of the base installation proceeds as described in the Floppy
Installation
section (Step 10). The main portion of the installation may now
proceed.

2.6 Zero Floppy Installation

2.6.1 What you will need

To use this method, you will be starting with a machine with DOS installed, and
copy some files from the CD, booting from DOS. If the machine will boot the CD
then you can skip ahead to section 2.8, for the Bootable CD section.

Most CDs will have the required files for this installation method. They are found in
debian/main/disk-i386/current on these CDs. For that matter, these files are also
available at most ftp sites that archive Debian. Information on FTP sites and CD
vendors can be found at the Debian Web site: http://www.debian.org. Other useful
information is available there as well. Of course, the print version of this book,
provides an Official CD that contains these archives. Once you decide where to get
them, you will need the following:

linux -The kernel image used on the boot disk
root.bin -The root file system from the boot disk
base2_0.tgz -Base file system found on the 5 base disks
drv1440.bin -Image file containing kernel modules
resc1440.bin -Rescue disk used to obtain the kernel image
loadlin.exe -DOS based Linux loader

In order to do an installation without floppies, a bootable DOS partition with at least
10 Megabytes of disk space will be required.

2.6.2 Getting Started

If the CD you have has no helper programs, for moving the necessary files, you
must put them in the root directory of the DOS partition the hard way, using the
copy command. After the files have been copied to 'C:\' enter 'cd \'. Then enter the
following line:

loadlin linux root=/dev/ram initrd=root.bin
During the boot process, the kernel spews message after message describing the
current step in the boot process. Many of these messages scroll off the screen
before they can be read. This is not a cause for concern, unless the kernel fails to
finish the boot process. If this happens, the message left hanging on the screen
(assuming that the system doesn't blank the screen in its terror) is of some
importance when seeking assistance with the problem. Those messages sent to
the console during this period can typically be recalled with a utility called dmesg.
You will not find this utility on the rescue disk because of the severe space
constraints imposed by the boot floppy, but it will be available on the system once
it has been installed. After this usual, long list of boot messages, the first screen
of the installation script is displayed.

2.6.3 Installation

Much of the installation process is the same here as it was in the Floppy
Installation
section. Steps 1 thru 5 are the same no matter how the installation is
initiated. Before beginning these steps, the required files should be at the top level
directory of the DOS partition, whether a custom CD method placed them there or
whether it was done "by hand".

Files of future interest are: resc1440.bin, drv1440.bin, and base2_0.tgz. These files
will be used in place of the floppies to install the kernel, the drivers, and the base
system.
Execute the Install Operating System Kernel and Modules option from the main
menu, as in step 6 of the floppy install. Now, however, choose the harddisk option.

Note that if the cdrom is connected to the system through a SCSI interface, that
interface has been "built in" to the kernel and the CD-ROM device will be
accessible at this time. This makes the CD-ROM equivalent to a hard disk for this
discussion. If a CD-ROM will be used, it should be understood that statements
about the hard disk apply to the CD-ROM as well, even though only the hard disk
will be mentioned from this point on.

If the DOS partition, containing the required files, has already been mounted,
choose the "mounted" option instead. The choices here are much the same as
those found within the "harddisk" option.

Selecting the "harddisk" option presents a list of unmounted partitions. Choose the
DOS partition that contains the necessary files, and it will be mounted. The " Select
Archive file" dialogue box appears next. It offers two options:

list : Choose from a list of Archive Files ;
manually : Enter the directory containing the Archive File manually.

If these directions have been followed so far, the required files are no further away
than the mount point, and no addition information is required. Simply press enter
to "show the way" to the requisite files. Note that, up until now, this process could
be canceled at any step.

Once this "path" is accepted with < OK >, the process will progress to completion.
The installation program will now proceed to install the kernel and the modules from
the image files found on the DOS partition.

Configure Device Driver Modules just as described in the Installing From
Floppies
section. Once you have all the drivers necessary for your hardware,
continue with step 8, Configure the Network which is followed by Install the
Base System.

Now, instead of feeding floppies, one by one, into the machine to install the base
system, the correct choice is, again, harddisk, as the installation medium.
Proceed along the same path as with the kernel and drivers and the base2_0.tgz
file transferred to the DOS partition will be installed on the new root file system.

The remaining steps, 10 thru 12, configure the base system, make Linux bootable
from the hard disk, make a boot floppy and reboot the system. You now have the
base system installed and can proceed with the dselect installation of the rest of
your new system. You also have enough software on your dos partition to boot
Linux. If your Debian system is on /dev/hda2, then you can boot your new system
with:

loadlin linux root=/dev/hda2
When the system boots for the first time, you must give a password for root and
will be given the opportunity to declare a user account as well.

Next, the offer is made to configure a PPP connection for the remainder of the
installation. Even if you intend to use the CD for this, it is useful to configure the
PPP connection, if you are ever going to use it.

After PPP configuration, the following message appears on the screen:
Now you may choose one of several selections of packages to be installed
If you prefer to select one by one which packages to install on the system
you may skip this step, else you may skip the "Select" step later when I
run the dselect program.
Do you want to skip this step? [y/N]

This feature does not work as expected, and should be avoided. For best results
choose 'y' at this step. After this, the installation program brings up dselect.

Note: Although this procedure is described using loadlin and a DOS
partition in place of a floppy drive, it is quite clear that LILO could just as
easily be used from an existing, non-Debian, Linux system. So, installation
of a Debian system from another Linux machine could be done without
floppies as well.

2.7 Forcing Hardware Detection

Debian is moving to a fully modular kernel in the installation phase. This means
that the installer gets to choose which drivers to install and which to leave out. This
creates far fewer hardware collisions, when compared to the previous method of
having all the device drivers built into the kernel. Even so, for one reason or another,
your hardware may not be configured the way the driver software expects it to be.
Just exactly what your hardware and driver may need to see will require a little
research on your part.

For instance, if you have a Sound Blaster driving a Creative labs CD drive you are
probably going to use the sbpcd driver. The information provide in the kernel source
is found in Documentation/cdrom/sbpcd and includes the following:

"... the setup may be done during boot time
(via the "kernel command line" or "LILO option"):
sbpcd=0x320, LaserMate
or
sbpcd=0x230, SoundBlaster
or
..."

Once you have a full system installed you will find a complete list of boot prompt
parameters in /usr/doc/HOWTO/BootPrompt-HOWTO.gz. For the most up-to-date
list of parameters for a given device driver, look at the source code for that driver.
Within the first 100 lines there will be a set of comments detailing the various
parameters that can be passed to this particular device driver. So, if you are looking
for information on the Adaptec 1542 SCSI driver, you would look in Linux/drivers/scci
for the file aha1542.c and read the comments you find there. Unless you have
an alternated Linux system where these files can be found, none of this is
accessible from a "base system".
The parameters get passed to the kernel by the boot loader, which will often be
LILO or LOADLIN.EXE. These loaders pass the information provided on the
command line to the kernel for its use.

2.7.1 LILO

LILO is the most commonly used boot loader in the Linux community. LILO can
boot various operating systems including, DOS, OS/2, Linux, FreeBSD, etc. For
passing boot arguments to the Kernel, LILO uses the append= command.

2.7.2 Loadlin

Loadlin is the other commonly used boot loader. As it is a DOS program, its
primary use is in booting up Linux from a DOS partition. One very good reason for
booting in this fashion is to deal with cards that need to be configured by the DOS
driver before they can be used by Linux. Since no reset occurs in this situation, the
card stays configured when Linux boots, thus keeping its settings intact. Loadlin
will pass various parameters on to the kernel, such as root=/dev/hdb1.

2.7.3 rdev

Several boot parameters are actually stored in the kernel itself. The program rdev is
used to set these parameters. They include: root device, swap device, RAM disk
size, video mode, and the readonly/readwrite flag for the root device. For details of
its use type rdev -h, or look at the man page.

2.7.4 Argument Format

Most boot arguments follow the format:
keyword[=value1][, value2]...[, value11]
Note: The limit of 11 arguments is an actual limit. If you need to pass
more than 11 arguments to a given keyword, you can reuse the keyword
with the next 11 arguments and they will all be given to the kernel. Each
keyword group is separated by a space on the command line, allowing
multiple keywords to be used.

2.7.5 Usage

The first thing that the kernel does with the arguments that it receives is to search
the arguments for the special keywords: root=, ro, rw, and debug.

Next the list of setup functions registered with the kernel are checked to see if the
keyword is found.

For instance the aha1542 keyword would cause a search for aha1542_set-up().
When found by the kernel the setup routine is passed the parameters listed after
the keyword and, hopefully, the device will configure correctly.

Any keyword of the form keyword=argument that is not found in the setup functions
list is considered an environment variable and will result in the setting of that
variable by the kernel.

Any arguments that remain are passed to process one, which is usually the init
program. The most common of these is "single" which tells init to go into single
user mode. The man page for init will inform you of just what arguments it will
accept (See Appendix 7 for keywords).


2.8 Bootable CDs

Many newer machines can now boot from an image provided on the CD. Checking
the Setup of the computer, at boot time, will provide an option for booting the CD.
This will most often work with ATAPI/IDE drives, but several SCSI controllers know
how to boot a CD-ROM device on their channels.

Set the machine up to boot from the CD, place the CD in the drive, and reboot the
machine. If all goes well, after a period of time, the initial screen of the installation
program will be presented on the screen. From this point on, the installation will
proceed just like the Installation from Floppy method at the beginning of this
chapter.

Now, instead of needing to manage a hand full of floppy disks, everything can be
obtained from the CD-ROM. When prompted for the installation medium always
choose CD and all the components of the base system will be obtained from the
CD-ROM.

This is, by far, the easiest method of installing Debian. There are no problems with
flawed or broken floppies, and, depending on the speed of the CD-ROM drive, can
be significantly faster than the floppy install. If your CD-ROM will support this
method, you are encouraged to use it.


2.9 Installation Via FTP

2.9.1 General

No matter which of the following FTP methods you use, you will first have to locate
an FTP site. The primary FTP site for Debian is ftp.debian.org. If this site is
overloaded it will provide you with a list of alternatives you can use. Once you have
decided which FTP site to use you are ready to begin.

2.9.2 Straight FTP

If you have enough disk space the most straight forward FTP method is to
download all of debian/main/binary-i386 and debian/main/disks-i386 (non-intel
architectures are available, but are not covered in this book).

If you don't have a DOS machine to do the download with, but can get a valid disk
set on floppies, you can access the net once you have installed the base system.
The base system comes with ppp and ftp as well as telnet, so you should be able
to "get on the net" with just the base system installed. PPP setup; Once you are
at this stage, the various options are all available. If you have Ethernet connection
to the net, you will not even need to set up ppp.

This release provides the first attempt at configuring PPP for you. If you gave the
"correct" answer during the base system installation, you will be given a chance to
configure PPP when you reboot to finish the installation. Unless it has been fixed
by the release, the install script does not ask to start the connection. If you wish to
use it for dselect, you will need to switch to an alternate Virtual Console, and start
the connection with pon, the PPP on utility. After the dselect phase, you will be
asked to shut the connection down with poff.

Once you have the base system installed and the archive downloaded, you can
either use dselect to do an installation of the complete system (or choose some
subset that you like), install packages one at a time using dpkg -i, or try out dftp.
You will need to download and install dftp first, as it doesn't come with the base
system.

2.9.3 Installation using dftp

Dftp is a perl program for keeping Debian systems up-to-date with an FTP site, or
an NFS mount, and it also works on a CD, so you could use it on a local archive
as well. To use this program for initial installation you will first need to download it
into your new base system. You will also need the full perl package (what is
provided on the base disks is a stripped down version of perl). Install these two
packages with:

dpkg -i /path-to-packagefile/package-version.deb
and read the man page on dftp.
Once dftp logs onto the FTP site it will compare the files available on the site with
those already installed and create a list of "available" packages, in category order,
to make selection easier. Dftp will then present you with the list and let you choose
which package you wish to install. It will then go out to the FTP site (or wherever
you have set it to) and fetch the files you requested, if necessary. After acquiring
the files, dftp checks them for correctness and installs them.

2.9.4 Dselect FTP method

Dselect also has an FTP installation method. Setting the access method to FTP
will set dselect to install via this method and the rest of the installation proceeds as
you would with any other dselect method. See the section on dselect for more
specific information on this installation method.

2.9.5 Installation via NFS

Starting with release 1.3, Debian provides for NFS installation. If you have an
Ethernet connection to a net with the Debian archive on an NFS mountable device,
you can do the whole installation with only the rescue disk and the driver disk. If
you don't have an Ethernet connection, but do have a PPP connection to the net,
you can still do the major part of the installation via NFS after installation of the
base system.

2.9.6 Ethernet connected install

If the machine you intend to install Debian on has an Ethernet connection to a
network containing an NFS mountable device with an archive of the distribution,
you will need a rescue disk and a driver disk to perform the installation. After you
boot the disk and enter the installation program it will be suggested that you
configure the keyboard, then create, initialize and mount a swap device, then
create, initialize and mount the root partition.

You will next, install the kernel from your rescue disk (choosing the floppy device
as the installation medium) and then install and configure the modules you need to
access the devices in your machine. This will, of course include the particular
networking card your machine uses for Ethernet access. Don't forget to include
drivers for any scsi cards your system may use to get to drives, and if you have
any peculiar CD setup this is the place to configure it.

The next option is to install the base system. When choosing a device you may
choose NSF here, as you are all set to use it. Once the nfs mount is established
the base will be extracted from base2_0.tgz and installed on the root partition.
Once this installation is complete, and the configuration step is finished, you can
either make a boot floppy, or make your system LILO bootable. At this point, when
you boot the system, you will be asked to give root a password and create a user
account and password, followed by running dselect. There is an nsf mount option in
the Access Method section of the menu and, once the mount is successfully
established, you can go through the rest of the installation via this method.

2.9.7 PPP connected installation

Without an Ethernet connection to the net there will be no NFS capabilities until
the base system has been installed, so you will need a full set of installation
floppies unless you have a bootable DOS partition and can do the Zero Floppy
Installation.

Once the base system has been installed you will need to do some setup to get
ppp started. If you answered the networking questions correctly, there will be the
option to configure PPP on the first reboot. Once the ppp connection has been
established, either the NFS volume is mounted, or the installation/upgrade is
performed using dselect, choosing the NFS access method. If the NFS volume is
already mounted when dselect is run, then the 'mounted' access method will work
just fine.

2.9.8 Boot Managers supporting Multiple Operating Systems

LILO is the default "boot manager" for most Linux systems. Debian is no different
in this, although there is no requirement that LILO be used. There are any number
of "good" boot managers on the market. If you are using one of these and wish to
continue doing so, read the documentation that came with your boot manager very
carefully. This section will cover the use of LILO and LOADLIN.EXE and will give a
brief description of SYSLINUX.

LILO
This boot loader is delivered with Debian as the default and is a very versatile
program. Many of the problems experienced with this loader are related to improper
configuration, so read all the documentation carefully.

LOADLIN.EXE
This boot loader requires a dos partition as the normal boot path for the machine.
That is, without the execution of loadlin the system would normally boot up in dos.
Loadlin will reside on this partition even though the Linux root partition might be
another device or another partition.

The only two files that will reside on the dos partition are loadlin.exe and a file
containing the kernel image (normally vmlinuz, but can be named anything). In
order to get a choice between dos and linux the best method uses the menu
capability of config.sys to provide optional operating system execution.
In the following examples the section called <DOS STUFF> is the section of the
file that would exist if only dos were to be installed and will vary from machine to
machine. It is just what is on the DOS machine before you begin installation of
Linux, so simply insert that into the following and it will work. The assumption is
that the kernel image and loadlin.exe have been placed in /linux as their sub-directory.

config.sys:
[Menu]
menuitem=Linux, Linux 2.0.34
menuitem=DOS, DOS/Windows
[DOS]
<DOS STUFF>
[Linux]

autoexec.bat:
cd \linux
goto %config%

:DOS
cd \
<DOS STUFF>

goto End
:Linux
loadlinx vmlinuz root=/dev/hda2
goto End
:End

These two files will provide you with the means to boot either your DOS partition or
your Linux partition. A menu is presented at boot, providing the two choices: Linux
2.0.29 and DOS/Windows.
SYSLINUX
This boot loader is primarily used by Debian to build boot floppies and is not
intended for any more complex use. See /usr/doc/syslinux for further information on
this boot loader.


3 dpkg: The Package Management Tool

3.1 Introduction

Dpkg is the work horse of the Debian packaging system. When run with root
privilege, it installs and removes groups of software files called packages. For
developers it builds packages. For users, dpkg supplies information on specific
packages, the contents of any particular package, or a list of the installed
packages on the system. It does all of these package management tasks and
more. It is used by dselect, another application discussed in Chapter 4, to perform
the actual installation of packages. Many perl programs and scripts make calls to
dpkg as part of their operation. A familiarity with dpkg provides solutions to many
general packaging problems. When all other installation methods fail, dpkg is often
capable of resolving the problem.

Dealing with the interdependence of packages is one of the major tasks of
the Debian Package Management system. The dependency checking features of
dpkg are well advanced when compared to other solutions available in the Linux
community. What does this mean? It means that, if you use dpkg to attempt the
installation of a package, and that package depends for its proper operation on
another package that has not yet been installed, dpkg will complain and fail to
install the new package. While this may, at first, seem to be a problem, it is
actually the solution to the problem. It is far more unsatisfactory to be able to
install a package that will not work after being installed. This dependency
mechanism protects the system from such installations. As dpkg provides
information on the package dependency that has not been satisfied, it is a straight
forward task to install the dependent packages. Once the dependencies have been
satisfied the package will install without problems, and run as expected afterwards.
On some systems, one or more of these "dependent" packages might only be
supplied by a "local" version of the software, unknown to the packaging system.
There are ways to force dpkg to install the depending package even when it does
not know that the dependency is satisfied. These options should be used with
extreme care, and an understanding of the consequences. All of these
interdependency issues are dealt with by an interface to dpkg called dselect,
described in Chapter 4.

The following discussion will cover all of the options that can be specified when
using dpkg with the focus on how to use them. All of the information contained here
is available in "sparse" form by dpkg -h |less. Each of those options will be
described in as much detail as possible in this section.

3.2 Running dpkg

Dpkg can be run at two levels. Many of the information features of dpkg are
available to a simple user account. For tasks like removing and installing
packages, root privilege is required. This root privilege may be obtained from tools
like sudo or su if root login is undesirable. Scripts that use dpkg to install or
remove packages must either be run with root privilege or have the facility to gain
root access for the critical operations.

Sudo is provided as an alternative to logging is as root to obtain those
privileges. Entries in the controlling file ( /etc/sudoers) determine the
commands that a given user can execute with root privilege. In this way,
individuals or groups may be given access to areas of the system which
are normally off limits.

What's with all this need for root access? Isn't it dangerous to use root for such a
simple thing as package installation? Well, look at it from another point of view.
Would you wish any user on your system to be able to install a potentially
important package on your system? Those, hopefully few, people that are trusted
to do the maintenance jobs that require root access are also those folks who
should be trusted to install and remove packages.


3.3 Options Recognized by dpkg

3.3.1 Installation and Removal Options

-i | --install <package file>
This option is the standard way to install an individual package. The <package
file>
is the file name of the .deb file containing the package and must contain an
adequate path to the file. So if you are currently in the directory /usr/debian and the
archives are in /usr/debian/stable, you can either type:

dpkg -i ./stable/binary-i386/admin/cron_3.0pl1-38.deb
or:
dpkg -i /usr/debian/stable/binary-i386/admin/cron_3.0pl1-38.deb

with the same results. Either of the above lines will install the cron package on
your system from the given location.

This is fine for installing packages one at a time, but an installation of all of the
packages in a given directory tree is possible with the use of the -R option. This
option causes dpkg to attempt installation of every .deb file that it finds while doing
a recursive search of the declared directory tree. So, if you wanted to install the
entire admin directory as given in the above example the command would look like:

dpkg -i -R /usr/debian/stable/binary-i386/admin
Because of dependencies between packages this approach will not always (or even
very often) be successful. It is very useful if you have a nonstandard archive that
contains all the packages you wish to install and all of their dependent packages
as well. Constructing such archives using ftp to download only those packages that
you need will create archives that dpkg can install as a group. If the packages are
all found in the directory /usr/local/Debian/archive, then the command:

dpkg -i -R /usr/local/Debian/archive
will direct dpkg to install all the packages found there. Dpkg will install the
packages in the order it finds them. This leaves open the possibility that
dependencies will not be satisfied during the first pass. On large complex
collections of packages this can potentially take several passes at the package
files.

A more general solution is to break the installation phase into two steps. The first
step unpacks the package file, while the second step configures the unpacked
files. Just which files are unpacked, and where they are placed after unpacking, is
determined by a collaboration between dpkg and the package.

--unpack <package file>
Sometimes, as when dependencies get in the way of installation, it is desirable to
break the installation into two separate steps. The --unpack option performs the
first step of the installation. Dpkg extracts files from the package and places them
in their correct locations in the file system.

The configuration of the package, including the installation of configuration files,
known as conffiles, is postponed until a later time.

Like install, this option will accept the -R | --recursive option. This allows for
unpacking all of the packages in the given directory tree. Following up on the
example discussed for --install, a large collection of packages gets unpacked by a
command like the following:

dpkg --unpack /usr/local/Debian/archive
--configure <package name>
This option is used in conjunction with the unpack option to complete the
installation of a package. This option may involve scripts specific to the package
that put the finishing touches on the package, or it may require that dpkg manage
the installation of files known as conffiles.

Conffiles are files that have been declared by their package to require special
handling during their installation. The passwd file, that holds the password
information, is just such a file. Dpkg provides the opportunity to replace the current
password file with a new one whenever the package is updated. In the case of
passwd this is not desirable, while with other packages, such as mimetypes, it
may be perfectly acceptable. If you do replace an old conffile with a new one, the
old one is backed up with the added extension .dpkg-old. If you reject the new
conffile a copy is provided with the extension .dpkg-dist. This allows for recovery
from mistakes, but it also provides the material from which a composite conffile can
be constructed. Thus, with the password example, if major changes happened to
the structure of the password file, the new file is accepted and the old data edited
into the new file. This produces a composite password file with the new changes
combined with the old user information.

This --configure option causes these remaining details of configuration to be
completed for a given package. To configure all packages that are unpacked but
not configured the -a | --pending option replaces the package name. To complete
the installation of packages previously only unpacked, the command looks like:

dpkg --pending
and will complete the installation of any unpacked packages.
-r | --remove <package name>
This causes the package to be removed but leaves the conffiles installed. When a
package will be removed, but later replaced, it is sometimes desirable to keep the
conffile. An extreme example would be the passwd file. The password package
could be successfully removed without damaging current system operations only if
the passwd file remains intact after the package has been removed. This option
provides that capability and allows for a package's removal and replacement
without loss of the conffile.

The -a | --pending option in place of a package name will cause dpkg to remove all
packages marked for removal in the status file.

This " status" file looks much like a Packages file with the addition of a Status:
field. Dselect, discussed in the next section, edits this file based on the choices
selected via its interface. It is possible to edit the file /var/lib/dpkg/status, but it
must be done carefully. As with all of the files in this "database" maintained by
dpkg and dselect, disastrous results can come from improper changes. A
reasonable amount of knowledge and understanding should be acquired before
changes are attempted in these files.

Use the tools provided to manage the package system. Only the most dire of
circumstances will warrant abandoning the tools in favor of modifying the files
directly.

--purge <package name>
Unlike remove, this option not only removes the package but also removes the
conffiles associated with that package. In this way all traces of the package are
eradicated from the system. This option also supports the -a | --pending option in
place of the package name.

3.3.2 Available Packages File Management

Dpkg and dselect both use the available packages information found in the file
/var/lib/dpkg/available. This file is constructed from the Packages file found in the
binary, contrib, and non-free sections of these archives. There are several tools that
dpkg provides, as options, for creating and managing this file.

--clear-avail
Dpkg will clear the available packages file of all information when given this option.
There are times when the current file has been corrupted or otherwise broken in
some fashion. This can happen for a number of reasons.

The most common reason is that it has gotten updated from a "broken" Packages
file. In extreme cases, changes to the file format have resulted in files that failed to
work with the old version of dpkg. This requires that the new version be installed
before the file can be fixed. Cleaning out the file allows the upgrade to go forward.
Once completed the available file can again be updated with the new Packages
format and the installation may progress unhindered. Executing the command:

dpkg --clear-avail
is a way to clean the slate and start over from scratch and will typically be followed
by a --merge-avail command.
-A | --avail <package file>
This will add the package information, found in the .deb file pointed to by
<package file>, to the available file. So the command:
dpkg -A /usr/local/Debian/archive/joe_2.8-7.deb
will add an entry to the available file if there is not an entry there already. If the
package has an entry, the entry will be updated with the information about this
version of the package.

--update-avail | --merge-avail <Packages-file>
When the update-avail option is used, the old information about the packages in
available is replaced by the package information contained in the Packages file.
This file is found in the top of a binary distribution, so Packages files can be found
in binary-i386/, contrib/, and non-free/. Issuing the command:

dpkg --update-avail /home/ftp/stable/binary-i386/Packages
will replace the old available file with the contents of the Packages file found in
/home/ftp/stable/binary-i386. This option is intended for use when a new release
archive is being used.

Merge-avail adds the Packages file from another binary tree to the list of available
packages. The new information gets combined with the old list, adding information
on new packages to the available file. The following commands:

dpkg --clear-avail
dpkg --merge-avail /home/ftp/stable/binary-i386/Packages
dpkg --merge-avail /home/ftp/contrib/Packages
dpkg --merge-avail /home/ftp/non-free/Packages

will create an available file that reflects all three of these areas of the distribution.

3.3.3 Package System Information

-s | --status <package name>
This option delivers the status information contained in the entry for the package
named from the status database. Much useful information about the package can
be obtained from this display beside the installation status. Among them, the
version of the package, its maintainer, and a brief description of the package. For
instance, the command:

dpkg -s mc
will produce the output:
Package: mc
Status: install ok installed
Priority: optional
Section: utils
Maintainer: Fernando Alegre <alegre@ mars. superlink. net>
Version: 3.2.1-1
Depends: libc5, ncurses3.0, ncurses-base
Suggests: gpm
Conffiles:
/etc/mc/mc.ext 6e672da6b5961ba9125e11824fcb2fef
/etc/mc/mc.ini d41d8cd98f00b204e9800998ecf8427e
/etc/mc/mc.lib fcdd319ffefa2a9cb4b7a5fa3ccad72d
/etc/mc/mc.menu 4be9e09f0728f993fc468b98db403be0

Description: Midnight Commander -A feature-rich full-screen file
manager. Midnight Commander is a feature-rich file manager. It
has mouse support in a Linux console and in an xterm. It started
as a Norton Commander clone but now it has new features on it's
own.

It does not use libncurses, but it uses the terminfo database.
Support for XView and TCL/Tk is available, but it is still
experimental. It is not included in the current binary.

--print-avail <package name>
Much the same information is provided by this option as by the status option.
While the status information is not presented here, the installed-size and
architecture and package size fields are given in this listing. Issuing the command:

dpkg --print-avail mc
produces the following output:
Package: mc
Priority: optional
Section: utils
Installed-Size: 890
Maintainer: Fernando Alegre <alegre@ debian.org>
Architecture: i386
Version: 3.5.17-1
Depends: libc5 (>= 5.4.0-0), libgpm1, ncurses-base
Suggests: gpm
Size: 371140
Description: Midnight Commander -A feature-rich full-screen file
manager. Midnight Commander is a feature-rich file manager. It has
mouse support in a Linux console and in an xterm. It started as a
Norton Commander clone but now it has new features on it's own.
It does not use libncurses, but it uses the terminfo database.
Support for XView and TCL/Tk is available, but it is still
experimental. It is not included in the current binary.

-L | --listfiles <package name>
All of the files that dpkg installed for <package name> are listed by this option.
This does not, of course, include files created by installation scripts, as they are
unknown to dpkg. Thus, the command:

dpkg -L mc
produces the following output:
/.
/usr
/usr/bin
/usr/bin/mcserv
/usr/bin/mc
/usr/lib
/usr/lib/mc
/usr/lib/mc/icons
/usr/lib/mc/bin
/usr/lib/mc/bin/create_vcs
/usr/lib/mc/bin/cons. saver
/usr/lib/mc/bin/mcfn_install
/usr/lib/mc/term
/usr/lib/mc/term/ansi.ti
/usr/lib/mc/term/linux.ti
/usr/lib/mc/term/vt100.ti
/usr/lib/mc/term/xterm.ti
/usr/lib/mc/term/xterm.tcap

/usr/lib/mc/term/xterm.a
/usr/lib/mc/term/README.xterm
/usr/lib/mc/extfs
/usr/lib/mc/extfs/zip
/usr/lib/mc/extfs/zoo
/usr/lib/mc/extfs/lslR
/usr/lib/mc/extfs/a
/usr/lib/mc/extfs/rpm
/usr/lib/mc/extfs/deb
/usr/lib/mc/extfs/ftplist
/usr/lib/mc/extfs/extfs.ini
/usr/lib/mc/extfs/README
/usr/lib/mc/mc.hint
/usr/lib/mc/mc.hlp
/usr/lib/mc/mc.tcl
/usr/man
/usr/man/man1
/usr/man/man1/mc.1
/usr/man/man8
/usr/man/man8/mcserv.8
/usr/doc
/usr/doc/copyright
/usr/doc/copyright/mc
/usr/doc/mc
/usr/doc/mc/README
/usr/doc/mc/FAQ
/usr/doc/mc/NEWS
/etc
/etc/mc
/etc/mc/mc.ext
/etc/mc/mc.menu
/etc/mc/mc.lib
/etc/mc/mc.ini

which lists every file installed by the mc package.
-l | --list [< package name pattern>]
Packages matching <package name pattern> are listed by this option, along
with their installed status, the version number and the short description. If no
<package name pattern> is supplied then the list is a complete list of the
installed packages on the system. Following our example with mc the following
command:

dpkg -l mc
will produce the following output:
Desired= Unknown/Install/Remove/Purge
| Status= Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/Err?=( none)/Hold/Reinst-required/X= both-problems (Status, Err: uppercase= bad)
||/Name Version Description
+++-===============-================================
ii mc 3.2.1-1 Midnight Commander -A feature-rich full-scr

-S | --search <search file pattern>
The package containing the file described by <search file pattern> is returned by
this option. Both the package and the location of the file are displayed in the
output. To deviate from our current example, with something a little more
informative, the following command:

dpkg -S whereis
creates the output:
util-linux: /usr/bin/whereis
util-linux: /usr/man/man1/whereis.1.gz

providing the information that this program is available in the package called
util-linux. Installing that package will provide this program.
-C | --audit
All of the packages that are not completely or correctly configured are listed by this
option. Most often the correct solution is to run dpkg --configure <package> to
complete the installation. Executing the command:

dpkg -C
will create a listing something like:
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
svgalib1-bin SVGA display utilities
ncftp A user-friendly and full-featured FTP client.
statserial statserial -displays serial port modem status lines
ftape QIC-117 (Floppy-tape) driver, in source code form.
j1 J is a dialect of APL freely available on a wide
variety
tk40-dev The Tk toolkit for TCL and X11 -Development
Package.
expect The expect/expectk programs and libraries.
tclX Extended Tcl (TclX).
acct The GNU accounting utilities.

The following packages are only half configured, probably due
problems configuring them the first time. The configuration
should be retried using dpkg --configure <package> or the
configure menu option in dselect:

xdevel XFree86 3.1.2 developer's toolkit

Of course the packages listed here will vary from system to system.

3.3.4 Force Options

Force options are used to override the default behavior of dpkg. These options
should be used with some forethought, due to the potentially dangerous nature of
these commands. Each of these commands forces dpkg to perform in a way that
is foreign to its normal behavior. This opens possibilities for damage to the system
that are otherwise well contained.

The force options have two actions:
--force-< thing> which reduces errors on <thing> to warnings
--refuse-< thing> stops execution on encountering errors on <thing>

--no-force-< thing> == --refuse-< thing>
thus each of the options in this section can be preceded by either of the above
prefixes.

downgrade
Install the selected package even when the current installed package is a newer
version than the one to be installed. This option is enabled by default.

configure-any
Configure any other packages, as well as this one, that this package depends on,
which is currently only unpacked and not yet configured.
remove-reinstreq
Even if the package has been marked for required reinstallation this force
option will allow its removal. It is understood that under some circumstances this
will result in files being left behind without dpkg's knowledge.

remove-essential
Removal of essential packages is not recommended because these packages are
required for the proper operation of the system and removing them may break the
system. In some rare cases, like the name change of a package, or the
replacement of functionality by privately built software, it becomes necessary to
remove one of these packages. This force option will allow that removal to proceed.

3.3.5 Miscellaneous Options

--print-architecture
Outputs the architecture of the machine for package building purposes.

--print-gnu-build-architecture
Prints the gnu format architecture of the machine.

--print-installation-architecture
Same as --print-architecture, but used by installation programs.

--license
Prints license and copyright information
--version
Prints the version of dpkg

--help
Displays a list of the options that dpkg currently supports, with a brief description
of the option and its function.


4 Dselect

4.1 Introduction

Dselect is, at the same time, a very powerful tool and a very difficult tool for the
new user to make work. Some folks have problems with the interface because of it
being unlike anything else on the planet. Many of the keys used are not the
"standard" keys used elsewhere in other software to perform those functions.
Others are surprised by some of the "unexpected" things that dselect will do for,
and in some cases, to them. Yet, there are many satisfied dselect users, some
who would complain loudly if dselect were to change in any way. This implies that
the tool does what it was designed to do. The following discussion should be very
helpful to a beginner trying to figure out how to make dselect work for them.

In general, the principle rule when using dselect is: Pay very close attention to all
the messages that appear on the screen before you press any keys. Even if you
have seen the screen dozens of times before, you are cautioned to think twice
before you initiate any key strokes. Read the help information that is available
every time you use the program, until you are completely familiar with the
information contained there. Take notes when odd behavior is noticed.
Dselect uses separate scripts to manage the access portion of its functionality.
These scripts, called methods, deal with the task of mounting the device
containing the archive. As such, they are referred to as, mountable methods. There
is a package called dpkg-mountable that not only adds another mountable method
to dselect but provides a log of all dpkg activity during the dselect session. This
can be invaluable in determining just what went wrong with a particular installation
attempt. This method is now a part of dselect and may be chosen from the Access
menu option..

4.2 Using Dselect

When dselect is executed, the first screen is the main menu which contains the
following seven options:
0. [A] ccess Choose the access method to use.
1. [U] pdate Update list of available packages, if possible.
2. [S] elect Request which packages you want on your system.
3. [I] nstall Install and upgrade wanted packages.
4. [C] onfig Configure any packages that are unconfigured.
5. [R] emove Remove unwanted software.
6. [Q] uit Quit dselect.

These selections can be chosen by either using ^P and ^N (^ indicates the control
key is pressed with the letter) to move up and down the list (up and down arrows
work as well) and pressing enter when the highlight bar is on the option you wish to
choose, or by pressing the key for the character found in square brackets at the
beginning of the option name.
0. [A] ccess
If no additional methods (like dpkg-mountable) have been installed then selecting
[A] ccess will provide the six access methods: cdrom, nfs, hard disk, mounted,
floppy, and ftp. Each of these "methods" needs slightly different information. The
goal is to find the Packages file for the various pieces of the distribution.

The top half of the screen, topped with the red title bar, shows the menu items. The
list can be traversed with the arrow keys and enter selects the item under the
highlight bar.

The bottom half of the screen is bounded by blue highlight bars. The top bar names
the access method currently highlighted. In between the bars is descriptive help
information about the highlighted selection. The bottom bar indicates the
percentage of text viewed, and the key that will change the current text position in
the window.

This is a common pattern in dselect. The upper portion of the window is where the
activities occur and the bottom half provides additional information to help make the
choice.

cdrom:
What you need to know:

The cdrom method will find an already mounted CD-ROM or will ask for the device
driver that will mount the correct drive. All such drivers are found in /dev and thus,
the specification of an sbpcd driver would be /dev/sbpcd0 for the SoundBlaster Pro
driver, /dev/scd0 for the first SCSI CD-ROM, and possibly /dev/hdb1 for an IDE
ATAPI type drive.
Once the drive is mounted the next problem is finding the distribution on the CD-ROM.
A CD-ROM with a "standard" archive will have a directory link called 'stable'
in the outer directory of the CD-ROM. This link provides the path stable/binary-i386
and dselect knows how to find everything it needs from the main distribution. Under
these circumstances '/' is the proper designation of the "top level" of the
distribution. ( dselect does not make it clear that the path specification it expects is
relative to the mount point of the CD-ROM)

It is safe to assume that the archive is standard, since dselect will notice if it is not
and ask again for the location of the top of the archive. See the Notes section
(page 122) for details.

nfs:
During a fresh installation, when you first get introduced to dselect, there will only
be an Internet connection available if the machine uses an Ethernet card and it is
recognized by the installation kernel. Without this kind of configuration a PPP/SLIP
connection, typically through a modem, must be established before proceeding
with this step. Note: There are several other ways to make a connection to another
machine, local area net or wide area net. Ethernet and PPP/SLIP are the most
common. By whatever method, once a connection to the desired host is available,
this method can proceed.

What you need to know:

When this option is chosen the first request is for the domain name of the NFS
server. This can be a numeric IP address, or a fully qualified domain name, of the
form something. someplace. net, which will be used to contact the server. The
installation software will mount the NFS volume found at the declared IP address.
Once mounted, the location of the "top level" of the distribution is required. Dselect
is expecting the path to a directory called stable that contains stable/binary-i386.
Some archives don't support this path structure. Under these circumstances it
becomes necessary to specify each binary distribution individually, and the correct
answer is "none". See the Notes section below for details (page 122).

harddisk
Use this access method only when the hard disk device containing the archive is
not yet mounted.

What you need to know:

Dselect will ask for the device name of the disk partition containing the archive.
Once it has successfully mounted this partition it will request the path to the "top
level" of the distribution. If you have a standard distribution this should be the path
to the sub-tree, stable/binary-i386, otherwise the answer is "none". (See the
Notes section on page 122.)

mounted
When the archive of the distribution is already mounted, this option only needs to
know where the "top level" of the distribution is. This method does not care if the
device containing the archive is a hard disk, a CD-ROM, or an NFS mount on
another machine, so this method can be used to make a nonstandard CD-ROM or
NFS mount "look" like a standard distribution. This is done by constructing a
subdirectory tree that will act as the "top level" of the distribution. Create a mount
point (sub-directory) in the "top level" directory and mount the CD-ROM or NFS to
that mount point. Then create symbolic links for "stable", "contrib", and if available,
"non-free". Make these links point to their respective places in the mounted
archive. As an example: If the mount point is /mnt/dist/debian and the path on the
CD-ROM to binary-i386 is /bo/binary-i386, then the link would be made by the
following commands:

cd /mnt/dist
ln -s debian/bo/stable

with similar constructions for the contrib and non-free sections.
Once the directory structures are in place then just give /mnt/dist as the "top level"
of the distribution. If this seems too complicated then simply answer "none" to the
first prompt and then give the explicit path to each of the parts of the distribution
being installed. (See the Notes section on page 122 for details.)

floppy:
This is not a recommended installation method. Floppies are notorious for their
failure rates. If there is a machine with an archive and Linux, and floppies are going
to be made on that machine for one that only has floppy drives, it would be far more
successful to bring the machines close enough together to install a null modem
cable between them and establish a SLIP connection between the two machines
and proceed with an FTP installation.

If this is impossible..., then the problem becomes one where you must have far too
much idle time on your hands. CD-ROM drives are cheap. Buy one. If you wish
to install the complete binary distribution, it rings in at just under 400 Megabytes.
Even on 1.44 Megabytes floppies that's still around 280 floppies.

For a limited number of packages this method has a reasonable chance of
success. The best approach for this is to place all of the .deb files for the packages
to be installed into one directory and build a Packages file for them. See Building
Packages Files
for details.
ftp:
What you need to know:

Selecting this method will result in a prompt for the domain name of the ftp site
which is to be used for the installation. As with the other access methods, the path
to the archive must be known, and supplied for the proper continuation of the
installation.

Notes
Each of the above access methods will at some point ask for the location of the
"top level" of the distribution. If the archive is in the "standard" form, pointing to this
"top level" will be all that is necessary. Dselect will find a Packages file for the
binary-i386 portion of the distribution as well as contrib, and non-free. The path to
the local distribution will be asked for separately, as well as any of the above that
were not found in the "top level".

If the distribution is in a nonstandard layout, dselect will notice this and complain
that what was identified was not, in fact, the "top level". In this case simply answer
"none" and each section will be prompted for separately.B>Note: switching consoles
VCs (see below) will allow an investigation of the distribution archive so that the
path to binary-i386 can be found as well as contrib and non-free.

VCs: The Virtual Console is a method for sharing the console monitor
with more than one login process. Debian configures six Virtual Consoles.
The left ALT key pressed along with a function key (F1 thru F6) will place
the corresponding session on the monitor. It's like having 6 separate
terminals!
In addition to the three "standard" distribution collections, dselect offers the option
of giving the location of the "local-distribution". This local distribution is for use at
the direction of the local system administrator. Packages that have been created
as .deb package files that are not available from the Debian archives are
candidates for placement in the local archive. Although alternate packages that do
exist in the archive can go here, the Packages file for the local archive must be
"merged" by hand using dpkg --merge-avail before dselect will recognize them for
installation. This is because dselect is unwilling to downgrade a package, so those
packages must be the only ones in the available file for proper installation. If the
intent is to operate in this fashion then the update of available will need to be done
by hand and the "Updated Available file" option should not be executed.

1. [U] pdate
Choosing this option will update the available packages file from the Packages files
available from the various distribution sections you identified in the "Access"
section. If any custom construction of the available packages file has been done,
then this option should not be executed.

2. [S] elect
This option delivers the main power of dselect as well as providing the greatest
challenge. Here is where a thorough knowledge of the various keys used by dselect
will provide major benefit.
Novice use of [S] elect
For those installing Debian for the first time with no experience with dselect, the
choice of [S] elect should be considered an educational experience where no "real"
actions will be taken. This should simply be considered to be a "look around" at
what is available so a familiarity can be established with this complex and powerful
section of dselect. No selections need be made here, since all "standard"
packages are marked for installation at this time. This is a good starting point when
configuring a new system.

On first entry to the [S] elect screen it should be noticed that the top of the screen
is the normal selection area with the bottom area of the screen for information
display.

Things to look at:

On first entry into the select window a complex list of sections and packages is
visible in the top section of the screen. The arrow keys will move the highlight bar
up and down this list/menu. The order of the packages on this list can be changed
using the 'o' key. Press the key several times slowly and the display changes the
order in which packages are displayed from the starting point, ordered by priority,
to ordered by section, and finally to an alphabetical listing of all available packages.

Further examination of the display will reveal, on the left edge of the display a
cryptic set of symbols like *_* or some other form of arcana. Pressing the v key
will expand these symbols into their "English" meanings, each symbol described
by one word on the display line. This results in the loss of the available and
installed versions as well as the short description that was found on the line before
pressing v. Press v again and return the display to the terse mode.
Next, let's see if we can find a particular package among this information rich list.
Midnight Commander (mc) is a nice package to have, but is not included in the
"standard" packages, so it will not be currently selected for installation. Use the /
key and enter mc when asked what to search for. Like any string search the
package found will not necessarily be the one you are looking for. There are several
other packages that start with mc and, unless the list is ordered in simple
alphabetic order, these other packages are as likely to be found first as the desired
one. To search for the next possibility, simply press the back slash (\) and the next
match will be found. Several repetitions of this action will eventually find the
package in question.

Once the mc package has been found, the bottom section of the screen will
display the "long" description for this package. Pressing the 'i' key will provide
several other informative screens. The first gives the installation status of the
package. The next two give various control file displays which provide additional
information about the priority, section, dependencies and package maintainer.
Some of this information is helpful when tracing down various errors. The 'I' key
removes this section of the screen all together, providing more space on the screen
for listing packages. Pressing it again consumes most of the screen in the
information section leaving only a few lines for the selection list. Thus this key
cycles the display between these three different configurations.

At this point the short tour is over and if only the "standard" installation is desired
the return key will exit the selection phase and the install can be started.

For those with a more adventurous spirit, this discussion will continue with a
description of how to select an additional package for installation. This can be
returned to after the standard distribution is complete, or be dealt with by using
dpkg "by hand".
The plus key "+" is used to select a previously unselected package for installation.
Note that the minus key "-" is the opposite of the plus key and designates the
package for removal. This is not the same as "don't install" and should only be
used when a package is really supposed to be removed. For packages that no
action is desired for, such as "don't upgrade" the proper key is "H" which puts the
package on Hold (no action to be taken with regard to this package).

With the highlight bar over the mc package file line in the display, press the '+ ' key.
The " Dependency Conflict Resolution Help Screen" will pop up as a consequence
of this action. This means that there is a dependency or a conflict that must be
resolved before the chosen package can be installed. In this case it is a
dependence on libgpm1 that must be satisfied. Pressing the space bar drops the
help screen and shows the dependencies necessary for mc. Dselect is typically
very smart about doing what is necessary to resolve the dependencies or conflicts.
Only rarely will it set things up contrary to the wishes of the package administrator.
The same keys that work in the main selection screen can be used here to force
the desired actions by dselect. If dselect still doesn't agree, then the 'Q' key will
force acceptance of the configured actions.

In the case of Midnight Commander though, dselect makes the correct
adjustments and adds libgpm1 to the list of packages for installation and a simple
"enter" will exit the resolution screen. Press enter again to exit the selection
screen, or, if you are feeling really brave, look for more packages you might like to
install. dselect takes the time to work through the complete list of available
packages when doing the install, reporting which packages are being skipped and
which are already installed. It is a good idea to do package selection once, so as
not to have to wade through the list over and over during the installation phase.

Several packages that are not found in the standard section, but might be valuable
are: joe and vim. Other packages of interest depend on the specific needs of the
system being configured and is left up to the person doing the installation to
decide.
3. [I] nstall
This option will use dpkg to install the packages chosen in the [S] elect section.
Often one package or another will fail to install because its dependent packages
have not yet been configured. This step should be run over again until all the
packages have installed.

4. [C] onfig
Use this option to configure any packages that were not configured in the
installation phase.

5. [R] emove
This option will remove any packages marked for removal or purge in the [S] elect
phase.

6. [Q] uit
When you are finished with dselect this option will exit the program.
This section has covered the basics of package installation using dselect. If the
help screens are read every time dselect is used, a slowly growing understanding
of the additional features of dselect will be the result. Try something new each time
you use it and you will eventually move from being a novice user of dselect to
having a well rounded knowledge of its many powerful features. Just remember to
take it slow and be sure that you understand the consequences of your actions
before you take them. With care and patience dselect can become one of the
formidable weapons in your arsenal of Debian package management tools.


4.3 Upgrading with dselect

Once you have installed a system and have all the necessary packages installed,
maintaining such a system with dselect is exceptionally easy. Dselect (actually
dpkg) keeps a database detailing the state of the system. What packages are
installed, their versions, and additional necessary information are contained in the
directory /var/lib/dpkg/info while the status of installed packages are kept in
/var/lib/dpkg/status. The file /var/lib/dpkg/available is updated by dselect whenever a
new archive is to be installed. This is not automatic, but happens when the
[U] pdate item is chosen from the main dselect menu.

From the information in these areas, dselect can do an upgrade with little
interaction. There are several preparatory tasks that should be done first, to insure
dselect's success. There were several incremental upgrades to dpkg during the life
of the 1.2 distribution. At one point upgrading may have "broken" the available file.
The transition to actually using a new feature did not go as smoothly as expected.
To get past this problem it will be necessary that the available file get removed.
This is done by the command:

dpkg --clear-avail
After this command it will be possible to install the following using dpkg:

These are critical packages and, although dselect can often "do the right thing"
when upgrading an installed system, it is advisable to install these by hand. In any
case it is almost always necessary to upgrade dpkg by hand. This package has
the newest version of dselect as well as dpkg and often packages in the new
release will need features that are only available in the newest version of dpkg.

Once this preliminary work has been done, dselect can be run in normal fashion to
perform a complete system upgrade. If there are packages that should not be
upgraded for one reason or another, they can be placed on hold in the [S] elect
screens. To do this, search out the package using the '/' and press 'H'. This will put
the package on hold and dselect will do nothing with respect to this package.
Additional packages of interest can be added at this time as well, so the system
can be enhanced by new packages that are of interest.

After configuring these details in [S] elect, the upgrade will proceed as expected.



5 X11 Installation

5.1 Introduction

Once a "standard" system has been installed, there is sufficient infrastructure to
support an X11 installation. There is a broad range of software that will only run in
X-Window and many people prefer a graphic interface to a text one. X-Window
provides a versatile environment in which to work and play.

It is strongly recommended that, with a fresh install, the "standard" packages be
installed first, before the X installation is attempted. Trying to do both at once will
result in some configuration difficulties caused by the "order of installation" being
different under these circumstances. If the default (standard) installation is done
first, followed by the X installation, the X packages will configure properly. If they
are attempted together, no configuration file can be created until after the
installation. This will require editing the server line in /etc/Xservers both before the
configuration (to indicate the vga16 server) and again after the config file has been
created (to indicate the server that will actually be used).
created without the device tty0. Xbase-configure depends on the existence of this
device. If you have a CD-ROM with one of these disk sets, you will need to build
the device. To do this, change to the /dev directory and execute the following:

./MAKEDEV tty0
after which you will be able to continue with the installation.
Specific knowledge of the graphics hardware on the target machine is needed
before the installation of X-Window begins. There will be limited opportunity to find
this information from the machine once the installation has begun. The make and
model of the graphics card is the most important piece of information, but vertical
and horizontal sweep rates for the monitor may also be necessary. The graphics
card information and the monitor information can usually be obtained from the User
Manual provided. Getting the card information right is half the battle. The sweep
rates are usually found in a table at the end of the users manual. Because of the
way that these items are chosen in the configuration software, any of the VGA or
SVGA settings provided will work without doing damage. In order to get the most
from your monitor it may be desirable to go beyond the configuration thus created.
This is only dangerous if the values declared fall outside the capabilities of the
monitor. Under extreme conditions an incorrect setting can do permanent damage
to the monitor. Have all this information available before the installation is begun
and you have a fair chance of success.

XFree86 has come a long way since its early release. While once one had to
configure X "by hand", editing config files and hoping the parameters were correct,
today this product almost configures itself. The package now provides a "generic"
VGA server which provides, on most machines, a graphical interface to the
configuration process. Here, you declare the default server (which has already been
installed by this point), the graphics card and monitor information, as well as the
other details of the configuration. When successfully completed there will be a
working X-Window system available for use.

X11 Installation

5.2 Using Dselect

If dselect has been used to install the system so far, then there will be no
confusion in using it to install X-Window. Even if dselect hasn't been used before
this would be a good way to become familiar with its operation and use. See
Dselect (see page 115).

Required Packages:
xbase Basic X programs
xserver-vga16 Configuration server
xserver-< your choice> Operational server
xfntbase Basic Font set
xfnt75 75dpi fonts

Recommended Packages:
Some Window Manager:
fvwm2 A window manager
xpm4.7 Pixmap runtime library
fvwm-common Files common to fvwm2 and fvwm
xloadimage A suggested graphics viewer
xfnt100 100dpi fonts
xfntbig Large fonts
xfntcyr Cyrillic fonts
xfntil2 ISO 8859-2 fonts
xfntpex Pex minimal font support
xfntscl Scalable fonts

Available Window Managers in Debian 1.3:
9wm Plan 9 Window Manager
afterstep NextStep look and feel WM
ctwm Claud's Tab WM
fvwm F Virtual WM
fvwm2 F2 VWM
fvwm95 F VWM with Win95 look and feel
gwm Generic WM
olvwm OpenLook VWM
wm2 Small unconfigurable WM

Enter the [S] elect window in dselect and search out xbase. When this package is
selected, the Conflict/Dependency screen will pop up, showing the other required
packages. Choose the appropriate server from the list provided. The other
requirements have already been selected by dselect. Once the dependency screen
is exited there are enough packages selected to install and operate an X server, but
without a window manager of some kind the system will not be very useful. It is
highly recommended that a window manager be chosen at this time as well. The
fvwm2 window manager is versatile and very configurable. It is one of the more
popular window managers available. As can be seen from the list of "Available
Window Managers" there are several other choices. If fvwm2 doesn't suit the
particular needs of the installation, then one of these will probably be a better
choice.

X11 Installation
The author prefers the olvwm window manager, primarily because of the way that it
deals with "focus". Focus is what makes a window active and allows text to be
entered in that window. Most X-Window managers have the focus follow the mouse
pointer. This means that if you are typing in a window, and the pointer slides out of
the window, the keys you type will stop appearing in the desired window. Olvwm,
on the other hand, requires a click of the mouse pointer inside a window to set the
focus in that window. Moving the pointer out of the window does not move the
focus. The author finds this a much easier way to work a window system. The
choice is, of course, totally up to you. There are several very nice window
managers to choose from, so, try several and you will certainly find one that suits
your needs.

The window managers available on your system will be recorded in
/etc/X11/window-managers. The first available entry in the list will be the one
executed when xdm runs. This file is ignored if the user starting the session has a
.xsession file in their home directory. The window manager referenced in .xsession
will be the one used.

Although the default font choice will get things started, many X programs will
require additional font support. Depending on the amount of disk space available it
is recommended that as many font sets as possible be installed. This will reduce
problems with other packages in the future, as some of these packages don't
require "desired" font sets to be installed before the package can be installed and
will give peculiar results if the desired fonts are not available.

Once all the desired packages have been "selected" proceed with the installation
phase. One of the more aggravating features of dselect is its desire to traverse the
complete list of packages while looking for things to install. This makes the
installation phase somewhat long, even when only a few packages are being
installed. Be prepared to wait for awhile until dselect gets to the "interesting"
portion of the install. If you want to go off and do some laundry, don't worry about
making dselect wait for you. If it gets to the "good part" and has to wait millions of
machine cycles before you get back, it's only fair.
begins. This phase of the installation requires interactive responses. It is now that
the hardware interface information that was previously collected will be used to set
up the X-Window environment.

The first request pause will ask about the configuration file /etc/init.d/xdm. Unless
this is an upgrade situation, the correct reply is 'Y' and will install the package
maintainer's current version of the config file. Even during an upgrade it may be
advisable to replace the file.

The next question is, "Would you like xdm to be started at boot time?". Even when
the eventual configuration is going to start xdm at boot, it is probably better to
answer 'n' here and wait until it is certain that the X-Window installation will
succeed. Otherwise this could yield a system that will fail to work properly at boot
time, possibly locking up the machine, making it useless. To enable xdm at bootup
add the line start-xdm to /etc/X11/config. For more information on t X11 config file
see /usr/doc/X11/debian.README.

After setting up the fonts that were selected, the question, "Do you want to make
the VGA16 X server the default?". This server is designed to work on most
machines and is intended for use by the configuration software. The correct
response here is 'y' even though this may not be the server you intend to use. After
the configuration portion of the install the server selected for installation can be
identified as the new default.

If no XFree86.config file exists, permission to create one will be requested. Unless
some specific configuration file is available and desired over the one that would be
created, the correct answer is 'y'. The vga16 server will run the configuration
program.

X11 Installation
Options for configuring the mouse, the graphics card, and the monitor will appear.
Here is where all that information about the graphics card and monitor will be used.
Sometimes when the configuration screen comes up the mouse doesn't work. This
is a configuration problem that can be fixed right here. The tab key moves the focus
from button to button. The button "in focus" will have an additional fine black line
around it. Normally the mouse option is in focus already, so the enter key brings up
the mouse configuration dialogue. Here the sub window of interest is the device
type list. Tab around the screen until the edit field is highlighted and type the
correct device (usually /dev/ttyS0), or use the scroll bar to move up and down the
list. Once the correct device is selected, tab to the "accept" button and press
enter. You should now have mouse control to continue the configuration.

Once the configuration is complete and the remainder of the packages have been
configured, xdm can be used to start the server for the new X-Window installation.
Startx or xinit can also be used for this purpose, but xdm gives more access
control and allows protection from a user shutting down the server (xdm will
automatically start a new one).

There are several different ways to configure the X-Window environment, depending
on what functionality is desired. The best place to learn more about XFree86 is
from the HOWTO. Debian collects the HOWTOs and FAQs in the directory /usr/
doc on an installed system. This is also the place to look for information on the
packages that are installed on the system after the man page and info pages have
been exhausted. Obviously none of this is available until after the system has been
installed. Although the HOWTOs are not generally available in a Debian Archive,
the Custom CD contains them in the directory doc/HOWTO to provide help before
the system has been installed. As these are formatted for UNIX systems the
carriagereturn/linefeed characters are different and the text may be hard to read on
a DOS machine. There is a program called cr in the tools directory of the Custom
CD. This program will convert UNIX carriage returns to DOS returns (or vise versa)
and can be used to "copy" any HOWTO file from the CD-ROM to the DOS disk for
proper viewing. To convert a file from UNIX to DOS the command looks like:

cr + /path to HOWTO on cd/some-howto c:/some path/some-howto
the DOS partition with proper carriage return characters.

For future reference, to convert a DOS format file to a UNIX format the command
looks like:

cr -/path to dos file/dos-file /path to unix file/unix-file
There are two versions of this program. CR.EXE is the DOS version, while cr is the
Linux version. The Linux version can also be found in the package, Seesat5.

X11 Installation

6 Networking with Debian

6.1 Introduction

Networking can range from two computers with a direct connection to each other to
the many computers at General Motors linked with each other through a variety of
methods. Connecting to other computers is wonderful, but even the setup of a
simple PPP connection to an Internet Service Provider can be frustrating. In one
chapter, all of the aspects of networking with Debian can't be addressed. There are
many books available about networking in addition to information on the Internet.
The focus here will be to complete a workstation Ethernet and/or PPP dial-up
connection.

Linux provides a variety of networking methods such as Ethernet, SLIP, PPP,
Arcnet and Appletalk. The setup of these will be left as a challenging exercise to
the reader. In either case there are a host of other sources for information on this
subject. Once a standard Debian system has been installed, there is a complete
set of FAQs and HOW-TOs in the directory, /usr/doc. A good starting point would
be the NET-2-HOWTO.gz file found in /usr/doc/HOWTO. This document has a very
good bibliography in the beginning, pointing to a wide variety of related HOW-TOs
that are very useful in understanding the situation. These HOWTOs are also
contained on the Custom CD in the directory, doc/HOWTO.
Many of these documents are available in HTML format on the Internet. For
instance the Ethernet-HOWTO is available at:

http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html
or you can browse the index at:
http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX-3.html
The details that can be found there may be helpful in making use of the information
that will be discussed in the following section.

6.2 Network Installation

The Debian Installation software provides for the configuration of the network as
early as possible in the process. This creates the potential for performing the
remainder of the installation from a network mounted device.

The network installation process is concerned with the construction of three
configuration files:

/etc/hosts
/etc/resolv.conf
/etc/init.d/network

It does so by collecting the following information:
Host Name
Domain Name
Full Name
IP address
Netmask
Network Address
Broadcast Address
Gateway Address
Nameserver Addresses

The Host Name is the name given to the machine, itself. The installation software
provides the name debian as the default value. Any "reasonable" string of
characters can be used as a host name, but normally this is intended to be
readable and should thus be a legitimate name. On some local area networks
these names are determined by the network administrator. In this case the name
will need to be supplied by the administrator.

The Domain Name is typically the name of the network (i. e. linuxpress.com) that
the machine is connected to. This will also be supplied by the network
administrator. If the machine connects to the Internet through an Internet Service
Provider (ISP) then the domain name is typically the domain of the provider.

The Full Name is constructed from the Host Name and the Domain Name. If the
machine is named fred and the domain is somewhere. net then the full name
becomes: fred.somewhere.net. This is the name that others will use when
attempting to contact this machine with telnet or ftp or any other remote login
client, so this represents the "complete address" of the machine in question.
Typically a "name server" is used to convert this "full name" into an IP address for
the site. When a site is not accessible with its full name, but is accessible by its
IP address, this indicates that the system being used has no DNS facilities
available or the IP address hasn't been registered through the Internic. Declaration
of these servers is done in /etc/resolv.conf and will be discussed in detail later in
this section.

The IP Address that corresponds to the Full Name is a string made up out of the
numbers between 0 and 255 and the dot (.) character. A typical IP address has the
form: 192.64.1.1 and represents the "address" of the target machine. If your ISP
can provide "static" IP addresses, you will be able to declare the address that they
assign, at installation time. If your connection to the Internet uses dynamic IP
addressing, supply the address 0.0.0.0 as a value to fill the entry.

The Netmask is a string of bits used to determine whether a given address is on
the local subnet or outside of it. Debian installation assumes a class C network
and provides the default value of 255.255.255.0. This value is used to compute
several other addresses for the system. If the machine belongs to a broader (or
more restricted) network the system administrator will know the correct value to
provide for the netmask.
The Network Address, the Broadcast Address, and the Gateway Address are all
constructed from the machine IP Address and the Netmask. In our example above,
the Netmask of 255.255.255.0 "masked" (logical AND) against the IP Address,
192.64.1.1, gives the Network Address of 192.64.1.0. To obtain the Broadcast
Address, the Netmask is first inverted, to become 0.0.0.255 and a logical OR
performed with the Network Address, yielding a Broadcast Address of 192.64.1.255
for our example machine. The address of the machine on the local net that
connects to the rest of the Internet is know as the Gateway Address. These
machines are known as routers and typically are the first (but sometimes the last)
address on the local net. This would imply that our example IP address,
192.64.1.1, is that of a router. In this case the machine is its own gateway, which
is fine depending on your setup.

The last set of information involves Name Servers. When you can ping an IP
Address but can't ping the equivalent Full Name then there is a name server
missing or not configured. If the machine connects to the Internet via an ISP, then
they will provide the name server and will be able to declare the correct address. If
the machine is connected by Ethernet the local system administrator will provide
that information. The Debian installation will accept up to 5 name servers for entry
into /etc/resolv.conf to be used for name lookup.

The /etc/hosts file from our example above would look like:
127.0.0.1 localhost
192.64.1.1 fred.somewhere.net

While /etc/resolv.conf might look like:
domain somewhere.net
search somewhere.net
nameserver 192.64.1.1
nameserver 199.44.34.2

and, if there is an Ethernet card in the machine /etc/init.d/network might look like:
#! /bin/sh
# Configure the loopback device
ifconfig lo 127.0.0.1
route -add 127.0.0.1

# Configure the Ethernet device
ifconfig eth0 192.64.1.1
route -add net 192.64.1.0
route -add net 0.0.0.0 gw 192.64.1.1

If you still have questions about the correct values for the various addresses and
masks that will be requested during the installation ask the local network
administrator or your Internet Service Provider, depending on which provides the
Internet access for the machine.

6.3 PPP Configuration

If the target machine gains its Internet access using PPP rather than Ethernet,
there will be some configuration necessary before access to the Internet can be
established. The Debian Base System, comes with the PPP daemon installed, but
not configured. Once configured, a PPP connection can be used to complete the
installation, when necessary.

What will be described here is a simple connection to a service provider with no
special authentication. This is the most common connection method and should
work in most cases.

What You Need to Know:
From the Internet Service Provider:
The dialup phone number
The Login Name to use for the PPP connection
The account password
The IP address of the ISP's Name Server

The dialup number is not the same number you use to contact tech support or the
front office of your ISP. This is the number that they will provide for connecting to
their machine. The ISP will also provide you with a Login Name (possibly of your
choosing) and a password to start with. This password should be changed to
something else at the first opportunity.
The Name Server address will also be provided by the ISP upon request. This
address allows the system to convert domain names into IP addresses, so that
you will only need to remember something like ftp.debian.org, instead of
130.207.7.21.

With this information in mind, let's look at what files are necessary to complete the
configuration. The PPP daemon expects there to be a file in /etc/ppp called
options. This file is provided in the Base System with fully commented explanations
of all the entries provided. It will be a simple task to remove the comment mark (#)
from those options that are required for proper installation. This file can be
constructed from scratch as well, and should contain the following lines:

debug
/dev/ttySN (Where N is the number of the serial port of the modem)
38400
modem
crtscts
lock
connect /etc/ppp/ppp-connect
asyncmap 0
defaultroute

The 'debug' line causes the PPP daemon to log diagnostic information to the logs.
The connect line points to another file which must be constructed, and will actually
establish the phone connection for the PPP daemon. This connect script will use
the chat program, provided in the PPP package, and will automate the dialing
process for PPP. The simplest version of this file looks like:

#!/bin/sh
/usr/sbin/chat -v -t 60 -f /etc/ppp/ppp-chat

The -v option tells the chat program to be verbose in it's comments to the log file.
The '-t 60' option provides a 60 second window for the connection to happen
without causing chat to "time out" it's operation. The last option (-f) points t chat
program to /etc/ppp/ppp-chat, which will contain all the information necessary to
automate the dial up process for chat.

Networking with Debian
This file looks like:
ABORT "BUSY"
ABORT "NO CARRIER"
"" AT& F\r
OK AT& D2& C1\r
OK ATD555-5555\r
ogin: LoginName\r
sword: password\r

The first two lines tell chat under what conditions it should abort. The remaining
lines are composed of "expect" "response" pairs. Line three starts with "", which
means don't expect anything. The response string resets the modem to factory
defaults. The expected reply from the modem is "OK" to which the response is,
configure the modem to raise the Data Carrier Detect line when the call is
connected and to hang up the connection when the Data Terminal Detect line goes
low. This matches the "modem" option provided in /etc/ppp/options. The expected
reply is again "OK" to be followed by dialing the number for the ISP's modem.

Note: replace 555-5555 with the phone number provided by the ISP. Also, if you
have call waiting add '* 70, ' to the beginning of the phone number. This will disable
call waiting for this connection. The next two lines only contain the last few
characters of both the login: and the password: prompts. Sometimes the first
character doesn't show up and this allows for the correct response in that case.
The response to 'ogin: ' is to provide the Login Name that the ISP provided. The
response to 'sword: ' should be the password that was provided (or the one you
replaced it with) by the ISP as well.
Now there are three files in /etc/ppp. The options file, the ppp-connect file, and the
ppp-chat file. These files should all be owned by root and have the permissions set
to 600. To set these ownerships and permission use the following two commands
for each file:

chown root. root /etc/ppp/options
chmod 600 /etc/ppp/options

These changes should, of course, be made as root, or by using su or sudo to gain
root privilege.

One more step remains before the PPP connection can be established and be
useful. This step configures the Name Resolver for the system. The ISP will provide
the IP address for a Name Server that you can use. To take advantage of this
server, the file /etc/resolv.conf must be edited to contain the line:

nameserver nnn.nnn.nnn.nnn
Where nnn.nnn.nnn.nnn is the IP address provided by the ISP.
Once all of these files and changes are in place it becomes a simple matter to
start the PPP daemon. As root, or with root privilege provided by su or sudo, enter
the command line:

/usr/sbin/pppd
The daemon will then read all the lines in /etc/ppp/options and execute the cat
script to make the connection. It then obtains the IP address from the host,
creates the ppp0 device and configures it, creates the default route and then runs
in background mode for the rest of the session.

Networking with Debian

6.3.1 Verifying the Connection

The program ifconfig provides detailed information about the network configuration.
Executing this command will produce output similar to the following:

lo Link encap: Local Loopback
inet addr: 127.0.0.1 Bcast: 127.255.255.255 Mask: 255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU: 3584 Metric: 1
RX packets: 0 errors: 0 dropped: 0 overruns: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0

ppp0 Link encap: Point-Point Protocol
inet addr: 199.44.34.24 P-t-P: 199.44.34.10 Mask: 255.255.255.0
UP POINTOPOINT RUNNING MTU: 1500 Metric: 1
RX packets: 16517 errors: 0 dropped: 0 overruns: 0
TX packets: 14782 errors: 0 dropped: 0 overruns: 0

Because a PPP connection is a temporary condition, the machine has already
been configured for a local loop back device (this was done during the network
configuration phase of the installation) and it's condition is reported in the "lo"
section. The section starting with ppp0 gives the details of the PPP connection.
The inet address is the address of this machine, given to it by the IPS's host
machine. The P-t-P address is the address of the host machine itself. The last two
lines are of interest if the values for errors:, dropped:, or overruns: is something
other than 0. This will indicate some kind of problem with the connection. Under
these circumstances this is typically a noisy phone line or problems with either the
machine's modem or the ISP's modem. Looking into the log will sometimes help to
clarify the situation, but it often requires the cooperation of the ISP for proper
resolution.

At this point an attempt can be made to ping the service provider and the name
server provided. In the above ifconfig example the IP address of the host machine
is the same as the name server. This will not always be the case. To ping the
name server execute the following command:

ping 199.44.34.10
and something like the following output should be received:
PING 199.44.34.10 (199.44.34.10): 56 data bytes
64 bytes from 199.44.34.10: icmp_seq=0 ttl=255 time=1337.9 ms
64 bytes from 199.44.34.10: icmp_seq=1 ttl=255 time=1600.2 ms

The output can be terminated with Control-C. If you get any of the "64 bytes
from...." messages, then the default route has been established correctly and
access to the name server is available.

Another method of checking the default route is to use the route command as
follows:

route -n
which produces output like:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
199.44.34.10 0.0.0.0 255.255.255.255 UH 0 0 1 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 199.44.34.10 0.0.0.0 UG 0 0 6 ppp0

Note the last line, beginning with 0.0.0.0. This line declares the default route to be
199.44.34.10 and indicates that all is well. If this line is missing then there is no
default route and the name server will not be accessible. Check the options file and
make sure that the 'defaultroute' option is enabled.

Networking with Debian
At this point the connection has been established successfully. It should now be
possible to ping a site using it's domain name, such as:

ping sunsite.unc.edu
If this works, then all the other networking clients, like telnet and ftp, can provide
access to the rest of the Internet. The PPP connection is established and usable.

6.3.2 Shutting Down the Connection

When it comes time to disconnect from the service provider, it is simply a matter of
killing the pppd process. Do this as root, or with root privilege with the following
command:

killall -HUP pppd
and the ppp daemon will hang up the phone line and exit.


7 Compiling the Kernel

7.1 Hardware

The current 2.0. x Linux Kernels will still run on 386 based Intel PCs, as well as all
the subsequent CPUs of the 80x86 family from Intel. There are current, functioning
ports of the kernel to Sparc and Alpha machines as well as the m68k port to the
Atari and Amiga machines. With a proprietary micro-kernel there is even an m68k
version for the MacIntosh machines. A wide range of SCSI, IDE, and special CD-ROM
drivers are available with the "stock" kernel. As the kernel is the heart of a
Linux system, it is also the fundamental infrastructure of any distribution. Debian is
no different in this matter, and many times the flaws in the distribution can be
traced back to flaws in the kernel being used.

Debian became a full ELF compliant system with the release of 1.1 and it has not
changed the library infrastructure since then. There are a wide range of available
kernels that will work. When the stock kernel does not work with the hardware
configuration of the target machine, it becomes necessary to rebuild the kernel with
a new configuration that better suits the hardware situation. When this can't be
done with the current kernel, it is sometimes even useful to move to a newer, or
older, version of the kernel. A standard Debian system (all packages with priority of
Standard and higher) will have all of the development tools needed to perform the
construction and installation of a custom compiled kernel.
The less memory the machine has, the more difficult it will be to compile a kernel.
With as little as 8 Megabytes of memory, it is necessary to have at least a 20
Megabyte swap partition/file, but more memory will always improve this situation.
Any error complaining about the exhaustion of virtual memory can be fixed by
increasing the size of the swap-space.

swap-space All machines have a finite amount of Random Access
Memory. Without a method for dealing with this limited memory the system
would crash whenever available memory is exhausted. To resolve this
issue, the kernel "swaps" memory to disk when not in use, to free memory
for use by other processes. This requires a disk partition, or a file, that
has been specially formatted to deal with memory swapping.

7.2 Building the Kernel

The Debian system provides access to the kernel in several ways. There is a
separate Kernel Image package that will allow you to install a "pre-configured"
kernel image on the current system. There is also a Kernel Source package that
will allow the custom configuration of a kernel and build a Kernel Image package as
its output.

There are no preconditions in a Debian system that require you use these
packages. The kernel for a Debian system can be built without these packages
and will work just as well. A discussion of how to do this will be instructive to more
than just the paranoid individual who needs direct control over such important
matters as a kernel. The following section will first describe how to construct and
install a kernel without using the Debian packages, followed by a description of the
differences and advantages of using the Debianized versions. As there are trade
offs for either approach the choice of method will be dictated by local
considerations.

7.2.1 Non-Debian Kernel Construction

Sometime before the advent of the 2.0 kernel the old method of building the kernel
was abandoned. What was removed was the requirement that the kernel source
reside in a particular location in the file system. Every time you installed a new
kernel source it was necessary to remove and rebuild several links that pointed gcc
and others to the proper header files and assembly routines needed to compile
other programs as well as the kernel. At about the time that this practice ended,
Debian began to distribute Kernel Headers that were stable and always found at
these "predefined" locations. Thus satisfying the general need to compile
programs with kernel header information. Since the new kernel Make files are now
aware of the location of the kernel source tree (by doing a pwd early in the make
process) that tree can be located anywhere.

Debian follows the Standard on file system layout very closely, so you can be
assured that anything that you install in /usr/local will remain undamaged by any
actions of the Debian Package System. The following procedure will allow the
installation of kernel source; the compilation of that kernel source into an image
and modules; and the installation of that image and those modules in the current
system. Because the very few packages that depend on a particular kernel must
interrogate the system to determine the running kernel, the registration with the
packaging system of any given kernel is completely unnecessary.

The steps above will create a kernel source tree in /usr/local/source. This can, of
course be any other place in the file system that seems appropriate, and need not
be /usr/local/source. This is only one of several safe places you could put this tree.
Creating the target directory and the link to it from the linux directory allows for
future kernel source trees to also install here. Setting up the link to the target
before untarring the source files makes everything end up where it should, rather
than having to rename directories after the fact. The need for all of this stems from
the fact that the source tar.gz file unpacks itself into the local directory named
"linux". This can also cause problems if there is already a full directory named
linux. With the link, there is at least the chance of moving the link to a fresh
directory before unpacking new kernel source over the old.

If there are no patches to be applied to the source you are ready to build a kernel.
Begin by changing to the directory /usr/local/source/linux. What gets done next
depends on the state of the source tree and the desires of the builder. If the desire
is that the build process should start from the "pristine" source, sometimes referred
to as "distribution clean" then the first step is to do make mrproper. From here the
following steps are standard:

Configure the features of the kernel via:
make config
or
make menuconfig
or
make xconfig

then:
make dep ; make clean
make zImage
or if the image is larger than 1 Meg
make bzImage
then:
make modules
make modules_install

The major caution during the configure phase is: Make sure that devices needed
by the kernel, before the root file system is mounted, are always built in
and never made as modules.
Any other feature declared to be modularized in
the configure menu can be built as modules. Once the configuration phase is
complete, the rest of the steps should proceed with no errors. Use of make zImage
will result in the kernel image being placed in arch/i386/boot/zImage. The normal
place for this image is in /boot/vmlinuz<version>, where it can be accessed using
the link from /vmlinuz. The kernel image must be moved to /boot "by hand" and the
new link created in /vmlinuz. The system map file, System.map, found in /usr/local/source/
linux should also be placed into /boot with the version number appended.
Refreshing the link in /System.map to point to this new file will complete the setup.

If you use lilo for loading the kernel there are several steps necessary for safe
installation of the new kernel.

1. First copy the old kernel to /boot/vmlinuz.old
2. Next copy the new kernel to /boot/vmlinuz
3. Modify the link /vmlinuz to point to the new kernel
4. Modify lilo.conf to provide another tag
5. Run LILO

Simply copying the new kernel over the old, will not result in the desired effect.
Copying the old kernel to a separate location and copying the new kernel into the
old slot also doesn't quite get the desired result, even though this is the correct first
step.

Once the files have been moved, LILO still needs to be informed of the changes.
When LILO is run, it reads its configuration information from the file /etc/lilo.conf,
so, to inform LILO of the change in kernels it is necessary to edit/create this file. If
the file starts out like:

# /etc/lilo.conf --single Linux installation.
boot=/dev/hda1
root=/dev/hda1
compact
install=/boot/boot. b
map=/boot/map
vga=normal
delay=20
image=/vmlinux
root=/dev/hda1
label=Linux
read-only

then you need only add the following section:
image=/vmlinuz.old
root=/dev/hda1
label=Old
read-only

next, run lilo and the new kernel will be installed with access to the old kernel as a
fall back.

Debian kernels are built with all the SCSI low level drivers built in. This makes the
uncompressed kernel greater than 1 Meg, requiring the use of bzImage instead of
zImage. BzImages can sometimes cause problems for some hardware and for
some loaders. Loadlin has been known to have problems with these kernel images
in the past, although most of those difficulties have already been fixed.
If loadlin is used as the boot loader, then none of the above actions will make the
new kernel available. You must copy the zImage file to the file that is used on the
DOS partition as the kernel image file. If you use loadlin to boot the file linux from
your DOS partition, then you must copy the new kernel image into the file linux on
the DOS partition. Also make sure that make modules_install has been run, and
you are ready to reboot the new kernel.

If you boot from a floppy, then mount the floppy as a DOS disk, and copy the
kernel image file from /arc/i386/boot/zImage to the file linux on the floppy. This is
the kernel image file on the boot floppy and replacing it with the new kernel image
will allow the system to boot under the new kernel.

7.2.2 Debian Kernel Construction

The kernel for Debian comes prepackaged as a kernel-image-<ver>_<ver>.deb file.
Installing this with dpkg or dselect will deliver a pre-compiled kernel of that version
to the system. In many cases this is perfectly adequate and results in a new
functional kernel with little effort. When this fail to be adequate to the needs of the
system there is a kernel-source package to help resolve the problems.

Installing the kernel-source package with either dpkg or dselect will result in the
kernel source being unpacked into /usr/src/linux via a linux symlink similar to that
used in /usr/local/source to link the linux directory to the correct kernel-source-<
version>. There is also the file .linux-versions placed in /usr/src. This file contains
a list of all the kernel source and kernel header packages that have been installed
on the system. The reason the version number is embedded into the package
name is to allow more than one version of kernel source (or header or image) to
reside on the system at the same time.

If you have installed all of the tools needed to build a kernel, in addition to the
kernel-source package the kernel-package package must also be installed. This
package contains the scripts needed to build the kernel and make image, header,
and source packages. Once this package is installed the following results can be
obtained when make-kpkg is executed from the kernel-source directory:

make-kpkg build Will build a kernel.
make-kpkg binary Will make all the kernel packages.
make-kpkg kernel-image Will make only the kernel-image package.

If the intent is to construct a "custom" kernel, rather than just rebuild the delivered
one, then: make config (or one of its varieties) must be executed to re-configure the
kernel to the new requirements. Once this has been done:

make-kpkg kernel-image
will construct a kernel-image package that can be installed using dselect or dpkg.
This image package is only an advantage if LILO (or some other boot manager) is
used. If loadlin is being used to boot the kernel, then it will be necessary to move
the kernel image file by hand to its proper location.

Although the benefits may seem limited, use of the packaging system can make
life much easier. With the kernel this is not as necessary as it is with other
packages, so the decision is left to the system administrator as to how this issue
should be dealt with.

7.3 Modules

Sometime before the 2.0. x kernels, modularized drivers were first introduced into
the kernel. This was a pretty shaky interface at first, and some drivers worked very
well while others didn't work at all. By the 2.0 kernel the use of modules was a well
understood method. While there are still occasional problems associated with
modular drivers, this feature of the Linux kernel have become one of the stable work
horses of the present day operating system.

7.3.1 Advantages

Almost every driver can be built as a module. If the kernel was built with module
support and kerneld enabled, then most modules will not need any special entries
in the /etc/modules file. Kerneld will load them when they are needed and unload
them when they are not being used. Some modules need to be loaded and
initialized by the kernel before kerneld is started by init. There is a line in the
provided /etc/modules file, after the comments, that has been commented out. This
is the "auto" line. Removing the comment (# character) from the "auto" line, will tell
the kernel to load those modules automatically, without the aid of kerneld.
Some device drivers, like the low level drivers for specific SCSI cards, must be
installed explicitly. When a CD is mounted, the system (and kerneld) know that the
modules that support the SCSI device must be loaded. The kernel has no
knowledge of what card the machine has installed. This information is provided to
the kernel in the /etc/modules file. An Adaptec 1542 SCSI controller needs a line
added to the modules file (anywhere after the "auto" line) that declares this driver.
In this simple case the /etc/modules file might look like:

# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a `# ', and everything on the line after them are ignored.
#
auto

aha1542

This file will cause all the necessary modules that support the controller to be
loaded by kerneld, while the aha1542 driver is loaded at boot time and left loaded
until reboot.

The device driver that accesses the root file system must be built into the kernel or
the system will be unable to boot. If the device driver is a module, the kernel has no
driver to read the root file system, as this is where it expects to find the module for
that driver. This Catch 22 is, for instance, why the Debian installation kernel has
the MS-DOS FAT driver built into the kernel, rather than available in the modules
installation section. Because the rescue disk is an MS-DOS format disk the kernel
must have the FAT file system drivers already installed before it can read the root
file system off of the floppy (minix is also built in because the root.bin image file is
a minix file system).

Any devices the kernel will need before the root file system has been mounted, in
order to get to the point of having a mounted root file system, must be built into the
kernel. All other devices can be built as modules. The Debian installation kernel is
built in this fashion, making it possible to fit the installation into complex hardware
configurations where blanket support causes failures. With the recent growth in the
size of the kernel image this configuration allows the kernel to stay below the size
limitations of some boot loaders and still maintain the highest level of functionality.

Many of the configuration problems associated with device drivers involve finding
the correct set of options to pass when installing the driver.

Without modules each test would require rebooting the system in order to get the
newest test options to take effect. With the module utilities supplied with a Debian
system, a module can be unloaded with the rmmod command. The module's
options can be edited in /etc/conf. modules to reflect the new test values, and the
module reinstalled with insmod, all without rebooting the system!

With the use of kerneld, modules can be loaded and unloaded as needed. When
no access has been made to the VFAT file systems for awhile, kerneld will unload
the module and free up the memory it used. If, by chance, there is the need to read
that VFAT file system in the future, the request to the kernel will trigger the loading
of the required module by kerneld. In this way the kernel only takes up as much
memory as it actually needs to continue with operations while maintaining the
capability of accessing a wide variety of devices and systems.

7.3.2 Disadvantage

If a driver file in /lib/modules/<version>/<device-type>/*. o is either corrupted or
removed, the system can find itself without critical resources. This can be fatal for
critical processes and possibly result in a system crash. Recovery is not always
obvious, but with a rescue disk the system can be rebooted and the state of /etc/
modules investigated. It is not always obvious that the problem is with the
modules. But, having a printed listing of the files in /etc/modules (along with their
file sizes) is a good tool to have in the recovery file folder when you start looking for
solutions to problems.
Modules also provide a potential security risk. Using the "exploit of the day", a
system cracker need only gain root access long enough to copy "his" version of
the system PPP module and provide an "undetectable" TCP channel into the target
machine with full root access. Any number of other drivers could be subverted in
this fashion. This makes security even more important with a modular kernel at the
heart of the system. Obviously the security hole is actually in the "exploit of the
day" and not in the modules as delivered. Protecting the system from attacks of
this nature is no more difficult than protecting from the "exploit of the day". Debian
and Linux have a continued focus on security. Security breeches are announced in
the appropriate newsgroups. Patches and their locations are announced as well.

Most important of the disadvantages of modular drivers and kerneld has to do with
timing problems and unusual hardware configurations. With some devices, under
certain load conditions, the time it takes kerneld to install and initialize the driver is
long enough for the device to time out, resulting in a failed installation. So, if an
FTP client calls for a network connection, and pppd isn't running, kerneld will kick
off the appropriate processes and, depending on configuration, dial the number and
establish the connection. In the mean time, however, the FTP client has timed out,
waiting for the connection. The solution here is to try again with the FTP client. By
this time the connection should be established and the connection will go through
with no delay. This is not the best example, since the time delays are very large for
a diald type ppp connection even when everything is compiled into the kernel. If,
however, this system did not time out the FTP connection without kerneld and
modules, it would be likely to do so under some level of system load because of
the additional time needed to load the modules from disk.

The other point has to do with special hardware configuration. If there is a modem
that uses a nonstandard interrupt for the given slot location, the system will install
the driver and configure it properly using setserial. However, if the driver isn't used
for several minutes, it will be unloaded. When the driver is next needed, kerneld will
load it, but knows nothing of the special configuration needs of the driver. This
results in the driver trying to use the wrong interrupt for that device, and failing. The
resulting symptom is that if the system establishes a PPP connection within the
first several minutes of operation, the connection will be made in the standard
fashion and work as expected. If, however, the system is allowed to sit quietly for
several minutes after reboot, the PPP connection will never get established. The
chat program (if that is how the connection is established) will time out waiting for
the first response from the modem because it isn't servicing the proper interrupt.
This can be fixed temporarily by issuing another call to setserial with the proper
interrupt value for the card. The better fix is to explicitly name the device driver in
/etc/modules. Adding serial to the list of modules in /etc/modules will cause the
module to be loaded by init and configured with setserial. It will also have the
beneficial side effect of causing kerneld to leave the module alone and never unload
it. Thus, the configuration initially provided for this driver remains unaffected and the
device continues to work properly.


8 What Next?

By now, if you have followed the directions provided so far, you should have a
Debian GNU/Linux system up and running. The next most obvious question is:
What do I do with it now that I have it running?

The answer is: First you must decide what the system is going to be used for.
In many cases, even a "private" workstation will have more than one user account
active on the machine. Even if the machine is not connected to the Internet or any
local net, there will be the need for more than one user account on the machine
from time to time, so there is good reason to understand how to manage such
accounts.

8.1 Managing many accounts

Your new Debian system was installed with a root account and one user account

of your choice. Even if you are the only one who will ever use the system, you will
find that having multiple accounts can be useful at times, if only to help keep
different projects separate. If the system is to be used by more than one person,
then the following information is of more than passing interest.

8.1.1 Adding a user

The Debian system provides the adduser program as the primary tool for managing
both user and system accounts. The simplest way to add the new user fred, is the
command:

adduser fred
adduser will choose the next available uid for fred, create a user and group with
that id, create a home directory named fred, copy /etc/skel into /home/fred, and
then ask for a new password for fred. While there are options that allow these
items to be specified on the command line, this simple command is the best way
to integrate a new user into the system.

If you use the --disabled-password option, the account will be created, but it will be
disabled until a password is assigned to fred. In this case, adduser will not request
a password at this time, and the passwd program must be used later to activate
the account. This allows you to set up all the users in a class, and then assign
them passwords as they come to you for them. This keeps the account from being
an entry point into the system for someone who finds the "master" list. Once a
password has been assigned to the user, they should be encouraged to change
their password immediately making the "assigned" password useless to an
intruder.

Finally, adduser will ask for the information to be presented when this account is
"fingered" by someone. finger is a program that searches (even over the net when a
different domain is specified) for the account specified, and returns the personal
information found for that account. adduser inserts the data into the entry in /etc/
passwd that it creates for fred. So, now if you finger fred you will see something
like the following:

Login: fred Name: Fred Smith
Directory: /home/fred Shell: /bin/bash
Office: 101, 555-1212 Home Phone: 555-5555
Never logged in.
No mail.
No Plan.

8.1.2 Removing a user

Just as you need to be able to add accounts to the system, it is also useful to be
able to remove accounts that are no longer needed on the system. Debian provides
the program userdel to remove a user account from /etc/passwd. With the -r option,
userdel will also remove the home directory for the account and all its contents.
So, to remove fred from the system and all the files from /home/fred use the
command:

userdel -r fred
The entry in /etc/group is not removed, and neither are any files on the system that
are owned by the removed account. When the uid gets reassigned to another
account, that account will end up owning those files. They should be removed by
hand, or have their ownership changed, which will be described later in this chapter.
Removing the entry from /etc/group will require root privilege and the editor of your
choice. Simply remove the line containing the account name, in this case fred.

8.1.3 Managing passwords

People forget things, like their password. It's human nature. So any system that is
used by humans must have a way of fixing the problem, but it must work in a
secure fashion. On a Linux system, like the Debian system you have installed,
passwords are kept in an encrypted form that is not easy to break. The only
recourse for the "loss" of a password is to create a new one for the account, and
the only account that can do this is the root account. The program that does this
is called passwd. Any user account can use this program to change the password
for that account, but only root can change the password on another account.

To change the password for fred enter the following command as root:
passwd fred
Unlike when a user executes passwd, when root executes it, there is no request
for the old password. This allows the password to be changed when the old
password is not known, but it will only work for the root account. passwd will ask
for the new password, and then ask for it again to verify correctness. Once the new
account has been given a password by root, the individual who will use that
account should use that password to log into the system and then use passwd to
change the password to something known to no one else.

In the case of fred, suppose the initial password #123fred is assigned the account.
Fred might then use this password to log into the system. Once the prompt
appears he only needs to enter:

passwd
The passwd program first asks for the old password. Fred then enters: #123fred.
passwd does not echo the characters typed at the prompt. This would provide
several ways to "steal" your password, including just looking over your shoulder as
you enter it.

Once passwd verifies that the password is correct, the new password is requested.
When it has been entered the new password will be requested again. If you can
type the same password twice, it is assumed that you can type it again whenever
you need to. This will fail if the two passwords don't match. This keeps the stray
character from becoming part of the password. Sometimes when you press the k
you wish to press you also press another by mistake. Since these keys are not
echoed to the screen, you get no feedback that this has occurred. By asking for
the password twice, these mistakes are filtered out. As a result, you may
sometimes be asked to try again, even when you thought you got it right. No
matter how clumsy you may be, passwd will let you keep trying until you get it
right.

Once Fred types his new, secret, password twice correctly, passwd makes the
entries that make that password the new one for this account. The password will
not change unless Fred, or someone with root privilege, changes it. This makes
the security of root privileges very important on a system with many users just like
Fred. Each of these users expect their files to be secure and unaltered by some
other user account, but surely know that they must rely on those with root
privileges to not abuse those privileges. This trust between the system
administrator (usually the only one with root access to the system) and the users
is a relationship of which some are very good and some can be overbearing.
However, the best administrator can have a password stolen, or otherwise
compromised. The person who would do so may not worry about the other peoples
files, making all precautions useless.

8.2 Managing Root Access

Aside from logging in as root, there are two different ways to grant a user account

the superuser privileges of the root account. Debian provides the two programs su
and sudo as ways to provide root access for non-root accounts.

8.2.1 su

The su program changes the effective uid of the account to that of another account.
In order to successfully change the uid, the password for that account must be
entered. For this reason, in order to use su to gain root access, you must know the
password of the root account. This means for each person who needs root access
with su, yet another person must know (and remember) the password for the root
account.

Now, if a user has their account password compromised, only that account is open
for illegitimate access. When the root password is compromised, the whole
system becomes vulnerable to attack. For this reason it is advisable to take more
care with the root password than with anything else. Giving that password out to
more than the System Administrator is begging for disaster.

So, what good is su? The safe usage of su is to use it to change from one user
account to another. You, of course, must know the password of the account you
wish to move to. This is sort of like logging into the other account, but with su the
environment of the old account is carried over into the new account session. This is
very useful if you have your user account set up with particular default environment
conditions, and wish to work under an account that is set up different.

8.2.2 sudo

To provide more control over what privileges are used by normal users, the sudo
command is provided. This program allows a permitted user to execute a
command (possibly several) as the root account. The users who may use sudo,
and the programs they may have root privilege for, are specified in the file /etc/
sudoers. The amount of power that can be given to a particular user account
ranges from ALL, which is equivalent to su, down to only allowing one single
command to be executed as root.

Beside the finer granularity of the permissions dispensed, sudo also has the
advantage of not requiring knowledge of the root password. To invoke sudo the user
must supply their own password, leaving the account security in the hands of the
person who uses that account. So, if we will to give fred the ability to shut down
the system, the /etc/sudoers entry would look like:

fred /sbin/shutdown -[ rh] now
In this way, a large variety of capabilities can be given to trusted users without
compromising the root password. Understand that sudo can be used to give a
particular user full root privilege, which is itself an avenue for a security breach if
the user account password is compromised. For this reason, it is advised that only
those commands that absolutely must be provided to the user be entered into /etc/
sudoers. This provides maximum functionality, with minimal security risk.

Obviously security is of varying importance, depending upon just what the system
is being used to accomplish. This does not mean that there are times when
system security can be ignored. Even a system that is completely disconnected
from a network can be subject to a security breach. More than that, most of the
security measures of interest have to do with protecting users from making
mistakes with files that do not belong to them. This keeps Joe from accidentally
deleting any of Fred's files, and both of them from accidentally deleting important
system files.

8.3 File Protection by Owner

It has been suggested that the system protects users from interfering with files that
aren't theirs. This is done using the permission bits and ownership information that
is kept by the system for every file in the file system. These permission bits
determine who may read, write, and execute the file. These permissions are divided
into owner, group, and others. If only the owner permission bits are set, then only
the owner may perform those functions on the file. Debian creates user accounts,
each with their own group, and defaults the umask value to 002, which causes all
files created, to have default permissions that match the user only, thus protecting
any files created by this user account from inadvertent tampering.

Only the owner of a file, or root, may change the ownership of a file. This is done
with the program chown to modify the ownership to be that of another user account.
If the file is permitted for read by others, then when Joe copies such a file from one
of Fred's publicly readable directories, the file copied into Joe's directory will now
be owned by Joe's user account. This give Fred the ability to let others use his
material without letting them change any of the original files. To prevent such "theft"
of a file, for material that is private, the permissions on the file need to be set to
restrict read permission for others.

The command chmod is used to change the permissions of files in the file system.
Only the owner (and root) may change the permissions on a file. If Fred wants to
keep the file private.txt from being read by others, he would enter the following
command:

chmod go-wxr private.txt
This removes all permissions from either group or others, to either write, execute,
or read the file private.txt. Now only the fred account can read, write, or execute
the file private.txt.

8.4 File Protection by Group

A second level of security, that allows more than one user account to access a file,
is the group permission. As previously pointed out, each user account is assigned
their own group, but that is not the only use for group permissions.

If there is a group of user accounts, all of which are working on the same document
project, it is possible to create a group, such as doc, and assign each user in the
project to that group. This new group is added to the /etc/group file by the adduser
program. To add the group doc the command would look like:

adduser --group doc
While it is also possible to declare a specific ID for this group, it is not generally
recommended. adduser will assign the next available ID to the group, and in most
cases, this is just what is needed. There are a number of default groups already
provided in /etc/group for those programs that are expecting particular gid numeric
values, so there should never be the need for a specific gid to be assigned to any
particular group.

Once the group has been created, adduser is again used to assign each user in
the documentation project to this new group. To add the fred account to this new
group, root would execute the following command:

adduser fred doc
Now any documents that Fred creates may be assigned to the group doc and have
its group permission bits set so that others in the documentation group can work
on that file as well. To do this for the file private.txt Fred would first issue the
command:

chown fred: doc private.txt
and then set the permission bits with the command:
chmod g=rwx private.txt
Now any member of the group doc can work on this file as well, but all others are
still restricted from even looking at the file. Thus the permissions bits, when
combined with file ownership and group information, can provide a great deal of
flexibility while still maintaining a level of security at the same time.

8.5 Mounting and Unmounting File Systems

Everything your Debian system will ever use is found on one file system or another.

When the system is first initialized, the kernel uses the file /etc/fstab to mount any
additional file systems needed. The root file system is mounted read only by the
kernel so it can read /etc/fstab. One of the things that this system file tells init is
which file systems need to be checked and in what order. Normally the root file
system is checked first, followed by any other file system that need checking. init
uses fsck to check the partitions it finds listed in /etc/fstab. After the file system
check is completed, the kernel remounts the root file system read/write and
proceeds to mount the other devices it finds in /etc/fstab.

If you want a device permanently mounted on the system, simply make an entry in
/etc/fstab specifying the mounting parameters and then execute the command:

mount -a
which causes all of the devices listed in /etc/fstab to be mounted.
Additional devices can be mounted and unmounted as needed using the mount and
umount commands. To mount an ATAPI/IDE CD-ROM on /dev/hdd use the
command:

mount -t iso9660 /dev/cdrom /cdrom
The device can be unmounted by either specifying the device or the mount point,
so either of the following commands will unmount the CD-ROM drive:

umount /dev/cdrom
umount /cdrom

8.6 Monitoring System Activity

One of the advantages of a multi-user, multi-process, operating system like Linux

is the ability to run many programs simultaneously, as well as handling multiple
users at the same time. Under these circumstances it is necessary to be able to
monitor the system for things like run away programs, and memory hogs, so that
these problems can be dealt with effectively.

8.6.1 Process Status

Executing the command ps returns a list of processes being run by the user
account that invokes the command. This list includes the process id, the command
that started the process, and the terminal type and number. Any process in the
list may be terminated using the kill command with the associated process id from
the list.

To see a list of all processes use the ps -a command. Unless done by the root
account, only the processes which belong to the user issuing the command may
be killed. The root account can kill any process on the system with kill -9
<process id>.

While the ps command includes a field for the status of the process, the only
process in a R( un) status is the process ps itself. All other processes are marked
S( uspended). Another to is required to get a real time picture of what these
processes are doing.

8.6.2 top CPU Processes

The system utility top provides a continuous, real time look at the system's
consumption of memory and CPU resources. It lists the most consumptive process
first, so finding that process that is gobbling machine resources is relatively easy.
top also displays: the total operations time for the system since the last reboot;
load averages; process counts for various states; the percentage of CPU time
broken down between user, system, nice, and idle; memory and swap space
usage; as well as the list of the processes using the largest amount of the machine
resources.

8.6.3 fuser: Who has it?

Sometimes, when an attempt is made to unmount a device, it is still in use by
another account. umount will report "device busy" under these circumstances. So,
"Who has it?", is the question which must be answered before that account can be
contacted and asked to relinquish the device. fuser is the answer to this question.

Assume that a CD-ROM device has been mounted and now the material has been
transferred, or installed, and it is time to unmount the device, but the unmount
command fails because the device is still busy. Very often the System
Administrator has forgotten that some virtual console has the current working path
somewhere on the CD. When memory doesn't resolve the issue it is possibly some
other process and user account that are using the device. The command:

fuser -muv /cdrom
will list each account using the device, along with the PID of the command that is
currently executing in that device path. Once the account is identified, a message
can be sent to the session indicating the System Administrator's desire to mount
something else on that device.

8.6.4 Who is logged on?

The command who will return a list of all the accounts currently logged into the
system, the terminal device being used, and the time of login. With the fuser
command we might learn that fred is the account using the /cdrom path. The who
command would then tell us fred is logged into terminal ttyS3. You can then send
Fred a message by typing the following:

ite fred ttyS3
How long do you need to use the /cdrom mount point?
I would like to mount a new CD.
<ctrl-D>

When the first line is entered, something like the following is printed at Fred's
terminal:

Message from root@your.machine.net on ttyp1 at 14: 52
This is followed by your message and terminated with an EOF on Fred's terminal.
Fred may then send a message back to you telling of his intention to comply.

8.7 Where is the printer?

The user who sends output to the printer may wish to know where the physical
printer is located in order to find the output. The System Administrator should be
able to point you to the physical printer, if that is the problem. So, how do I get my
output to the printer? Debian uses lpr to place print jobs in a queue so that the
printer daemon lpd can print it when the printer becomes available. The print
behavior is defined in /etc/printcap, and Debian installs this file with the default
printer configured as a generic dot-matrix printer. The file declares the port the
printer is connected to, among other things, and can be used to send plain ascii
text to most printers. If Fred wishes to see a printed listing of the file private.txt he
would enter the command:

lpr private.txt
If this is a busy system, Fred will not expect his job to print right away. He can
look at the position of his job in the queue using lpq to list the jobs waiting in the
print queue. This command lists the jobs in the queue, in the order they will be
printed. A job number is associated with each entry in the queue, and can be used
with lprm if it becomes necessary to remove a print job from the queue. Fred can,
of course, only remove his own jobs from the queue, while the root account can
remove any job found there.

If the file to be printed is more complex than simple ASCII text, then a filter will
need to be applied in the /etc/printcap file. Packages like magicfilter provide a
wide range of filters for most printers. These filters will allow you to print PostScript
files to a non-PostScript printer. In combination with programs like dvips (which
converts a dvi file to PostScript output) the output of almost any Linux file format
can be converted and sent to the printer.

8.8 Finding knowledge

In much of the above discussion there is only a hint of how some of the useful

programs work for you to make using a Linux system possible. The Debian system
comes with much "on-line" documentation. It is Debian Policy that every program
has a man page. In addition, many packages also provide info pages.

How does this help when you may not even know the command name? Linux also
provides the apropos command. If you give apropos a word, it will search certain
portions of the man pages looking for that word. For instance the command:

apropos printer
will produce output something like:
banner (6) -print large banner on printer
lpc (8) -line printer control program
lpd (8) -liner printer spooler daemon
lprm (1) -remove jobs from the line printer queue
pac (8) -printer/plotter accounting information
print (3ncurses) -ship binary data to printer
printcap (5) -printer capability data base

Thus apropos can lead you to the man page entry for the topic of interest. In the
previous list the command lpc looks interesting, and we didn't discuss it when
talking about printers. This program is mostly of interest to the System
Administrator, but that could be you, so take a look at the man page by entering
the command:

man lpc
The man program will format text to your screen through the pager assigned to that
task (usually more). man recognizes the PAGER environment variable, and will use
the pager defined by this variable. Many people prefer less to more as far as pagers
are concerned, they think less is better than more. If you only wish to set this for
your own account, add the following lines to your .bash_profile file:

PAGER=less
export PAGER

and the next time you login man will use less as the pager.

8.8.1 Additional info

All GNU software provides its documentation in the info format. This is normally a
different format from the man page, and uses a "menu" feature to allow pages of
related material to be "linked" together, allowing cross-references to be placed with
a page to provide broader discussion of the various topics. The info command will
also display the man page if there is no index to the keyword you supply. For
instance:

info lpc
will simply display the man page for the lpc program in much the same way that
man did earlier. On the other hand, if the command had been:

info diff
The format of the info page for diff will be printed to the screen. q will exit info, and
the man command with diff as the argument, will display the man page for diff,
which you will see is quite different. Some folks like the terse structure found in the
man pages, while others like the expansive discussion provided by the info pages.
Debian provides for both types of individual by providing both whenever possible.

8.9 Finding packages

Say, for example, you just heard about this really cool program, and you are pretty

certain that it is provided in the Debian distribution, but a man or info attempt fails
to provide any information. When you ask dpkg about the package, it says it isn't
installed! So now what do you do?

Debian provides two files which are useful for this purpose: Packages, and
Contents. The Packages file is usually located in the binary part of the archives,
while the Contents file is usually in the outer directory of the main portion of the
distribution. If you know the name of the package, then you can use grep to print
its entry in the Packages file. However if you only know the name of a program that
you are interested in, like fuser mentioned above, then the command:

grep fuser Contents
executed in the directory containing the Contents file, will tell us that /bin/fuser is
found in the package base/psmisc, in other words the psmisc package is located
in the section base, so it is most likely already installed on the system. ( base
packages are installed first) Checking with dpkg -s psmisc will indicate the status
of the package, and provide information about the maintainer as well as a
description of the package. If the package is not installed then the information from
dpkg will be quite useless, as it can only tell you that the package is not installed.
Once you know the package name, the Packages file can be grepped for the
necessary information. So, look for programs in the Contents file, and their
packages in the Packages file.

8.9.1 Searching the file system

When you work on a program source tree, or even just a collection of documents,
the editor you use may well make a backup copy of the file, so you can recover to
the last good version if the changes turn out to be really bad. When you are
finished with all the edits, it is useful to be able to remove all those backup files.
For instance joe adds the ~ character to the end of the file name, so the command:

rm `find ./-name "*~" `
will search all of the directories in the current path for file with a name that ends in
~ and provide those names as a list of files for the rm command. This is a very
useful method of using one command to produce output that is acted upon by
another command. In this case the accent character (`) is used to bracket the find
command which causes it to be executed, with the output from the find command
being used as the argument list for the rm command. Thus, each file found to end
with the ~ character is removed by the rm command.

A simpler use of the find command is to locate a configuration file on the system.
Thus, the command:

find printcap
will list:
/etc/printcap
as the location for that file. If you forgot where you saved that important file, find will
save the day. For more information on the find command, or any of the other
commands discussed above, see your friendly man and info pages. With a little
investigation you can learn all about the capabilities of your new Debian GNU/Linux
system.



Appendix 1: Common UNIX Commands

Introduction

This section covers most of the useful commands available on any UNIX operating
system. None of the commands are covered in great detail, but should give enough
information to be a useful introduction for those not familiar with the various UNIX
commands. For more details on these and other commands, there are two
standard commands for getting documentation on programs installed on the
system. The man command and the info command are the two major methods of
gaining this documentation. If information is desired for command foo, either man
foo or info foo will provide the available documentation. Not all packages provide
info pages, while many GNU packages don't provide man pages. Depending on the
program involved one or the other of these will be available. When the command is
unknown but some idea of functionality is known, a key word search can be done
of the man pages using the apropos command or man -k.
Note: The term program and command have been used interchangeably
in the previous discussion. This is because in UNIX, all executable
commands are, in fact, programs that execute to perform their various
tasks. Every program, and thus, every command, is documented in some
fashion or another within the system. In a Debian system each package
places its copyright, changelogs, and any additional examples or
documents into the directory /usr/doc/<package name> and is a good
place to start after you have exhausted the man and info pages.

chgrp

This command is used to change the group ownership of a file or files. The form
of the command is: chgrp <options> <group> <files>. The <group> will be
assigned to the <files> that are specified. As usual wild cards are permitted,
allowing multiple files to be specified. Several useful options are:

-c describe only the files who's ownerships have actually changed.
-f don't print error messages on unchanged files.
-R recursively traverse the sub-directories changing group permission on the
appropriate files.

Example:
chgrp -R dwarf /home/dwarf
Will change all of the files in all of the directories below /home/dwarf to belong to
the group dwarf.

See also:
chmod, chown

chmod

When it is necessary to modify the permissions on a particular file or group of files
this command is the one to use. It takes the form:

chmod <options> <mode> <files>

<mode> has the form: [ugoa...][[+-=][ rwxXstugo...]...][,...]
u the user who owns the file
g users in the files group
o other users not in the group
a all users
+ causes permissions to be added to those already present for the file.
-remove the specified permissions from the file
=make those permissions specified as the only permissions defined for the
file.
r read permission w write permission

x executed permission
X execute only if the file is a directory or already has permission for some user.
s set user or group id on execution.
t save program text on swap device
u set the permission to those of the user who owns the file.
g set the permissions to those of the group.
o set the permissions to those other than the group.

<options>
-c give a verbose reporting of only the files changed.
-r recursively change permissions of directories and their contents.
-f do not print errors about files that were not changed.


Example:
chmod g-w ./*
Will remove the group write permissions from all the files in the current directory.

See also:
chown, chgrp

chown

To change the ownership of a file or group of files the chown command is used.
This command has the form:

chown <options> [user][:.][ group] <files>

If only user is supplied, then the ownership of the file is changed to that user. If a :
or . is followed by a user name, then the ownership of the file is changed to the
specified user and the group is changed to the login group for that user. If
user: group or user. group is provided not only the ownership of the file is changed to
user, but the group assigned to the file is changed to group.

Files can be designated with wild cards so that a set of files can be changed at the
same time.

Several useful options are detailed below. See the man page for complete details:
-c describe only those files that have been changed.
-f don't print error messages when files can't be changed.
-R recursively change files in sub-directories.

Example:
chown fred ./document.1
will change the ownership of document.1 to user fred.

See also:
chmod, chgrp

cp

This command is used to copy files from one location in the file system to another.
The form of the command is 'cp <options> <from files> <to location> '. Wild cards
are permitted in the <from files> parameter. If this parameter refers to more than
one file, the <to location> must be a directory. There are a wide range of options for
this command. Several are listed here.

-a This option is the same as the -dpR and attempts to retain the permissions
and ownerships of the files being copied. This option is the best way to
"replicate" a file system on another partition, or to move a sub-tree from one
place to another without changing its permission structures.

-d Copy symlinks as symlinks rather than the file pointed to and preserve hard
link relationships between files in the copies.

-p Preserve the owner, group, permissions, and time-stamp found on the original
when making the copies.

-R Recursively copy all sub-directories and their file contents. This will allow a
complete limb of a file system to be replicated somewhere else in the file
system.

Example:
cp -a /home /mnt
will copy all of the files and directories in /home into the directory /mnt and will
maintain the permissions and ownerships of the files during the copy.

df

This command displays file system information for each device mounted on the
system. The information displayed includes the size of the partition, the amount
used, and the amount available. The device name and mount point are also
provided in this display.

Example:
df
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/hdb3 649339 396690 219108 64% /
/dev/hda1 1054176 784352 269824 74% /mnt/DOS
/dev/hdb1 649307 542629 73139 88% /mnt/image/1
/dev/hdb7 331767 180711 133922 57% /mnt/image/2
/dev/hdb5 347375 258195 71240 78% /Debian
/dev/hdb6 347375 303564 25871 92% /home
/mnt/a/deb.iso 617388 617388 0 100% /mnt/loop1
/mnt/image1/1.3.iso 540506 540506 0 100% /mnt/loop2

The order in which the file systems are listed, is the order that they were mounted.
Except for the last two entries, the above were all mounted by fstab at boot time.
The last two are loop mounted image files.

du

The du command reports the disk usage for the specified directory. The value
reported for each sub-directory and the total are given in blocks. Normally a block
is 1K.

Example:
du /lib
1 /lib/modules/2.1/fs
1 /lib/modules/2.1/net
1 /lib/modules/2.1/scsi
1 /lib/modules/2.1/block
1 /lib/modules/2.1/cdrom
1 /lib/modules/2.1/ipv4
1 /lib/modules/2.1/misc
8 /lib/modules/2.1
77 /lib/modules/2.0.22/block
55 /lib/modules/2.0.22/net
133 /lib/modules/2.0.22/scsi
321 /lib/modules/2.0.22/fs
45 /lib/modules/2.0.22/misc
635 /lib/modules/2.0.22
80 /lib/modules/2.1.5/block
58 /lib/modules/2.1.5/net
139 /lib/modules/2.1.5/scsi
335 /lib/modules/2.1.5/fs
48 /lib/modules/2.1.5/misc
477 /lib/modules/2.0.30/net
974 /lib/modules/2.0.30/scsi
265 /lib/modules/2.0.30/fs
245 /lib/modules/2.0.30/cdrom
228 /lib/modules/2.0.30/misc
2195 /lib/modules/2.0.30
3503 /lib/modules
5730 /lib

This declares /lib to contain 5730, 1k (1024 byte) blocks.

ls

This command provides information about the contents and permissions of files
within the file system. The bare command 'ls' will list the files in the current
directory. In addition to the many options that can be used with this command, the
last element on the command line can be a file or directory specification. Wild
cards are appropriate here, so 'ls m* ' will list all files in the current directory that
begin with 'm'. There are many options that can be used with the ls command. A
few of the more useful are:

-l display listing in the "long" format, giving file type, permissions, the number
of hard links, owner and group name, byte size, and the time stamp, by
default the modification time.

-a display all files, including those that start with the '. ' character.
-R give a recursive listing of the contents of all sub-directories.
--color-code files according to file type.
-S sort by file size
-r reverse the order of whatever sort has been chosen
ls -l /dev/l*

brw-rw----1 root cdrom 24, 0 Jan 17 09: 45 /dev/lmscd
srw-rw-rw-1 root root , 0 Jun 8 23: 49 /dev/log
crw-rw-rw-1 root sys 10, 0 Jan 17 09: 45 /dev/logibm
crw-rw-rw-1 root sys 10, 0 Jan 17 09: 45 /dev/logimouse
brw-rw----1 root disk 7, 0 Sep 23 1996 /dev/loop0
brw-rw----1 root disk 7, 1 Sep 23 1996 /dev/loop1
brw-rw----1 root disk 7, 2 Sep 23 1996 /dev/loop2
brw-rw----1 root disk 7, 3 Sep 23 1996 /dev/loop3
brw-rw----1 root disk 7, 4 Sep 23 1996 /dev/loop4
brw-rw----1 root disk 7, 5 Sep 23 1996 /dev/loop5
brw-rw----1 root disk 7, 6 Sep 23 1996 /dev/loop6
brw-rw----1 root disk 7, 7 Sep 23 1996 /dev/loop7
crw-rw----1 root lp 6, 0 Jan 17 09: 45 /dev/lp0
crw-rw----1 root lp 6, 1 Jan 17 09: 45 /dev/lp1
crw-rw----1 root lp 6, 2 Jan 17 09: 45 /dev/lp2
crw-rw----1 root lp 6, 3 Jan 17 09: 45 /dev/lp3

lists all the files in /dev that begin with 'l' and lists them in the long format.

mkdir

This command is used to create sub-directories within the file system. The
command expects at least a directory specification and has several options. The
most useful of which is:

-m mode This option allows the specification of permissions on the directory
being created

Example:
mkdir /mnt/DOS
will add the sub-directory DOS to the /mnt directory.

See also:
rmdir

mv

The move command (mv), like copy, is of the form: mv <options> <source> <dest>.
The <source> parameter can contain wild cards and when referring to more than
one file the <dest> must be a directory. Several options include:

-b make backups of the files to be removed.
-i prompt before removing files.
-v print the name of the files being moved.

Example:
mv myfile myfile.old
will move the file myfile to the new filename myfile.old.

rm

The remove command (rm) is used to delete files from the file system. After options
this command expects a file name. Wild cards are permitted here, so the
command can remove more than one file at a time. Several options for this
command are:

-r recursively remove files from sub-directories.
-f never prompt for files to remove and ignore nonexistent files.
-i prompt for each file before removing it.

Example:
rm -r /home/fred/*
will remove all the files in all the directories of /home/fred.

rmdir

This command is the reverse of the mkdir command. It causes the directory
specified to be removed. There is only one option for this command:

-p removes any parent directories that become empty by removing the specified
directory.

Example:
rmdir /mnt/DOS
will remove the sub-directory DOS from the path /mnt.

See also:
mkdir

Appendix 2: Text Editors

Introduction

Linux systems provide many different kinds of editors. Debian is no different. From
the tiny ae used in the base system, to the gigantic and powerful emacs, there are
all the editors you might expect to find in any UNIX, and then some. The following
section will give a brief description of two editors found in Debian. Each description
section will tell how to start the editor, how to save a file, and how to exit the editor.
Some of the primary edit features will also be discussed.

For more detailed information see the man pages and other documentation
provided with each of the editors.

ae

Anthony's Editor (ae) is an exceptionally small program (23.9K) that provides
basic edit capability for the base system. If you try to run vi in the base system, ae
will start in vi mode for those more familiar with that editor. Whether started as vi or
ae, the default condition for the editor is with the help screen visible. This is one of
the features that makes this editor so easy to use.

This release of Debian has changed the base packages from ncurses to slang,
because the library is much smaller, allowing other things to go on the boot file
system. To accommodate the new library constraints, and to give ae functionality
on many terminal types, the keybindings have been changed to be more like
emacs. Most keys are control keys, with some use of the escape key. For those
terminals without an escape key, <ctrl-[> will act as an escape.

All of the possible commands available in the editor are displayed on the screen.
<ctrl-X><ctrl-H> will toggle the help screen off and on to provide more screen area
for editing. When called using ae as the command, the standard commands are:

^X I Read a file into the editor.
^X^ S Write the contents of the editor to a file.
^@ Block select to cursor movement.
^W Cut selected block.
^Y Paste a cut block.
^X^ C Exit the editor only if file has been saved. Prompts to save file.
^Q Exit the editor without saving the file first. Discards changes

The behavior in vi mode can be a little different than normal vi because these
features are dealt with via macros, and thus are limited to what can be done in a
macro. For instance, to write the file and quit the normal vi command is ': wq<CR> ',
while in the ae version these must be entered as two separate commands:
': w<CR> ' followed by ': q<CR> '. In any case ae is the only editor available in the
base stem, so until the system is upgraded to "standard" there may not be an
editor available that is completely familiar. Ae is the compromise between size and
familiarity.

joe

Joe's Own Editor (joe) is a WordStar clone with all the features found in that
ancient piece of CP/M code. The control K sequences are the same as in the
original, so anyone familiar with WordStar can just use joe without thinking about
learning new commands. For those not familiar with this word processor the
following will be a good start:

^K H Toggle the help screen on and off.
^K D Save the current edit session.
^K X Save the current edit session and exit.
^K Z Suspend the editor for the shell.
^C Abort the current edit session. (don't save the file)

With the help screen you can find out how to select a block of text, move or copy
the block. Word search and replace are also available along with a spell checker.

When a file is saved with joe it automatically moves the original file to original-file-name~.
The ~ makes it easy to identify the backup edit session, but it only reflects
the last edit session, so older contents will be lost.

vi

One of the standard editors found on any UNIX system, vi is a modal editor that
provides many useful features. This section is not spacious enough to do justice to
vi's many features, so only the basic commands needed to do simple editing will
be covered here. A few of the more useful commands include:

:viusage<CR> Show a list of vi commands.
:exusage<CR> Show the list of ex commands.
:q! Unconditional exit back to the shell
:wq Write the file and quit
i Enter insert mode (character can only be entered when in input
mode)
<esc> Return to command mode.

Modal refers to the way that vi operates in different modes. When first invoked, vi is
in command input mode. The cursor can be moved around the screen, but any
other keys typed are expected to be commands. Some of those commands, like
the i command, switch the editor into text input mode. For the insert command, the
characters typed are inserted to the left of the cursor.

The escape key will return to command input mode, either from text input mode or
to abort a command in the middle. If you type several characters that do not create
a command, no other command can be entered until these characters are cleared.
The escape key returns to command input mode and clears the partial command.

emacs

emacs is another, larger editor that comes with most standard systems. It has
many features not found in other editors, not to mention a built in LISP interpreter.
Because of its many features, many of the emacs commands are multiple control
or escape sequences. Some of the more common are listed below:

^X^ C Exit emacs
^H^ T Presents a Tutorial on emacs
^H^ I Displays the GNU Info pages on emacs
^X^ S Save the current buffer to a file

emacs can be used to edit several buffers at one time, and provides many different
"source" environments helpful to creation of source code. These areas are far to
broad to be covered in these few paragraphs. The Tutorial is highly recommended
as a good way to get to know the features of emacs. The Info pages will give other,
useful information not found in the tutorials. Both of these should be enough to give
you a good feel for how this editor works, and what it can provide.
Page 226
226

Appendix 3: The Loop Device

The loop device is a device driver that allows an image file to be mounted as
though it were a normal block device. The question that immediately jumps to mind
is, "So, how do I use this beast?". As an example, let's look at mounting, and
examining the contents of, the rescue floppy image file.

First the CD-ROM, or other device containing this image file needs to be mounted
like:

mount -r -t iso9660 /dev/scd0 /cdrom
Note: The -r option declares the device to be read only. Also /dev/scd0
assumes the drive is the first SCSI device. If the machine uses a
SoundBlaster Pro/Creative Labs combo for the cdrom this device would
be /dev/sbpcd0 in stead. The other possibilities depend on the particular
interface being used.

If this is an "Official CD" that was mounted, the file of interest is found as:
/cdrom/debian/hamm/main/disks-i386/current/resc1440.bin
mount -t msdos -o loop /../../resc1440.bin /mnt
After this an ls of /mnt will show all the files that will appear on the floppy disk
when this image file is transferred to it. This is a "live" file system. That is, it can be
modified just like any other read/write file system mounted as a block device. The
changes made to the file system while mounted become part of the image file and
will be reflected on the floppy constructed from that image. Of course, in our
example the file image resides on a read-only medium so changes aren't possible,
but when the image file resides on a writable medium, like the hard disk, then
those kinds of changes become possible.

OK. We can mount such file systems, but how are they constructed in the first
place? This, of course requires a *nix environment. The tools are dd and losetup,
and the process goes something like this:

First it is necessary to create an empty file of the desired size. This is done with
dd and the zero device in a line like:

dd if=/dev/zero of=/../image. file bs=1k count=100000
This will create a file with 100 Megabytes of space. Note that the file size is
equivalent to the partition size when creating partitions on a block device like the
hard disk. This file will thus hold a file system that can reach 100 Megabytes in
size before "device full" errors occur.

Before a file system can be created on this image file and mounted, it needs to be
made to look like a block device. This is done with the losetup program in the
following fashion:

losetup /dev/loop0 /../image. file
There are 8 loop devices to choose from, so you may need to check to see if
a particular device is already in use. losetup /dev/loopN, where N ranges between 0
and 7, will return the status of the Nth loop device if it is mounted and will return an
error message if it is not.

Now that /dev/loop0 is a legitimate block device, mke2fs (or any of the other file
system creation utilities) can be used to create a file system on the looped image
file with a command like:

mke2fs -c /dev/loop() 100000
The -c option checks the device for bad blocks and the value on the end specifies
how many blocks are on the file system. These two options can be left off of the
command line and results will be seen faster, but there is no guarantee that the
resultant file system will be useful. Take the time to check for bad blocks. It is time
you will not spend looking for the cause of problems later. Once the file system
has been created, and a loop device associated with file, it can be mounted using
the following command line:

mount -t ext2 /dev/loop0 /mnt
When this is later unmounted make sure to release the device with the command
losetup -d /dev/loop1. Another alternative is to release the loop device as soon as
the file system creation is complete, and mount the file as in the previous example
with a command like:

mount -t ext2 -o loop=/../image.file /mnt
In either case this produces a "file system" mounted on /mnt that has 100
Megabytes of storage space. Whatever this file system is intended to contain can
now be copied, or untarred, or otherwise created on the new file system.

It should be evident that loop devices are very useful critters. The installation
software makes use of one to perform several sets in the Zero Floppy Installation
by mounting image files from the DOS partition, or CD, instead of requiring a floppy
disk to mount. This is not only faster, but physically easier than the floppy
installation method.
230

Appendix 4: Multiple OS Installation

There are different ways that more than one Operating System can reside on the
same machine. DOS and Windows can easily reside on the same machine with
Linux, and each can be booted at the choice of the operator. Windows 95/98 is a
little bit trickier since it demands its own boot manager. Installing Windows 95/98
after installing Linux will result in LILO getting "bumped off" the system. Installing
Linux AFTER Windows 95/98 will work. You will need to configure your Linux
system to be able to boot Windows 95/98 with LILO however.

LILO can be used as long as there is a Linux partition on the first physical drive.
With a modified boot record and LILO, the system can be made to boot either
Linux or DOS/Windows 95/98. There are other boot loaders available for Intel
machines. Most of these can be used to boot a variety of operating systems.
software can boot a kernel image from a DOS partition and mount any partition on
the system as the root partition for that kernel. For automatic operation, the best
method is to use the config.sys menu system in DOS to offer the choices of the
different OS available the machine. Then autoexec.bat can determine whether to
go ahead and boot DOS or run loadlin and boot Linux. The following example
should clarify this process:

config.sys:
[Menu]
menuitem=NewLinux, Linux 2.0.30
menuitem=OldLinux, Linux 2.0.27
menuitem=DOS
[DOS]
DEVICE=C:\DOS\SETVER.EXE
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH
FILES=30
STACKS=9,256
[NewLinux]
[OldLinux]

autoexec.bat:
cd \boot\linux
goto %config%

:DOS
cd \
C:\DOS\SMARTDRV.EXE
@ECHO OFF
PROMPT $p$ g
PATH C:\WINDOWS; C:\DOS
SET TEMP=C:\DOS

goto End
:NewLinux
loadlinx vmlinuz2 root=/dev/hdb3

goto End
:OldLinux
loadlinx vmlinuz root=/dev/hdb3

goto End
:End

Note that this system allows the root file system to reside on other area besides
the first device on the machine.

This process will work for Windows 95/98 as well as DOS/Windows and OS/2.

Appendix 5: Building Packages Files

Files with the extension .deb contain the packages managed by dpkg. For
information on how these packages are built, the programmer.html/ and policy.html/
directories will provide much useful information. These files are found on a Debian
system in the /usr/doc/dpkg.

What you need to build a Packages file:
1. Debian GNU Linux system with dpkg-dev installed.
2. A collection of .deb package files.
3. The override file for the distribution involved.

The Debian package dpkg-dev provides the script dpkg-scanpackages which is
used to produce Packages files. With this tool an arbitrary collection of Debian
binary packages can be converted into a "distribution". Normally the Debian
distribution resides in the sub-directories of the directory binary-i386. Many times
however, even with a "standard" archive of this distribution, the Packages file is not
in sync with the archive, and a new Packages file will be required. The proper
operation of dselect depends on an accurate and up-to-date packages file.

Another reason for building a Packages file relates to the construction of a
"custom" installation. Collecting a specific subset of the Debian distribution for
installation using dselect will require a Packages file for this subset. Once these
packages are collected into a sub-tree, a Packages file can be created.
The first parameter is the path to the archives while the second points to the
override file for the release being used. The 1.3 release is code named bo, while
the previous release was rex and the next one is hamm (all characters from the
movie "Toy Story"). These override files are found in the indices/directory of any
Debian mirror with the name override. bo or override. rex or override. hamm
depending on which distribution the packages came from. The command line would
look something like:

dpkg-scanpackages ./bo/binary-i386 ./indices/override.bo >Packages
and will run for quite some time. Upon completion the script will print information
about any differences found between packages and information found in the
override file. This is typically caused by the fact that the maintainer changed and
the override file does not reflect the new maintainer. These errors are never a
problem to the correct operation of the Packages file, but are informative only. The
final information provided by the script gives the total number of packages added to
the Packages file. A copy of this file along with a gzipped copy should be placed in
the outer directory of the distribution tree. For the standard distribution the
packages file goes into .../binary-i386. When a group of packages are collected
into one directory that is the directory where the Packages and Packages.gz files
should be placed as well. Once this has been accomplished the distribution is
ready to be installed using dselect.

Appendix 6: Linux as a Server

One of the many versatile features of Linux is its ability to act as a server in various
network environments. Linux, and therefore Debian, provide features that allow it to
act as a server for Windows and Windows 95/98 machines. It can also act as a
server for an Appletalk network, or even Novell network.

SAMBA is the name of the software that provides the tools for serving Windows
machines. A very comprehensive discussion of this tool can be found at:

http://lake.canberra.edu.au/pub/samba
There is also a HOWTO that can be found at
http://www.interweft.com.au/other/samba/smb_se.html
as well as a FAQ that can be found at:
http://sunse.jinr.dubna.su/local/samba/samba.faq.html
Appletalk, the Macintosh network protocol, can be supported by the kernel if the
proper appletalk. o module is provided, or compiled into the kernel. This network is
also called netatalk and a HOWTO can be found at:

http://thehamptons.com/anders/netatalk
Information on how to set up netatalk on MKLinux can be found at:

http://www.primate.wisc.edu/people/debois/mklinux/netatalk-setup.html
Linux can even act as a server on a Novell network. The kernel needs to have IPX
support compiled in, or as a module. For more information see

http://electron.phys.dal.ealmini/HTTP+Netware
or
http://www.inet.co.th/cyberclub/karnedp/http-4.html
The IPX module is also discussed in the Modules HOWTO which can be found at
http://linuxwww.db.erau.edu/ldp/HOWTO/Module-HOWTO-s.html
or at most mirrors of the Linux Documentation Project.
All of the above sites were found using one of the many search engines that the
Internet provides. If you point your browser at:

http://altavista.digital.com/cgi-bin/query?pg=aq
the first blank is for a list of keywords with logical operators that define the way
they are selected. The real power of this page is the second field for Result
Ranking Criterion. Key words in this list are used to bring more likely hits to the top
of the list. This is very useful when your keywords return 2,000 hits.

There are many other search engines available on the net. Using the above site and
the keyword "search engine" produces 500,000 hits, so choices for Result Ranking
Criterion can be very useful.

Appendix 7: Arguments

The kernel accepts arguments of the following form:
no387=
This argument tells the kernel not to use the math co-processor, even when
present. The kernel must, of course, be compiled with math emulation support for
this to work.

root=
Tells the kernel which partition to use as the root device. This value can be entered
as a text string, like /dev/hda4, or as the major/minor number for the device, which
for hda4 is "0x304" for major 3 and minor 4. fsck has been run. This argument can
be set with rdev.

debug=
Under normal circumstances the kernel logs only those messages of debug level 7
or below to the console. Using this argument will send all debug messages to the
console. Klogd also has options that it will accept to modify what debug level will
get logged. See the man page for details.

reserve =
Protects various i/o ports from being probed. It takes the form:
reserve=iobase, extent[, iobase, extent]... and will keep one device driver from
probing sensitive ports on another card. Since that card will eventually need to be
initialized by its own driver, this command is usually used in conjunction with
another. If the device foo is caused to lock up by a probe from another device, the
argument list would look like:

reserve=0x300,32 foo=0x300

This will keep all other device drivers from probing 0x300 while allowing the drive
that uses that port to be properly initialized.

ramdisk=
This argument tells the kernel how big a ramdisk to create. To put a file system
from a floppy into ramdisk would require an argument like: ramdisk=1440. Note
that the units of size for this argument is kilobytes. This is one of the few
parameters that can be set in the kernel using rdev.

mem=
Since the BIOS of most PCs can only report 64 Megabytes there are times when
the kernel needs to be told that there is more memory than this. This argument
should be used with great care, since, if you lie to the kernel and tell it that it has
more address space than it actually has, the system will crash miserably at some
time in the near future. Also make sure that your system does not use the highest
memory for caching the bios code, as use of this memory by the kernel will
ultimately crash the system as well. The value given after the equal sign should be
the highest ram address available to the kernel, so a 96 Megabyte system would
get an argument like 'mem=0x6000000'.

SCSI device arguments
General Notation
iobase
The first I/O port that the SCSI device occupies, normally between the values:
0x200 and 0x3ff
irq
The hardware interrupt that the SCSI card is configured to use.

scsi-id
The host adapter's ID on the SCSI bus. Some adapters allow this value to be
changed but most don't. Many adapters use ID of seven, however, the Seagate and
Future Domain TMC-950 cards used ID of six.

parity
Specifying a 1 tells the card to expect the SCSI devices to report parity. Setting
this to 0 has the opposite effect. As with the scsi-id not all adapters accept this
argument.

SCSI argument list
max_scsi_luns
Some SCSI devices are poorly designed and will lock up when probed for LUNs
(Logical Unit Numbers) other than zero. As the kernels now default to only probe
LUN 0, this argument allows for the probing of other LUNs as well.

st=
This is used to configure SCSI tape devices and has the form:
st=buf_size[, write_threshold[, max_bufs]]

buf_size:
The value is given in units of Kilobytes with the default value of 32 and a max value
of 16384.

write_threshold:
Is the size of the buffer that will commit a write to tape and defaults to 30
Kilobytes.

max_bufs:
Normally defaults to 2 but the proper number depends on how many devices are
present.
aha152x=iobase[, irq[, scsi-id[, reconnect[, parity]]]]
These values are as described earlier and are order dependent, so to specify parity,
the rest of the parameters must appear on the line. If the reconnect value is
nonzero the device will be allowed to disconnect/reconnect.

aha1542=iobase[, busson, bussof[, dmaspeed]]
The iobase for this card is usually, 0x130, 0x134, 0x230, 0x234, 0x330, and 0x334.
Some clone cards provide other addresses as well. Busson and bussof specify the
time the card spends on and off the buss. Default values are 11us on and 4us off so
that other cards get a chance at the ISA buss. Dmaspeed refers to the rate at
which the DMA transfers proceed. The default value is 5 MB/s, although some
cards allow setting up to 10 MB/s, but care should be taken to make sure that the
machine is up to the task.

aic7xxx=extended, no_reset
A nonzero value for extended enables extended translation for large disks. A
nonzero value for no_reset tells the card not to reset the card at boot up.

buslogic=
The only parameter that this argument accepts is the iobase. The expected values
are: 0x130, 0x134, 0x230, 0x234, 0x330, and 0x334.

tmc8xx=mem_base, irq
The probe code for these Future Domain cards looks for a BIOS on the card. If one
is not found, or the signature is not recognized, this card will go unrecognized.
Specifying the mem_base address and the irq in this argument will force
recognition of the card. The mem_base address specifies the memory mapped I/O
region of the card and expects values: 0xc8000, 0xcc000, 0xce000, 0xdc000,
0xde000.

pas16=iobase, irq
This card uses the NC5380 SCSI chip and usually expects the iobase to be 0x388.
If the irq value is given as 255, then the card will operate without interrupts, at a
reduced capability.

st0x=mem_base, irq
This probe code also expects to find a bios and will not find the card if there is no
bios. This argument will force detection of the card. Mem_base is the memory
mapped I/O region of the card and uses values: 0xc8000, 0xca000, 0xcc000,
0xce000, 0xdc000, 0xde000.

t128=mem_base, irq
These cards also use the NC5380 SCSI chip and expects the following values for
mem_base: 0xc8000, 0xcc000, 0xd8000, 0xdc000.

The following cards do not accept arguments:
Always IN2000 Adaptec aha1740 EATA-DMA
EATA-PIO Future Domain 16xx NCR5380 (generic)
NCR53c7xx to NCR53c8xx Qlogic
Ultrastor Western Digital wd7000

Hard Disk Arguments
The hard disk arguments are used to do special setup on IDE devices. This
includes a number of CD-ROM devices as well as the normal hard drives. Drive
specific options have the form:

hda=, hdb=, hdc=, hdd=.

Non drive specific options have the form: hd=. This option can be used to specify
the next drive in the a, b, c, d order. Drive specific options can be used in place of
non-specific ones with the expected result. In the following discussion the hd=will
be used exclusively and can be replaced by any drive specific option that applies.

hd=cyls, heads, sects[, wpcom[, irq]]
This option is used to specify the physical geometry of the disk. Only the first three
parameters are required. The wpcom (write pre-compensation) parameter is ignored
by IDE devices. The irq value is the irq of the controller of the device and as such is
not strictly a drive parameter.
hd=serialize
Many of the older kernels had a broken CMD-640 chip driver design which resulted
in corrupted data when the second controller was operated at the same time as the
first. This option forces the driver to do sequential accesses rather than
simultaneous activity. You will only need to use this option if you have a drive
installed on the second IDE controller.

hd=dtc2278
If you have a DTC2278D IDE interface this option causes the driver to attempt to
enable the second controller as well as faster transfer options.

hd=noprobe If the machine has an old IDE drive that suffers from being
probed this option will keep that disaster from happening.
For example, if the drive is hdb then the following will allow
the drive to not be probed but also provide the drive
information for proper identification of the drive:
hdb=noprobe hdb=1166,7,17 will do the trick.

hd=nowerr As some drives appear to have the WRERR_STAT bit
permanently stuck. This option allows the drive to work
anyway.

hd=cdrom If there is an ATAPI compatible CD-ROM installed on one
of the IDE controllers and it is not recognized by the kernel,
this option will allow the kernel to recognize the drive.

xd=type, irq, iobase, dma_chan
If the system has an old 8 bit xt card, the driver probes the card for a BIOS. If none
is found, or the signature is not recognized, then the drive will not be recognized.
This option will allow the recognition to occur. Type specifies the card manufacturer
and has the values: 0=generic; 1=DTC; 2,3,4=Western Digital; 5,6,7=Seagate;
8=OMTI. Irq, iobase and dma_chan are all required parameters, so don't leave any
of them unspecified.
Other CD-ROMS
This section contains options for CD-ROM devices that are neither SCSI or IDE/
ATAPI devices.

aztcd=iobase[, magic_number]
The Aztech interface uses these options. If the magic number is set to 0x79 the
driver will continue to try to function even when the firmware version is unknown.
Any other magic number will be ignored by the driver.

cdu31a=iobase[, irq[, is_pas_card]]
This argument is used to configure the Pro Audio Spectrum cards as well as some
Sony supplied interface cards. Passing an irq value of 0 tells the driver that the
card does not support interrupts. If the card does support them you are encouraged
to use the interrupt, as it will ease the CPUoad. If the card is a Pro Audio
Spectrum then the is_pas_card parameter should be 'PAS'.

sonycd535=iobase[, irq]
Used by the Sony CDU-535 interface card, the iobase passed as 0 to act as a
placeholder when an irq needs to be specified.

gscd=iobase
Used by the GoldStar interface

mcd=iobase[, irq[, wait_value]]
Used by Mitsumi Standard interface cards, the wait_value is for devices that are
having trouble with time-outs, but should be used with care as some
implementations of the driver don't support this option. Whether or not it is
implemented depends on a compile time DEFINE.

mcdx=For the Mitsumi XA/Multisession Interface experimental
optcd=iobase The Optics Storage Interface uses this argument.
cm206=[ iobase][, irq]
Used by the Philips CM206 interface, this driver expects irq values between 3 and
11 and iobase values between 0x300 and 0x370, so these can be supplied in any
order, with either value missing. There is also the cm206=auto which tells the driver
to auto probe for the information.

sjcd=iobase[, irq[, dma_channel]]
This argument is used by the Sanyo interface card.

sbpcd=iobase, type
Used by the Soundblaster Pro interface card, the value of type can be: 0 for
LaserMate, 1 for SoundBlaster, 2 for SoundScape and 3 for Teac16bit. The iobase
is the base for the CD interface and not the sound card.

Floppy Drive Arguments
All of the information in this section can be found in README.fd in linux/drivers/
block. The following information is taken directly from this file.

Several points of interest include:
Using floppy=arguments on the command line as well as in the LILO config
file will result in the two arguments being concatenated.

The floppy=argument can be used with insmod, however the syntax is slightly
different.

For insmod the floppy=is only entered once with the parameters following it
in quotes as, ' floppy=" daring two_fdc" '.

floppy=mask, allowed_drive_mask and floppy=all_drives are obsolete and
should be replaced by: floppy=<drive>,<type>, cmos
Specifying a drive is mandatory when using more than 2 floppy drives, and sets the
CMOS type for <drive> to <type>, where the CMOS types are:

0 -Use the value found in the physical CMOS
1 -5 1/4 DD
2 -5 1/4 HD
3 -3 1/2 DD
4 -3 1/2 HD
5 -3 1/2 ED
6 -3 1/2 ED
16 -unknown or not installed

Note: Type 5 is for use with AMI floppy drives. Under other circumstances
this type was intended for use by floppy "tapes".

floppy=asus_pci
Sets the bitmask to allow only devices 0 and 1. This is the default.

floppy=daring
Indicates a "well behaved" floppy controller, which allows the driver to provide more
efficient and smoother operation and will speed up certain operations. However this
may cause failures on some controllers.

floppy=one_fdc
Tells the driver that you have only one controller. This is the default.

floppy=[ address,] two_fdc
Indicates to the driver that there are two floppy disk controllers and that the second
controller resides at address. If address is not entered then 0x370 is assumed.

floppy=thinkpad
Informs the driver that this is a Thinkpad and will deal with the inverted disk change
line used by these machines.

floppy=0, thinkpad
Tells the driver that this is not a Thinkpad.
floppy=omnibook
and
floppy=nodma
As the Omnibook has no workable DMA channel and other hardware deliver
"Unable to allocate DMA memory" error, this argument tells the driver not to use
DMA transfers with the drive. The machine must be at least a 486 to use nodma,
and the FIFO threshold should be set to 10 or lower to limit the number of data
transfer interrupts.

floppy=dma
Allows the driver to use DMA and is the default.

floppy=nofifo
Used to disable the FIFO entirely. If the Ethernet card or other device declares
"Bus master arbitration error" while using the floppy, you will need to use this
argument to disable the FIFO.

floppy=fifo
Enables the FIFO and is the default.

floppy=threshold, fifo_depth
This argument is relevant in DMA mode and sets the FIFO threshold. A higher
value allows the floppy driver to tolerate more interrupt latency, while generating
more interrupts. A lower value should lower the interrupt latency and produces
fewer interrupts.
This threshold can be tuned using the 'floppy control --messages' and then later
looking for 'Over/underrun -retrying' messages when accessing the floppy drive. If
there are a huge amount of these messages then the threshold is set to low. Set
the threshold value higher until you only see an occasional error message. Building
the kernel with the floppy driver as a module will allow you to remove the driver and
reinstall it with a different threshold value without the need to reboot the machine.
Remember to reissue the 'floppycontrol --messages' command after each reload of
the driver. Usually this "tuning" will not be necessary, as the default value of 0xa is
a reasonable value in most cases.

floppy=unexpected_interrupts
This argument causes a warning message to be printed whenever an unexpected
interrupt is received from the floppy. This is the default behavior.

floppy=no_unexpected_interrupts
and
floppy=L40SX
These arguments causes no message to be printed when an unexpected interrupt
in received. The IBM L40SX laptops have an interaction between certain video
modes and the floppy controller that result in unexpected interrupts. These
interrupts only effect performance and can be safely ignored.

Fdutils and mtools provide additional run-time configuration capabilities for the
floppy drive, including reading high capacity disks.
Any drivers not falling into the above categories will be found here.
ether=irq, iobase[, param1[, param2....[, param8]]], name
For configuring Ethernet cards. The various cards have differing parameters, but
they all require an irq and iobase address. The first, non-numeric value, is taken to
be the name of the device. This argument is typically used to force the detection of
a second Ethernet card, and, for that purpose, would look like: ether=0,0, eth1.
Note that 0 is again used as a place holder for this argument.

sound=device1[, device2.....[, device11]]
Provide a means to override the compiled in values. This is somewhat complex and
should be avoided if possible. The deviceN parameters are of the form 0xTaaaId
where the bytes are used as follows:

T -device type: 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16, 7=SB16-
MPU401
aaa -I/O address in hex
I -Interrupt in hex
d -DMA channel

Using a 'sound=0' disables the sound card all together.
busmouse=irq
Used by the busmouse driver.

Appendix 8: What is Free Software

The following definition of Free Software is copyright (c) 1997 "Software in the Public
Interest" and is printed here with the author's permission. The project participants
overwhelmingly voted to adopt this declaration on the 4th of July, 1997. What
follows is the entire document.

DEBIAN'S "SOCIAL CONTRACT" WITH THE FREE SOFTWARE COMMUNITY
We are Software In The Public Interest, producers of the Debian GNU/Linux
system. This is the " social contract" we offer to the free software community.

1. Debian Will Remain 100% Free Software
We promise to keep the Debian GNU/Linux Distribution entirely free software. As
there are many definitions of free software, we include the guidelines we use to
determine if software is "free" below. We will support our users who develop and run
non-free software on Debian, but we will never make the system depend on an item
of non-free software.
2. We Will Give Back to the Free Software Community
When we write new components of the Debian system, we will license them as
free software. We will make the best system we can, so that free software will be
widely distributed and used. We will feed back bug-fixes, improvements, user
requests, etc. to the "upstream" authors of software included in our system.

3. We Won't Hide Problems
We will keep our entire bug-report database open for public view at all times.
Reports that users file on-line will immediately become visible to others.

4. Our Priorities are Our Users and Free Software
We will be guided by the needs of our users and the free-software community. We
will place their interests first in our priorities. We will support the needs of our users
for operation in many different kinds of computing environment. We won't object to
commercial software that is intended to run on Debian systems, and we'll allow
others to create value-added distributions containing both Debian and commercial
software, without any fee from us. To support these goals, we will provide an
integrated system of high-quality, 100% free software, with no legal restrictions that
would prevent these kinds of use.

5. Programs That Don't Meet Our Free-Software Standards
We acknowledge that some of our users require the use of programs that don't
conform to the Debian Free Software Guidelines. We have created "contrib" and
"non-free" areas in our FTP archive for this software. The software in these
directories is not part of the Debian system, although it has been configured for use
with Debian. We encourage CD manufacturers to read the licenses of software
packages in these directories and determine if they can distribute that software on
their CDs. Thus, although non-free software isn't a part of Debian, we support its
use, and we provide infrastructure (such as our bug-tracking system and mailing
lists) for non-free software packages.
THE DEBIAN FREE SOFTWARE GUIDELINES
1. Free Redistribution
The license of a Debian component may not restrict any party from selling or giving
away the software as a component of an aggregate software distribution containing
programs from several different sources. The license may not require a royalty or
other fee for such sale.

2. Source Code
The program must include source code, and must allow distribution in source code
as well as compiled form.

3. Derived Works
The license must allow modifications and derived works, and must allow them to be
distributed under the same terms as the license of the original software.

4. Integrity of The Author's Source Code
The license may restrict source-code from being distributed in modified form _only_
if the license allows the distribution of "patch files" with the source code for the
purpose of modifying the program at build time. The license must explicitly permit
distribution of software built from modified source code. The license may require
derived works to carry a different name or version number from the original software.
(This is a compromise. The Debian group encourages all authors to not restrict any
files, source or binary, from being modified.)

5. No Discrimination Against Persons or Groups
The license must not discriminate against any person or group of persons.
The license must not restrict anyone from making use of the program in a specific
field of endeavor. For example, it may not restrict the program from being used in a
business, or from being used for genetic research.

7. Distribution of License
The rights attached to the program must apply to all to whom the program is
redistributed without the need for execution of an additional license by those
parties.

8. License Must Not Be Specific to Debian
The rights attached to the program must not depend on the program's being part of
a Debian system. If the program is extracted from Debian and used or distributed
without Debian but otherwise within the terms of the program's license, all parties
to whom the program is redistributed should have the same rights as those that are
granted in conjunction with the Debian system.

9. License Must Not Contaminate Other Software
The license must not place restrictions on other software that is distributed along
with the licensed software. For example, the license must not insist that all other
programs distributed on the same medium must be free software.

10. Example Licenses
The "GPL", "BSD", and "Artistic" licenses are examples of licenses that we
consider "free".

The concept of a Linux distribution stating its "social contract with the free software
community" was suggested to me by Ean Schussler. I composed a draft, and then
it was refined by the Debian developers in e-mail conference during most of June.
They then voted to approve it as our publicly stated policy. We hope that other
software projects, including other Linux distributions, will use this document as a
model. We will gladly grant permission for any such use.

Respectfully Submitted
Bruce Perens
Debian Project Leader
Index: --audit S3.3.3
--avail S3.3.2
--clear-avail S3.3.2, S4.3
--configure S3.3.1, S3.3.3
--help S3.3.5
--install S3.3.1
--license S3.3.5
--list S3.3.3
--listfiles S3.3.3
--merge-avail S3.3.2, S4.2
--pending S3.3.1
--print-architecture S3.3.5
--print-avail S3.3.3
--print-gnu-build-architecture S3.3.5
--print-installation-architecture S3.3.5
--purge S3.3.1
--recursive S3.3.1
--remove S3.3.1
--search S3.3.3
--status S3.3.3
--unpack S3.3.1
--update-avail S3.3.2
--version S3.3.5
.dpkg-dist S3.3.1
.dpkg-old S3.3.1
.linux-versions S7.2.2
.xsessionS5.2
/etc/group S8.1.2
[A] ccess S4.2
[C] onfig S4.2
[I] nstall S4.2
[Q] uit S4.2
[R] emove S4.2
[S] elect S4.2, S4.3, S5.2
[U] pdate S4.2, S4.3

A
Access option S2.2
adduser S8.1.1, S8.4
ae A2
Alpha S7.1
Amiga S7.1
Appletalk S6.1, A5
apropos S8.8, A1
Arcnet S6.1
Artistic A8
ATAPI S2.4, S2.5, S4.2
Atari S7.1
autoexec.bat S2.3.3, S2.9.7, A4
available S3.3.2, S4.2, S4.3

B
bad blocks S2.4
base floppies S2.3.2
base2_0.tgz S2.2, S2.3, S2.5, S2.6.3, S2.9.6
binary-i386 S3.3.2, S2.9.2, S4.2, A5
boot floppy S2.2, S2.3.3, S2.6.2, S2.4, S2.6.3, S7.2.1
boot loader S2.7
boot partition A8
boot-disk S2.3.2
boot/rescue S2.3, S2.3.2, S2.4, S2.5
Broadcast Address S6.2
Bruce Perens S1.1, A8
BSD A8
bug tracking S1.2
bzImage S7.2.1

C
cdrom S4.2
Cfdisk S2.4
chat S6.3, S7.3.2
chgrp A1
chmod S8.3, S8.4, A1
chown S8.3, S8.4, A1
color monitor S2.4
conf.modules A8
conffiles S3.3.1
config.sys S2.3.3, S2.9.7, A4
Configure the keyboard S2.4
configure-any S3.3.4
Contents S8.9
contrib S1.3, S3.3.2, S4.2
cp A1
CP/M A2
cr S5.2
Custom CD S2.6.3, S5.2, S6.1

D
dd S2.3.4, A3
Debian Archive S2.3.1
Debian Free Software Guidelines A8
debian-devel S1.3
debian-user S1.3
default route S6.3.1
defaultroute S6.3
Deity S1.1
dependency S1.3, S3.1, S4.2, S5.2
device driver S2.6.3, A7
df A1
dftp S2.9.2
diald S7.3.2
diff S8.8
disks-i386 S2.3.1, S2.3.2, S2.3.3
dmesg S2.6.2
DNS S6.2
domain name S2.4, S4.2, S6.2
DOS Boot Disk S2.3.3
DOS Installation S2.3
DOS rescue disk A8
downgrade S3.3.4
dpkg S8.9
dpkg-dev A5
dpkg-mountable S4.2

dpkg-scanpackages A5
driver disk S2.9.5
drivers S2.3, S2.3.2, S2.7, S7.3, S7.3.1
drivers disk S2.3, S2.4, S2.5
drivers floppy S2.3.2, S2.4, S2.5
du A1
dummy network S2.4
dvi S8.7

E
Ean Schussler A8
ELF S1.1, S7.1
Ethernet S2.2, S2.4, S2.9.2, S2.9.5, S2.9.7, S4.2, S6.1, S6.2

F
FAQ A5
fdisk S2.4
File System Standards S1.3
find S8.9
finger S8.1.1
floppy installation S2.3
fonts S5.2
Force options
Free Software S1.3, A8
Free Software Foundation S1.1
fsck S8.5
fstab S2.4, S8.5
FTP S2.9, S2.9.3, S4.2, S7.3.2, A8
ftp S2.9
ftp.debian.org S2.9.1, S6.3
Full Name S6.2
fuser S8.6.3, S8.6.4, S8.9
fvwm2 S5.2

G
Gateway Address S6.2
gcc S7.2.1
gid S8.4
GPL A8
graphics card S5.1, S5.2
Greenwich Mean Time S2.4
grep S8.9
group S8.4

H
Hard Disk S2.4
Hold S4.2, S4.3
home S2.4
host name S2.4, S6.2
hosts S2.4, S6.2
HOWTO S2.7, S5.2, S6.1, A5
HTML S1.4

I
Ian Jackson S1.1
Ian Murdock S1.1, S1.4
ifconfig S6.3.1
image file S2.3.3, S7.2.1, A3
Image Files/File Systems S2.3.1
incremental upgrades S1.3
indices A5
info S8.8, S8.9
info pages A1
init S7.3.1
installation floppies S2.3.1
Installation Program S2.3
installation software A8
Internet S2.3, S2.4, S6.1, S6.2
IP address S2.4, S4.2, S6.2, S6.3, S6.3.1
IPX A5

J
joe S4.2, A2

K
kbdconfig S2.4
Kernel Development Team S1.2
Kernel Headers S7.2.1, A8
Kernel Image S7.2, S7.2.2

Kernel Source S7.2, S7.2.1, S7.2.2
kernel-package S7.2.2
kerneld S2.4, S7.3.1, S7.3.2
keyboard S2.4
kill S8.6.1
Klogd A7

L
ld. so A8
less S8.8
libc5 S4.3
LILO S2.3, S2.4, S2.6.3, S2.7, S2.9.6, S7.2.1, S7.2.2, A4
lilo.conf S7.2.1
Linux File System Standards S1.3
Linux kernel S2.3
Linux partition S2.4
Linux Press S1.4
Linux Swap S2.4, A8
linuxpress.com S6.2
lmemroot S2.3, S2.3.2
lmemroot disk S2.3
lmemroot.bin A8
loadlin S2.4, S2.7, S2.9.7, S7.2.1, S7.2.2, A4
local distribution S4.2
localhost S2.4
Logical partitions S2.4
loop device S2.3.1, A3
losetup A3
lpc S8.8
lpd S8.7
lpq S8.7
lpr S8.7
lprm S8.7
ls A1, A3

M
Macintosh A5
magicfilter S8.7
mailing lists S1.3
Main Menu S2.2 make-kpkg S7.2.2
MAKEDEV S5.1
man S8.8, S8.9
man pages S8.8, A1, A2
methods S4.1, S4.2
Midnight Commander S3.3.3, S4.2
mkdir A1
mke2fs A3
MKLinux A5
modconf S2.4
module A5
modules S2.2, S2.3, S2.4, S2.6.3, S2.9.6, S7.2.1, S7.3, S7.3.1
monitor S5.1, S5.2
mount S8.5
mouse S5.2
Murphy S2.4
mv A1

N
Name Resolver S6.3
Name Server S6.2, S6.3, S6.3.1
Nameserver Addresses S6.2
netatalk A5
Netmask S2.4, S6.2
Netware A5
Network S2.2, S6.2, A5
Network Address S6.2
Networking S2.4, S5.2
NFS S2.4, S2.9.3, S2.9.5, S2.9.7, S4.2
non-free S1.3, S3.3.2, S4.2, A8
Novell A5
NSF S2.9.6

O
Official CD S2.2, S2.5, A3
olvwm S5.2
Operating System Kernel S2.2
OS/2 A4
override file A5

P
Packages S1.3, S8.9
Packages file S3.3.1, S3.3.2, S4.2, A5
PAGER S8.8
Partition a Hard Disk S2.4
partitions S2.4
passwd S3.3.1, S8.1.1, S8.1.2, S8.1.3
password S8.1.3
perl S2.9.3, S3.1
ping S6.3.1
PostScript S8.7
PPP S2.4, S2.9.2, S2.9.5, S4.2, S6.1, S6.3, S6.3.1, S7.3.2
Primary partitions S2.4
printcap S8.7
printer S8.7
ps S8.6.1

Q
quality assurance S1.1
Quick Start S2.1

R
RAM S2.4
RAM disk size A8
ramdisk A7
rawrite2.exe S2.3.2, S2.3.3
rdev S2.7.3
readonly S2.7.3
readwrite S2.7.3
remove-essential S3.3.4
remove-reinstreq S3.3.4
rescue disk S2.3, S2.9.5, S7.3.2
rescue floppy S2.3.2
resolv.conf S2.4, S6.2
rm S8.9, A1
rmdir A1
rmmod S7.3.1
root device S2.7.3, A7 root file system S2.3, S2.4, S2.6.3, S7.3.1, A4
root partition S2.4, S2.9.6
root privilege S3.2, S6.3
routers S6.2

S
samba A5
SCSI S2.4, S2.5, S2.6.3, S2.7, S4.2, S7.1, S7.2.1, S7.3.1, A7
search engines A5
Security S7.3.2
Select S2.2
serial S7.3.2
setserial S7.3.2
Sparc S7.1
stable S2.3.1, S3.3.1, S4.2
START. BAT S2.3.3
Startx S5.2
status S3.3.1, S3.3.3, S4.2, S4.3
su S3.2, S6.3, S8.2
subscription list S1.3
sudo S3.2, S6.3, S8.2.2
sudoers S3.2
superuser S8.2
swap S8.6.2
swap device S2.7.3, S2.9.6
swap partition S2.2, S2.4, S7.1
sweep rates S5.1
syslinux S2.9.7
System.map S7.2.1

T
telnet S2.9.2
testing S1.1
Thinkpad A7
thrashing S2.4
time zone S2.2, S2.4
top S8.6.2
tzconfig S2.4

U
uid S8.1.1, S8.2.1
umask S8.3
umount S8.5
Universal Time S2.4
UNIX S2.3, S5.2, A1, A2
unmount S8.6.3
unstable S2.3.1
Update S2.2
upgrade S4.3
Usenet S1.1
userdel S8.1.2
usr S2.4

V
vga16 server S5.1
video mode S2.7.3
vim S4.2
Virtual Console S4.2
virtual memory S2.4
vmlinuz S2.9.7, S7.2.1

W
web server S2.4
who S8.6.4
window-managers S5.2
Windows S2.3, S2.3.3, A5
Windows 95 S2.3, S2.3.3, S2.4, A4, A5
Word Star A8
write A1
www.debian.org S2.6.1

X
X-Window S2.3, S5.1, S5.2
X11 S4.3
xbase S5.2
Xbase-configure S5.1
xdm S5.2
XFree86 S5.1, S5.2 XFree86.config S5.2
xinit S5.2
Xservers S5.1

Z
zImage S7.2.1