SSC is expanding Matt Welsh's Linux Installation & Getting Started by adding chapters about each of the major distributions. Each chapter is being written by a different author in the Linux community. Here's a sneak preview -- the Debian chapter by Boris Beletsky, one of the Debian developers. --Editor
Table of contents
META: I will not expand on system requirements here because this subject is surely covered in previous chapters of this book or in the "Linux Hardware Compatibility HOWTO" located at * http://sunsite.unc.edu/mdw/HOWTO/Hardware-HOWTO.html.
1.1 Getting floppy images
If you have access to the Internet, the best way to get Debian is via anonymous FTP (File Transfer Protocol). The home *ftp site of Debian is located at ftp.debian.org in /pub/debian directory. The structure of debian archive is built as following:
./stable/ (latest stable debian release) ./stable/binary-i386 (debian packages for i386 architecture) ./stable/disks-i386 (boot and root disks needed for Debian installation) ./stable/disks-i386/current (The current boot floppy set) ./stable/disks-i386/special-kernels (Special kernels and boot floppy disks, for hardware configurations that refuse working with our regular boot floppies) ./stable/msdos-i386 (dos short file names for debian packages)
For base installation of Debian you will need about 12 megabytes of disk space, and some floppies. First you will need boot and root floppy images. Debian provides two sets of installation floppy images, for floppy 1440 and 1200 floppy drives. Check what floppy drive your system boots from, (it is the A: drive under Dos) and download the appropriate disk set. Files in ./stable/disks-i386/current:
Filename Label Description rsc1440.bin "Rescue Floppy" Floppy set for systems with 1.44MB floppy drive and at least 5MB RAM. drv1440.bin "Device Drivers" base14-1.bin "Base 1" base14-2.bin "Base 2" base14-3.bin "Base 3" base14-4.bin "Base 4" root.bin "Root Disk" rsc1440r.bin "Rescue Floppy" Optional Rescue Disk image for low memory systems (less then 5MB of RAM) rsc1200r.bin "Rescue Floppy" Floppy set for systems with 1.2MB floppy drive drv1200.bin "Device Drivers" base12-1.bin "Base 1" base12-2.bin "Base 2" base12-3.bin "Base 3" base12-4.bin "Base 4" root.bin "Root Disk"
Choose the appropriate floppy set, corresponding to your hardware setup (Ram and floppy drive). What ever you choose, at the end you have to have 7 floppy images which contain, "Rescue Floppy", "Device Drivers, "Base 1", "Base 2" ..., "Root Disk". (Note, "Root Disk" image is the same for all drives and system types.)
1.2 Preparing the floppies
Next step is to prepare the floppies for the installation by copying the images into disks. Hence those files are disk images, they should be copied block-by-block. In Dos you can use the RAWRITE utility for that purpose located at * ftp://ftp.debian.org/pub/debian/tools/rawrite2.exe. Here is a brief explanation on how to use it:
C:\> RAWRITE2 <file> <drive>By executing the RAWRITE2 command as stated above, you will accomplish the following, the file "<file>" will be copied block-by-block into the drive "<drive>".
On any Unix like operation systems you can use dd(1):
# dd if=file of=/dev/fd0 bs=10kMETA: In some Unix systems the first floppy device maybe named differently.
When you finish rawriting don't forget to mark the floppies else you will get confused later.
1.3 Downloading the packages
In order to install and use Debian you will need more then the base system. To decide what packages you want on your system download the file 'Packages' from * ftp://ftp.debian.org/pub/debian/stable/Packages. This file is a list of Debian packages available for the moment in stable Debian distribution. This file comes in special format, evry package has it's own entry separated by a blank line, here is an explanation of each field in the package entry:
Package: The name of the package. Priority: The state of importance of the package. Required - Should be installed for system to work properly. Important - Not required though, important. Optional - Doesn't have to be installed but still useful. Extra - Package may conflict with. other packages with higher priorities. Section: This field declares a Debian section of the package. Base - base system. Devel - development tools. X11 - XWindows packages. Admin - administration utilities. Doc - documentation. Comm - various communication utilities. Editors - various editors. Electronics - electronics utilities. Games - games (you knew that didn't you?). Graphics - graphics utilities. Hamradio - utilities for internet radio. Mail - email clients and servers. Math - mathematics utilities (such as calculators, etc...). Net - various tools to connect to the network (usualy TCP/IP). News - servers and clients for internet news (NNTP). Shells - shells, such as tcsh, bash. Sound - any sound applications (such as, cd players). TeX - anything that can read, write, and convert TeX. Text - applications to manipulate texts. (such as nroff) Misc - everything else that doesn't fit in the above. Maintainer: The name of the person who maintains the package and his contact Email address. Version: The version of the package in the following format: <upstream-version>-<debian-version>. Depends: That field declares the dependency of the package with another one (or more), that means that this package can not be used or installed without the other packages listed in this field. Recommends: Another level of package dependencies. It is strongly recommended to install the packages listed in this field together with the package this entry entry describes. Suggests: Packages listed in this field maybe useful to the packages this entry entry describes. Filename: Filename of the package on ftp/cdrom. Msdos-Filename: Filename of the package in dos short format. Size: The size of the package after the installation. Md5sum: The md5sum check to be sure that this package came from us. Description: This field will tell you about the package (finally!), DO NOT download the package without reading it.
META: More detailed explanation on Debian packaging scheme you can find in section 2.1 of this chapter.
The above should give you an idea on how to build your personal download list. When you have the list of packages you want to download, you will have to decide how and when you want to download them. If you are an experienced user you may want to download the netbase package, and slip/ppp if needed, for later downloading from linux. Otherwise you can download all the packages from your current OS and install them later from mounted partition.
1.4 Booting from floppies and installing Debian GNU/Linux
You can do two things at the boot: prompt. You can press the function keys F1 through F10 to view a few pages of helpful information, or you can boot the system. If you have any hardware devices that aren't made accessible from Linux correctly when Linux boots, you may find a parameter to add to the boot command line in the screens you see by pressing F3, F4, and F5. If you add any parameters to the boot command line, be sure to type the word linux and a space before the first parameter. If you simply press Enter, that's the same as typing linux without any special parameters.
If this is the first time you're booting the system, just press Enter and see if it works correctly. It probably will. If not, you can reboot later and look for any special parameters that inform the system about your hardware.
Once you press Enter, you should see the message Loading..., and then Uncompressing Linux..., and then a page or so of cryptic information about the hardware in your system. There may be a many messages in the form can't find something, or something not present, can't initialize something, or even this driver release depends on something. Most of these messages are harmless. You see them because the installation boot disk is built to run on computers with many different peripheral devices. Obviously, no one computer will have every possible peripheral device, so the operating system may emit a few complaints while it looks for peripherals you don't own. You may also see the system pause for a while. This happens when it is waiting for a device to respond, and that device is not present on your system. If you find the time it takes to boot the system unacceptably long, you can create a custom kernel once you've installed your system without all of the drivers for non-existent devices.
During the entire installation process, you will be presented with the main menu. The choices at the top of the menu will change to indicate your progress in installing the system. Phil Hughes wrote in Linux Journal that you could teach a chicken to install Debian! He meant that the installation process was mostly just pecking at the return key. The first choice on the installation menu is the next action that you should perform according to what the system detects you have already done. It should say Next, and at this point the next item should be Configure the Keyboard.
The Partition a Hard Disk menu item presents you with a list of disk drives you can partition, and runs the cfdisk program, which allows you to create and edit disk partitions. The cfdisk manual page is included with this document, and you should read it now. You must create one "Linux" (type 83) disk partition, and one "Linux Swap" (type 82) partition.
Your swap partition will be used to provide virtual memory for the system and should be between 16 and 128 megabytes in size, depending on how much disk space you have and how many large programs you want to run. Linux will not use more than 128 megabytes of swap, so there's no reason to make your swap partition larger than that. a swap partition is strongly recommended, but you can do without one if you insist, and if your system has more than 16 megabytes of RAM. If you wish to do this, please select the Do Without a Swap Partition item from the menu.
The "Linux" disk partition will hold all of your files, and you may make it any size between 40 megabytes and the maximum size of your disk minus the size of the swap partition. If you are already familiar with Unix or Linux, you may want to make additional partitions - for example, you can make partitions that will hold the /var, and /usr, filesystems.
The swap partition provides virtual memory to supplement the RAM memory that you've installed in your system. It's even used for virtual memory while the system is being installed. That's why we initialize it first.
You can initialize a Linux Disk partition, or alternately you can mount a previously-initialized one.
These floppies will not upgrade an old system without removing the files - Debian provides a different procedure than using the boot floppies for upgrading existing Debian systems. Thus, if you are using old disk partitions that are not empty, you should initialize them (which erases all files) here. You must initialize any partitions that you created in the disk partitioning step. About the only reason to mount a partition without initializing it at this point would be to mount a partition upon which you have already performed some part of the installation process using this same set of installation floppies.
Select the Next menu item to initialize and mount the / disk partition. The first partition that you mount or initialize will be the one mounted as / (pronounced root). You will be offered the choice to scan the disk partition for bad blocks, as you were when you initialized the swap partition. It never hurts to scan for bad blocks, but it could take 10 minutes or more to do so if you have a large disk.
Once you've mounted the / partition, the Next menu item will be Install the Base System unless you've already performed some of the installation steps. You can use the arrow keys to select the menu items to initialize and/or mount disk partitions if you have any more partitions to set up. If you have created separate partitions for /var, /usr, or other filesystems, you should initialize and/or mount them now.
There is a menu selection for PCMCIA device drivers, but you need not use it . Once your system is installed, you can install the pcmcia-cs package. This detects PCMCIA cards automatically, and configures the ones it finds. It also copes with hot-plugging the cards while the system is booted - they will all be configured as they are plugged in, and de-configured when you unplug them.
You'll be asked to select your time zone. Look for your time zone or region of the world in the menu, and type it at the prompt. This may lead to another menu, in which you can select your actual time zone.
Next, you'll be asked if your system clock is to be set to GMT or local time. Select GMT if you will only be running Linux and Unix on your system, and select local time if you will be running another operating system such as DOS or Windows. Unix and Linux keep GMT time on the system clock and use software to convert it to the local time zone. This allows them to keep track of daylight savings time and leap years, and even allows users who are logged in from other time zones to individually set the time zone used on their terminal. If you run the system clock on GMT and your locality uses daylight savings time, you'll find that the system adjusts for daylight savings time properly on the days that it starts and ends.
If you are connected to a network, here come some questions that you may not be able to figure out on your own - check with your system administrator if you don't know:
Some technical details you might, or might not, find handy: the program will guess that the network IP address is the bitwise-AND of your system's IP address and your netmask. It will guess the broadcast address is the bitwise OR of your system's IP address with the bitwise negation of the netmask. It will guess that your gateway system is also your DNS server. If you can't find any of these answers, use the system's guesses - you can change them once the system has been installed, if necessary, by editing /etc/init.d/network .
If you are installing Linux on a drive other than the first hard disk in your system, be sure to make a boot floppy. The boot ROM of most systems is only capable of directly booting from the first hard drive, not the second one. You can, however, work around this problem once you've installed your system. To do so, read the instructions in the directory /usr/doc/lilo.
All of the passwords you create should contain from 6 to 8 characters, and should contain both upper and lower-case characters, as well as punctuation characters.
Once you've added both logins, you'll be dropped into the dselect program. The Dselect Tutorial is required reading before you run dselect. Dselect allows you to select packages to be installed on your system. If you have a CD-ROM or hard disk containing the additional Debian packages that you want to install on your system, or you are connected to the Internet, this will be useful to you right away. Otherwise, you may want to quit dselect and start it later, once you have transported the Debian package files to your system. You must be the super-user (root) when you run dselect. If you are about to install the X Window system and you do not use a US keyboard, you should read the X11 Release note for non-US-keyboard users.
This section will deal Debian packaging system and debian specific utilities. Ab ovo.
2.1 Debian packaging system and package installation utilities
Debian distributions comes in archives called packages. Every package is a collection of files (software, usually) that can be installed using "dpkg" or "dselect". In addition the package contains some information about it self that is read by the installation utilities.
2.1.1 Package Classifications
The packages included with Debian GNU/Linux are classified according to how essential they are (priority), and according to their functionality (section).
The "priority" of a package indicates how essential or necessary it is. We have classified all packages into four different priority levels:
Required packages are abbreviated in dselect as "Req".
Important packages are abbreviated in dselect as "Imp".
Standard packages are abbreviated in dselect as "Std".
Optional packages are abbreviated in dselect as "Opt".
Extra packages are abbreviated in dselect as "Xtr".
By default, dselect automatically selects the Standard system, if the user doesn't want to individually select the packages to be installed.
The "section" of a package indicates the functionality or use of a package. Packages on the CD-ROM and in FTP archive are arranged according to section. The section names are fairly self-explanatory: for example, the category admin' contains packages for system administration, and the category devel' contains packages for software development and programming. Unlike priority levels, there are many sections, and more will probably be added in the future, so we do not individually describe any of them in the manual.
2.1.2 Package Relationships
Each package includes information about how it relates to the other packages included with the system. There are four package relationships in Debian GNU/Linux: conflicts, dependencies, recommendations, and suggestions.
A "conflict" occurs when two or more packages cannot be installed on the same system at the same time. A good example of conflicting packages are mail transfer agents (MTAs). A mail transfer agent is a program that delivers electronic mail to other users on the system or to other machines on the network. Debian GNU/Linux includes two alternative mail transfer agents: sendmail' and smail'.
Only one mail transfer agent can be installed on the system at a time, as they both do the same job and are not designed to coexist. Therefore, the sendmail' and smail' packages conflict. If you try to install sendmail' when smail' is already installed, the package maintenance system will refuse to install it. Likewise, if you try to install smail' when sendmail' is already installed, it will refuse to install it.
A "dependency" occurs when one package requires another package to function properly. Continuing our electronic mail example, users read mail with programs called mail user agents (MUAs). Popular mail user agents include elm', pine', and Emacs RMAIL. It is normal to install several MUAs at once, so these packages do not conflict. But a mail user agent does not deliver mail--it uses the mail transfer agent to do that. Therefore, all mail user agent packages depend on a mail transfer agent.
A package can also "recommend" or "suggest" other related packages.
META: This section provides brief tutorial on Debian Dselect, for more detailed explanation please refer to Dselect Manual located at * ftp://ftp.debian.org/debian/Debian-1.2/disks-i386/current/dselect.beginner.6.html
Dselect is simple menu driven interface that will help you install packages. It is used to select packages you wish to install.
It will step you through the package installation process as follows:
The main dselect screen looks like that:
------------------------------------------------------------------ Debian Linux `dselect' package handling front end. 0. [A]ccess Choose the access method to use. 1. [U]pdate Update list of available packages, if possible. 2. [S]elect Request which packages you want on your system. 3. [I]nstall Install and upgrade wanted packages. 4. [C]onfig Configure any packages that are unconfigured. 5. [R]emove Remove unwanted software. 6. [Q]uit Quit dselect. ------------------------------------------------------------------
META: There are two ways of selecting the option from the menu, one is choosing it with arrows, another one is pressing the key in 's.
|cdrom||Install from a CD-ROM.|
|nfs||Install from an NFS server (not yet mounted).|
|harddisk||Install from a hard disk partition (not yet mounted).|
|mounted||Install from a filesystem which is already mounted.|
|floppy||Install from a pile of floppy disks.|
|ftp||Install using ftp.|
This is where you select the packages, choose your love and hit <Enter>. If you have a slow machine be aware that the screen will clear and can remain blank for 15 seconds so don't start bashing keys at this point. The first thing that comes up on the screen is page 1 of the Help file. You can get to this help by hitting ? at any point in the Select screens and you can page through the help screens by hitting the . (full stop) key.
To exit the Select screen after all selections are complete, hit <Enter>. This will return you to the main screen _if_ there are no problems with your selection. Else you will be asked to deal with those problems. When you are happy with any given screen hit <Enter> to get out.
Problems are quite normal and are to be expected. If you select package A and that package requires package B to run, then dselect will warn you of the problem and will most likely suggest a solution. If package A conflicts with package B (they are mutually exclusive) you will be asked to decide between them.
The screen scrolls past fairly quickly on a new machine. You can stop/start it with ^S/^Q and at the end of the run you will get a list of any uninstalled packages. If you want to keep a record of everything that happens use normal Unix features like tee or script.
META: This section provides a brief tutorial on Debian Dpkg program.
Dpkg is command line tool for installing and manipulating debian packages. It has several switches, which allow you to install, configure, update, remove and do other operations on debian packages (even build your own). Dpkg also allowd you to list the available packages, list files 'owned' by packages, find which package the file is owned by, et cetera.
# dpkg -i <filename.deb>where <filename> is the name of the file containing a debian package, such as, 'tcsh_6.06-11_i386.deb'. Dpkg is partly interactive; during the installation it may ask you additional questions, such as, wether to install the new version of a configuration file, or to keep the old one.
You may also unpack a package without configuring it: type:
dpkg --unpack <filename>If the package you are trying to install depends on a non-existing package or on a newer version of a package you have, or if any other problem occurs during the installation, dpkg will abort with a verbose error message.
To configure it, simply type:
dpkg --configure <package>where <package> is the name of the package, such as, 'tcsh' (which is not the same thing as a filename we mentioned above).
dpkg -r <package> dpkg --purge <package>Of course, if there are any installed packages that depend on the one you wish to remove, the package will not be removed, and dpkg will abort with a verbose error message.
dpkg -s <package>
dpkg -l [<package-name-pattern>]where <package-name-pattern> is an optional argument specifying a pattern for the package names to match, such as, "*sh". Yes, normal shell wildcards are allowed. If you don't specify the pattern, all the installed packages will be listed.
dpkg -L <package>However, it will not list the files created by package-specific installation scripts.
dpkg -S <filename-pattern>where <filename-pattern> is the pattern for the file to search for. Again, normal shell wildcards are allowed.
3.1 Debian community
Debian project was created by Ian Murdock in 1993, initially under the sponsorship of the Free Software Foundation's GNU project. Later, Debian has parted from FSF. Debian was created is the result of a volunteer effort to create a free, high-quality Unix-compatible operating system based on Linux kernel, complete with a suite of applications.
Debian community is a group of above 150 unpaid volunteers from over the world who collaborate via the Internet. The founders of the project have formed the organization "Software in the Public Interest" to sponsor Debian GNU/Linux development.
Software in the Public Interest
Software in the Public Interest (SPI) is a non-profit organization formed when FSF withdrew their sponsorship of Debian. The purpose of the organization is to develop and distribute free software. Its goals are very much like those of FSF, and it encourages programmers to use the GNU General Public License on their programs. However, SPI has a slightly different focus in that it is building and distributing a Linux system that diverges in many technical details from the GNU system planned by FSF. SPI still communicates with FSF, and it cooperates in sending them changes to GNU software and in asking its users to donate to FSF and the GNU project.
SPI can be reached at:
E-Mail: email@example.com Postal address:
Software in the Public Interest
P.O. Box 70152
Pt. Richmond, CA 94807-0152
Phone: 510-215-3502 (Bruce Perens at work)
3.2 Mailing lists
There are several Debian-related mailing lists:
There are also several mailing lists for Debian developers.
You can subscribe to those mailing list by mail or via www, for more information please visit http://www.debian.org/
3.3 Bug tracing system.
Debian project has a bug tracing system which handles the bug reports provided by users. As soon as the bug report is received, the bug is given a number and all the information provided on this particular bug is stored in a file and mailed to the maintainer of the package. When the bug is fixed, it must be marked as done ("closed") by the maintainer; however, if it was closed by mistake, it may be reopened.
To receive more info on the bug tracing system, send e-mail to firstname.lastname@example.org with "help" in the body.
Many thanks to Bruce Perens, and other authors of Debian related materials that I've used in order to write this chapter.
Thanks a lot to Vadik Vygonets, my beloved cousin, that also helped me very much.
And thanks a lot to all members of Debian community for their hard work, let's hope that Debian will become even better.
4.2 Last Note
Hence Debian changes very fast, alot of facts may change faster then the book, but this document will be updated regularly, you can find it at * http://www.cs.huji.ac.il/~borik/debian/ligs/
Any redistributions or changes to this document may be made only with permission from the author.