Linux Press
1
1
Page 2
3
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
Distribution of the print version of this book must be arranged through
Although distribution of printed copies of this book are restricted,
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.
Linux Press.
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 bookshould 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.
2
2
Page 3
4
dedicated
to
Linux users everywhere
3
3
Page 4
5
4
4
Page 5
6
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
5
5
Page 6
7
6
6
Page 7
8
The Debian Linux User's Guide
ix
Table of Contents
1 Introduction 17
1. 1 History 17
1.2 The Debian Development Team 21
1.3 What Makes Debian Different? 25
1.4 How This Book Was Written 29
2 Installation 33
2. 1 Introduction 33
2.2 Quick Start 35
2. 3 Floppy Installation 39
2.3.1 Making Boot Floppies 42
2.3.2 Creating Floppies With DOS 43
2.3.3 Using RAWRITE2. EXE 44
2.3.4 Creating Floppies with Unix/ Linux 46
2. 4 Installation From Floppy 47
2.5 Two Floppies and a CD 85
7
7
Page 8
9
x
Table of Contents
2. 6 Zero Floppy Installation 89
2.6.1 What you will need 89
2.6.2 Getting Started 90
2.6.3 Installation 90
2.7 Forcing Hardware Detection 93
2.7.1 LILO 94
2.7.2 Loadlin 94
2.7.3 rdev 94
2.7.4 Argument Format 95
2.7.5 Usage 95
2.8 Bootable CDs 97
2.9 Installation Via FTP 99
2.9.1 General 99
2.9.2 Straight FTP 99
2.9.3 Installation using dftp 100
2.9.4 Dselect FTP method 100
2.9.5 Installation via NFS 101
2.9.6 Ethernet connected install 101
8
8
Page 9
10
The Debian Linux User's Guide
xi
2.9.7 PPP connected installation 102
2.9.8 Boot Managers supporting
Multiple Operating Systems 103
3 dpkg The Package Management Tool 107
3. 1 Introduction 107
3. 2 Running dpkg 109
3.3 Options Recognized by dpkg 111
3.3.1 Installation and Removal Options 111
3.3.2 Available Packages File Management 115
3.3.3 Package System Information 117
3.3.4 Force Options 124
3.3.5 Miscellaneous Options 126
4 Dselect 129
4. 1 Introduction 129
4.2 Using Dselect 131
4.3 Upgrading with dselect 143
9
9
Page 10
11
xii
Table of Contents
5 X11 Installation 147
5. 1 Introduction 147
5.2 Using Dselect 149
6 Networking with Debian 155
6. 1 Introduction 155
6. 2 Network Installation 157
6.3 PPP Configuration 161
6.3.1 Verifying the Connection 165
6.3.2 Shutting Down the Connection 167
7 Compiling the Kernel 169
7. 1 Hardware 169
7.2 Building the Kernel 171
7.2.1 Non-Debian Kernel Construction 172
7.2.2 Debian Kernel Construction 177
7. 3 Modules 179
7.3.1 Advantages 179
7.3.2 Disadvantage 181
10
10
Page 11
12
The Debian Linux User's Guide
xiii
8 What Next? 185
8. 1 Managing many accounts 185
8.1.1 Adding a user 186
8.1.2 Removing a user 187
8.1.3 Managing passwords 187
8.2 Managing Root Access 189
8.2.1 su 189
8.2.2 sudo 190
8.3 File Protection by Owner 191
8.4 File Protection by Group 192
8. 5 Mounting and Unmounting File Systems 193
8.6 Monitoring System Activity 194
8.6.1 Process Status 194
8.6.2 top CPU Processes 195
8.6.3 fuser: Who has it? 195
8.6.4 Who is logged on? 196
8.7 Where is the printer? 196
11
11
Page 12
13
xiv
Table of Contents
8.8 Finding knowledge 197
8.8.1 Additional info 198
8.9 Finding packages 199
8.9.1 Searching the file system 200
Appendix 1: Common UNIX Commands 203
Introduction 203
chgrp 205
chmod 206
chown 208
cp 209
df 210
du 211
ls 213
mkdir 215
mv 216
rm 217
rmdir 218
12
12
Page 13
14
The Debian Linux User's Guide
xv
Appendix 2: Text Editors 221
Introduction 221
ae 222
joe 223
vi 224
emacs 225
Appendix 3: The Loop Device 227
Appendix 4: Multiple OS Installation 231
Appendix 5: Building Packages Files 235
Appendix 6: Linux as a Server 239
Appendix 7: Arguments 243
Appendix 8: What is Free Software 257
Index 263
13
13
Page 14
15
xvi
Table of Contents
14
14
Page 15
16
The Debian Linux User's Guide
Acknowledgments
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.
15
15
Page 16
17
16
16
Page 17
18
The Debian Linux User's Guide
17
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.
17
17
Page 18
19
18
Introduction
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.
18
18
Page 19
20
The Debian Linux User's Guide
19
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.
19
19
Page 20
21
20
Introduction
20
20
Page 21
22
The Debian Linux User's Guide
21
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
21
21
Page 22
23
22
Introduction
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.
22
22
Page 23
24
The Debian Linux User's Guide
23
23
23
Page 24
25
24
Introduction
24
24
Page 25
26
The Debian Linux User's Guide
25
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 sndards for free distribution.
25
25
Page 26
27
26
Introduction
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-
26
26
Page 27
28
The Debian Linux Us er's Guide
27
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 qualityf 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.
27
27
Page 28
29
28
Introduction
28
28
Page 29
30
The Debian Linux User's Guide
29
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.
29
29
Page 30
31
30
Introduction
This b ook 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
30
30
Page 31
32
The Debian Linux User's Guide
31
31
31
Page 32
33
32
Introduction
32
32
Page 33
34
The Debian Linux User's Guide
33
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.
ø A small hand full of floppy disks.
ø A CD-ROM and 2 floppy disks.
ø A CD-ROM (or DOS ftp download) and a DOS bootable partition.
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.
33
33
Page 34
35
34
Installation
34
34
Page 35
36
The Debian Linux User's Guide
35
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.
ø If the machine will not boot the CD, boot DOS and change to the CD drive.
Use \boot\ boot. bat on the Official CD, to begin booting up the installation
kernel.
ø Set color or monochrome at the opening screen, read the intro, and proceed
to the Main Menu. Choose next to configure your keyboard.
ø Partition and/ or install a swap partition and, at minimum, a root partition.
These will be created and mounted at your direction by the installation
software. Repeat subsets of this step to create whatever other partitions are
necessary for the installation.
ø Install the Operating System Kernel and Module s from the CD, the hard disk,
or floppies, depending on which procedure is being followed.
35
35
Page 36
37
36
Installation
ø After the Modules have been copied into the target partition they can be
installed for use during the remainder of the installation.
ø Configuring the Network is provided next, so that the base system can be
obtained from a remote site if the machine has an Ethernet card installed.
This can be a many step configuration process, or, for CD installs to a stand
alone machine simply a matter of choosing the machine's name.
ø Installing the Base System can now be done from a variety of sources. From
the Official CD in the "Default Location", or from the Hard Disk, declaring the
correct path to the base2_ 0. tgz file.
ø Configuring the Base System is simply a matter of choosing the appropriate
time zone information. The rest of the information necessary for proper Base
System configuration haslready been collected.
ø Now the system is made bootable. Even if some other boot method is to be
used in the final system, follow that step with "Make Boot Floppy". Make a boot
floppy so you can be certain of booting your new system.
ø Reboot the system.
ø Give root a password, a user account with its own password and the rest of
the installation is begun when the install script runs dselect.
ø It is pretty easy to get a standard system using dselect. More complex package
management is possible with dselect, but usually not by the novice adventurer.
This piece of software should be your first serious candidate for study once
the system installation is complete.
36
36
Page 37
38
The Debian Linux User's Guide
37
ø From the dselect main menu choose the Access option. Here you can choose
from the CD-ROM, the Hard Disk, an ftp site, and nfs mount, or, heaven forbid,
floppies. Tell dselect where to find the Packages files and it's back to the
main menu.
ø First time in, either for a new install or for an upgrade from a new archive,
always choose Update from the menu next. This will update the available file
from the Packages files in the archive.
ø Skip Select, as the standard set of packages have already been pre-selected
for you, and go straight to Install. This process is fairly long and will ask some
questions near the end of the installation period. When this completes with
no errors it is time to quit dselect.
ø At this point a Standard installation has been achieved. Although you may
find packages that are not installed but are desirable and available in this
release. To install them, restart dselect (as root) and go back to the Select
screens. Now begin to learn about the heart of dselect. Pay close attention to
the help screens and don't follow your instincts.
ø Now the real fun begins!
37
37
Page 38
39
38
Installation
38
38
Page 39
40
The Debian Linux User's Guide
39
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 Whiptailpackage, 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.
39
39
Page 40
41
40
Installation
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.
40
40
Page 41
42
The Debian Linux User's Guide
41
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.ttempts 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.
41
41
Page 42
43
42
Installation
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.
42
42
Page 43
44
The Debian Linux User's Guide
43
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.
43
43
Page 44
45
44
Installation
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
44
44
Page 45
46
The Debian Linux User's Guide
45
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.
45
45
Page 46
47
46
Installation
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.
46
46
Page 47
48
The Debian Linux User's Guide
47
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.
47
47
Page 48
49
48
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.
48
48
Page 49
50
The Debian Linux User's Guide
49
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 Foundataion 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
49
49
Page 50
51
50
Installation
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
50
50
Page 51
52
The Debian Linux User's Guide
51
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
51
51
Page 52
53
52
Installation
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
52
52
Page 53
54
The Debian Linux User's Guide
53
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
53
53
Page 54
55
54
Installation
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 d irt 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.
54
54
Page 55
56
The Debian Linux User's Guide
55
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
cision 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
55
55
Page 56
57
56
Installation
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 an d 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
56
56
Page 57
58
The Debian Linux User's Guide
57
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 theunctionality 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
57
57
Page 58
59
58
Installation
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.
58
58
Page 59
60
The Debian Linux User's Guide
59
A few suggestions:
ø Create the root partition first, and make it a Primary partition.
ø Create the swap partition second. It too must be a Primary partition.
ø Create whatever additional Primary or Logical partitions are desired.
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.
59
59
Page 60
61
60
Installation
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
60
60
Page 61
62
The Debian Linux User's Guide
61
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 Intallation Main Menu |
There are "Linux native" and "Llinu swap" partitions
persent 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
perviously-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
61
61
Page 62
63
62
Installation
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
62
62
Page 63
64
The Debian Linux User's Guide
63
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 Manu |
There ar"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
63
63
Page 64
65
64
Installation
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
64
64
Page 65
66
The Debian Linux User's Guide
65
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 parti tions. (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
65
65
Page 66
67
66
Installation
Once all of the dered 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
66
66
Page 67
68
The Debian Linux User's Guide
67
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 boo ted
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.)
67
67
Page 68
69
68
Installation
Step 7
Configuring device drivers can be a crucial step in a floppy installation.
If the hardware includes either a modemseful 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.
68
68
Page 69
70
The Debian Linux User's Guide
69
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>
69
69
Page 70
71
70
Installation
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 idesired. 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
70
70
Page 71
72
The Debian Linux User's Guide
71
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
71
71
Page 72
73
72
Installation
There are three files that are created during this process that will be of interest
later. The first of these files, the /etc/ h osts 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
72
72
Page 73
74
The Debian Linux er's Guide
73
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.
73
73
Page 74
75
74
Installation
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
74
74
Page 75
76
The Debian Linux User's Guide
75
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
75
75
Page 76
77
76
Installation
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
76
76
Page 77
78
The Debian Linux User's Guide
77
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
77
77
Page 78
79
78
Installation
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
78
78
Page 79
80
The Debian Linux User's Guide
79
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
79
79
Page 80
81
80
Installation
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.
80
80
Page 81
82
The Debian Linux User's Guide
81
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.
81
81
Page 82
83
82
Installation
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.
82
82
Page 83
84
The Debian Linux User's Guide
83
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.
83
83
Page 84
85
84
Installation
84
84
Page 85
86
The Debian Linux User's Guide
85
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.
85
85
Page 86
87
86
Installation
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
86
86
Page 87
88
The Debian Linux User's Guide
87
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
87
87
Page 88
89
88
Installation
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
Ins tallation section (Step 10). The main portion of the installation may now
proceed.
88
88
Page 89
90
The Debian Linux User's Guide
89
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 -T 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.
89
89
Page 90
91
90
Installation
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.
90
90
Page 91
92
The Debian Linux User's Guide
91
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.
91
91
Page 92
93
92
Installation
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
floppie s as well.
92
92
Page 93
94
The Debian Linux User's Guide
93
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 li" 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/
scsi 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".
93
93
Page 94
95
94
Installation
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.
94
94
Page 95
96
The Debian Linux User's Guide
95
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).
95
95
Page 96
97
96
Installation
96
96
Page 97
98
The Debian Linux User's Guide
97
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.
97
97
Page 98
99
98
Installation
98
98
Page 99
100
The Debian Linux User's Guide
99
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
99
99
Page 100
101
100
Installation
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 deselect 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.
100
100
Page 101
102
The Debian Linux User's Guide
101
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 part icular
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.
101
101
Page 102
103
102
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.
102
102
Page 103
104
The Debian Linux User's Guide
103
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.
103
103
Page 104
105
104
Installation
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 i s 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.
104
104
Page 105
106
The Debian Linux User's Guide
105
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 infortion on
this boot loader.
105
105
Page 106
107
106
Installation
106
106
Page 107
108
The Debian Linux User's Guide
107
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
107
107
Page 108
109
108
dpkg The Package Management Tool
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.
108
108
Page 109
110
The Debian Linux User's Guide
109
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 obin 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.
109
109
Page 110
111
110
dpkg The Package Management Tool
110
110
Page 111
112
The Debian Linux User's Guide
111
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
111
111
Page 112
113
112
dpkg The Package Management Tool
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 th at 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 pkage 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
112
112
Page 113
114
The Debian Linux User's Guide
113
--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.
113
113
Page 114
115
114
dpkg The Package Management Tool
-r | --remove <package name>
This causes the package to be removed but leaves the conffiles installed. When a <