paint-brush
Step-by-Step Installationby@goerzenandothman

Step-by-Step Installation

by Goerzen & OthmanOctober 24th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

dbootstrap is the name of the program that is run after you have booted into the installation system. It is responsible for initial system configuration and the installation of the “base system.” The main job of dbootstrap and the main purpose of your initial system configuration is to configure certain core elements of your system. For instance, this includes your IP address, host name, and other aspects of your networking setup, if any. This also includes the configuration of “kernel modules,” which are drivers that are loaded into the kernel. These modules include storage hardware drivers, network drivers, special language support, and support for other peripherals. Configuring these fundamental things is done first, because it is often necessary for the system to function properly for the next steps of installation. dbootstrap is a simple, character-based application. It is very easy to use; generally, it will guide you through each step of the installation process in a linear fashion. You can also go back and repeat steps if you made a mistake. Navigation within dbootstrap is accomplished with the arrow keys, Enter, and Tab.

People Mentioned

Mention Thumbnail
featured image - Step-by-Step Installation
Goerzen & Othman HackerNoon profile picture

Debian GNU/Linux: Guide to Installation and Usage" by John Goerzen and Ossama Othman is part of the HackerNoon Books Series. You can jump to any chapter in this book here. Step-by-Step Installation

3. Step-by-Step Installation

dbootstrap is the name of the program that is run after you have booted into the installation system. It is responsible for initial system configuration and the installation of the “base system.”


The main job of dbootstrap and the main purpose of your initial system configuration is to configure certain core elements of your system. For instance, this includes your IP address, host name, and other aspects of your networking setup, if any. This also includes the configuration of “kernel modules,” which are drivers that are loaded into the kernel. These modules include storage hardware drivers, network drivers, special language support, and support for other peripherals. Configuring these fundamental things is done first, because it is often necessary for the system to function properly for the next steps of installation.


dbootstrap is a simple, character-based application. It is very easy to use; generally, it will guide you through each step of the installation process in a linear fashion. You can also go back and repeat steps if you made a mistake. Navigation within dbootstrap is accomplished with the arrow keys, Enter, and Tab.

3.1 Select Color or Monochrome Display

Once the system has finished booting, dbootstrap is invoked. The first thing that dbootstrap asks about is your display. You should see the “Select Color or Monochrome display” dialog box. If your monitor is capable of displaying color, press Enter. The display should change from black-and-white to color. Then press Enter again, on the “Next” item, to continue with the installation.


If your monitor can display only black and white, use the arrow keys to move the cursor to the “Next” menu item, and then press Enter to continue with the installation.

3.2 Debian GNU/Linux Installation Main Menu

You may see a dialog box that says “The installation program is determining the current state of your system and the next installation step that should be performed.” This is a phase in which the installation program automatically figures out what you probably need to do next. In some cases, you may not even see this box.


During the entire installation process, you will be presented with the main menu, titled “Debian GNU/Linux Installation Main Menu.” The choices at the top of the menu will change to indicate your progress in installing the system. Phil Hughes wrote in the Linux Journal[1] that you could teach a chicken to install Debian! He meant that the installation process was mostly just pecking at the Enter 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 step in installing the system will be taken.


[1] http://www.linuxjournal.com


3.3 Configure the Keyboard

Make sure the highlight is on the “Next” item and press Enter to go to the keyboard configuration menu.


Move the highlight to the keyboard selection you desire and press Enter. Use the arrow keys to move the highlight. In most cases, you can just use the default U.S. layout.

3.4 Last Chance to Back Up!

Did we tell you to back up your disks? Here’s your first chance to wipe out all of the data on your disks and your last chance to save your old system. If you haven’t backed up all of your disks, remove the floppy from the drive, reset the system, and run backups.

3.5 Partition a Hard Disk

Whatever the “Next” menu selection is, you can use the down-arrow key to select “Partition a Hard Disk.” Go ahead and do this now, then press Enter.


The “Partition a Hard Disk” menu item presents you with a list of disk drives you can partition and runs a partitioning application called cfdisk. You must create at least one “Linux native” (type 83) disk partition, and you probably want at least one “Linux swap” (type 82) partition, as explained in later in this section.


You will now create the partitions that you need to install Debian. For this example, the assumption is that you are partitioning an empty hard disk.


The boot partition must reside within the first 1,024 of cylinders of your hard disk (see section 2.3.3 on page [*]). Keeping that in mind, use the right-arrow key to highlight the “New” menu selection, and then press Enter. You will be presented with the choice of creating a primary partition or a logical partition. To help ensure that the partition containing the boot information is within the first 1,024 cylinders, create a primary partition first. This primary partition will be your “Linux native” partition.


Highlight the “Primary” menu selection and press Enter. Next you will need to enter how large you want that partition to be. Review section 2.3.2 on page [] if you’re not sure how large it should be. Remember to leave enough space for your swap partition (see section 2.3.5 on page []). Enter the parition size you want and then press Enter. Next you will be asked if you want to place the partition at the beginning of free space or at the end. Place it at the beginning to help ensure that it lies within the first 1,024 cylinders. Highlight “Beginning” and press Enter. At this point you will be brought back to the main screen. Notice that the partition you created is listed. By default, a Linux native partition was created. This partition must now be made bootable. Make sure that the “Bootable” menu selection is highlighted and press Enter. The partition should now have the word “Boot” listed under the “Flags” column.


With the remaining space, create another primary partition. Using the down-arrow key, highlight the free space entry in the partition list. Now highlight the “New” menu selection and proceed just as you did when you created the first primary partition. Notice that the partition is listed as a Linux native partition. Because this partition will be your swap partition, it must be denoted as such. Make sure the partition you just created (your swap partition) is highlighted and then press the left-arrow key until the “Type” menu selection is highlighted, then press Enter. You will be presented with a list of supported partition types. The Linux swap partition type should already be selected. If it is not, enter the number from the list that corresponds to the Linux swap partition (82), and then press Enter. Your swap partition should now be listed as a Linux swap partition under the “FS Type” column in the main screen.


Figure 3.1: cfdisk screenshot


Your cfdisk screen should look something like the screenshot in Figure 3.1 on page [*]. The numbers may not be the same, but the Flags and FS Type column shoulds be similar.

Until now, nothing on your disk has been altered. If you are satisfied that the partition scheme you created is what you want, press the left-arrow key until “Write” is highlighted, and press Enter. Your hard disk has now been partitioned. Quit the cfdisk application by selecting the “Quit” menu selection. Once you have left cfdisk, you should be back in Debian’s dbootstrap installation application.

3.6 Initialize and Activate a Swap Partition

This will be the “Next” menu item once you have created one disk partition. You have the choice of initializing and activating a new swap partition, activating a previously-initialized one, or doing without a swap partition.


A swap partition is strongly recommended, but you can do without one if you insist and if your system has more than 4MB RAM. If you wish to do this, select the “Do Without a Swap Partition” item from the menu and move on to the next section.


It’s always permissible to reinitialize a swap partition, so select “Initialize and Activate a Swap Partition” unless you are sure you know what you are doing. This menu choice will first present you with a dialog box reading “Please select the partition to activate as a swap device.” The default device presented should be the swap partition you’ve already set up; if so, just press Enter.


Next you have the option to scan the entire partition for unreadable disk blocks caused by defects on the surface of the hard disk platters. This is useful if you have MFM, RLL, or older SCSI disks, and it never hurts (although it can be time-consuming). Properly working disks in most modern systems don’t require this step, because they have their own internal mechanisms for mapping out bad disk blocks.


Finally, there is a confirmation message because initialization will destroy any data previously on the partition. If all is well, select “Yes.” The screen will flash as the initialization program runs.

3.7 Initialize a Linux Partition

At this point, the next menu item presented should be “Initialize a Linux Partition.” If it isn’t, either you haven’t completed the disk partitioning process, or you haven’t made one of the menu choices dealing with your swap partition.


You can initialize a Linux partition, or alternately you can mount a previously initialized one. Note that dbootstrap will not upgrade an old system without destroying it. If you’re upgrading, Debian can usually upgrade itself, and you won’t need to use dbootstrap. The Debian 2.1 release notes contain upgrade instructions[2].


[2] http://www.debian.org/releases/slink/i386/release-notes/ch-upgrading-req.en.html


If you are using old disk partitions that are not empty, i.e., if you want to just throw away what is on them, you should initialize them (which erases all files). Moreover, 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 Operating System Kernel and Modules” unless you’ve already performed some of the installation steps. You can use the arrow keys to select the menu items to initialize or to 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 or mount them now.

3.7.1 Mount a Previously-Initialized Partition

An alternative to the “Initialize a Partition” step is the “Mount a Previously-Initialized Partition” step. Use this if you are resuming an installation that was interrupted or if you want to mount partitions that have already been initialized.

3.8 Install Operating System Kernel and Modules

This should be the next menu step after you’ve mounted your root partition, unless you’ve already performed this step in a previous run of dbootstrap. First, you will be asked to confirm that the device you have mounted on root is the proper one. Next, you will be offered a menu of devices from which you can install the kernel. Choose the appropriate device from which to install the kernel and modules; this will either be a CD-ROM device or the first floppy device.


If you’re installing from floppies, you’ll need to feed in the Rescue Floppy (which is probably already in the drive), followed by the Drivers Floppy.

3.9 Configure PCMCIA Support

There is an alternate step, before the “Configure Device Driver Modules” menu selection, called “Configure PCMCIA Support.” This menu is used to enable PCMCIA support.


If you do have PCMCIA but are not installing your Debian system using it (i.e., installation with a PCMCIA Ethernet card), you need not configure PCMCIA at this point. You can easily configure and enable PCMCIA at a later point, after installation is complete. However, if you are installing by way of a PCMCIA network device, this alternate must be selected, and PCMCIA support must be configured prior to configuring the network.


If you need to install PCMCIA, select the alternate below “Configure Device Driver Modules.” You will be asked which PCMCIA controller your system contains. In most cases, this will be i82365. In some cases, it will be tcic; your laptop’s vendor-supplied specifications should provide the information. You can generally leave the next few sets of options blank. Again, certain hardware has special needs; the Linux PCMCIA HOWTO[3] contains plenty of information in case the default doesn’t work.


[3] http://metalab.unc.edu/LDP/HOWTO/PCMCIA-HOWTO.html


In some unusual cases, you may also need to modify the file /etc/pcmcia/config.opts. You can open your second virtual terminal (Left Alt-F2) and edit the file there and then reconfigure your PCMCIA, or you can manually force a reload of the modules using insmod and rmmod.


Once PCMCIA is properly configured and installed, you should configure your device drivers as described in the next section.

3.10 Configure Device Driver Modules

Select the “Configure Device Driver Modules” menu item and look for devices that are on your system. Configure those device drivers, and they will be loaded whenever your system boots.


You don’t have to configure all your devices at this point; what is crucial is that any device configuration required for the installation of the base system is done here.


At any point after the system is installed, you can reconfigure your modules with the modconf program.

3.11 Configure the Network

You’ll have to configure the network even if you don’t have a network, but you’ll only have to answer the first two questions—“Choose the Host name,” and “Is your system connected to a network?”


If you are connected to a network, you’ll need the information you collected from 2.2.1. However, if your primary connection to the network will be PPP, you should choose NOT to configure the network.


dbootstrap will ask you a number of questions about your network; fill in the answers from 2.2.1. The system will also summarize your network information and ask you for confirmation. Next, you need to specify the network device that your primary network connection uses. Usually, this will be eth0 (the first Ethernet device). On a laptop, it’s more likely that your primary network device is pcmcia.


Here are some technical details you may find handy: The program assumes 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. (On a Debian system, daemons are started by scripts in the directory /etc/init.d/.)

3.12 Install the Base System

During the “Install the Base System” step, you’ll be offered a menu of devices from which you may install the base system. Here, you need to select your CD-ROM device.


You will be prompted to specify the path to the base2_1.tgz file. If you have official Debian media, the default value should be correct. Otherwise, enter the path where the base system can be found, relative to the media’s mount point. As with the “Install Operating System Kernel and Modules” step, you can either let dbootstrap find the file itself or type in the path at the prompt.

3.12.1 Configure the Base System

At this point you’ve read in all of the files that make up a minimal Debian system, but you must perform some configuration before the system will run.


You’ll be asked to select your time zone. There are many ways to specify your time zone; we suggest you go to the “Directories:” pane and select your country (or continent). That will change the available time zones, so go ahead and select your geographic locality (i.e., country, province, state, or city) in the “Timezones:” pane.


Next, you’ll be asked if your system clock is to be set to GMT or local time. Select GMT (i.e., “Yes”) if you will only be running Linux on your computer; select local time (i.e., “No”) if you will be running another operating system as well as Debian. Unix (and Linux is no exception) generally keeps GMT time on the system clock and converts visible time to the local time zone. This allows the system to keep track of daylight savings time and leap years, and even allows a user who is logged in from another time zone to individually set the time zone used on his or her terminal.

3.12.2 Make Linux Bootable Directly from the Hard Disk

If you elect to make the hard disk boot directly to Linux, you will be asked to install a master boot record. If you aren’t using a boot manager (and this is probably the case if you don’t know what a boot manager is) and you don’t have another different operating system on the same machine, answer “Yes” to this question. Note that if you answer “Yes,” you won’t be able to boot into DOS normally on your machine, for instance. Be careful. If you answer “Yes,” the next question will be whether you want to boot Linux automatically from the hard disk when you turn on your system. This sets Linux to be the bootable partition—the one that will be loaded from the hard disk.


Note that multiple operating system booting on a single machine is still something of a black art. This book does not even attempt to document the various boot managers, which vary by architecture and even by sub-architecture. You should see your boot manager’s documentation for more information. Remember: When working with the boot manager, you can never be too careful.


The standard i386 boot loader is called “LILO.” It is a complex program that offers lots of functionality, including DOS, NT, and OS/2 boot management. To find out more about this functionality, you can read the documentation in /usr/doc/lilo after your system is set up.

3.13 Make a Boot Floppy

You should make a boot floppy even if you intend to boot the system from the hard disk. The reason is that it’s possible for the hard disk bootstrap to be mis-installed, but a boot floppy will almost always work. Select “Make a Boot Floppy” from the menu and feed the system a blank floppy as directed. Make sure the floppy isn’t write-protected, because the software will format and write it. Mark this the “Custom Boot” floppy and write-protect it once it has been written.

3.14 The Moment of Truth

You system’s first boot on its own power is what electrical engineers call the “smoke test.” If you have any floppies in your floppy drive, remove them. Select the “Reboot the System” menu item.


If are booting directly into Debian and the system doesn’t start up, either use your original installation boot media (for instance, the Rescue Floppy) or insert the Custom Boot floppy if you created one, and then reset your system. If you are not using the Custom Boot floppy, you will probably need to add some boot arguments. If booting with the Rescue Floppy or similar technique, you need to specify rescue root=rootfs, where rootfs is your root partition, such as /dev/sda1.


Debian should boot, and you should see the same messages as when you first booted the installation system, followed by some new messages.

3.15 Set the Root Password

The root account is also called the superuser; it is a login that bypasses all security protection on your system. The root account should be used only to perform system administration and for as short a time as possible.


Any password you create should contain from six to eight characters, and it should contain both uppercase and lowercase characters, as well as punctuation characters. Take extra care when setting your root password, since it is such a powerful account. Avoid dictionary words or use of any personal information that could be guessed.


If anyone ever tells you he needs your root password, be extremely wary. You should normally never give out your root account, unless you are administering a machine with more than one system administrator.

3.16 Create an Ordinary User

The system will ask you to create an ordinary user account. This account should be your main personal login. You should not use the root account for daily use or as your personal login.


Why not? It’s a lot harder to do damage to the system as an ordinary user than as root; system files are protected. Another reason is that you might be tricked into running a Trojan horse program—that is, a program that takes advantage of your superuser powers to compromise the security of your system behind your back. Any good book on Unix system administration will cover this topic in more detail. Consider reading one if this topic is new to you.


Name the user account anything you like. If your name is John Smith, you might use “smith,” “john,” “jsmith,” or “js.”

3.17 Shadow Password Support

Next, the system will ask whether you want to enable shadow passwords. This is an authentication system that makes your Linux system a bit more secure. Therefore, we recommend that you enable shadow passwords. Reconfiguration of the shadow password system can also be done later with the shadowconfig program.

3.18 Remove PCMCIA

If you have no use for PCMCIA, you can choose to remove it at this point. This will make your startup cleaner; also, it will make it easier to replace your kernel (PCMCIA requires a lot of correlation between the version of the PCMCIA drivers, the kernel modules, and the kernel itself). In general, you will not need PCMCIA unless you’re using a laptop.

3.19 Select and Install Profiles

The system will now ask you if you want to use the pre-rolled software configurations offered by Debian. You can always choose package-by-package what you want to install on your new machine. This is the purpose of the dselect program, described below. But this can be a long task with the thousands of packages available in Debian!


So, you have the ability to choose tasks or profiles instead. A task is work you will do with the machine, such as “Perl programming” or “HTML authoring” or “Chinese word processing.” You can choose several tasks. A profile is a category your machine will be a member of, such as “Network server” or “Personal workstation.” Unlike with tasks, you can choose only one profile.


To summarize, if you are in a hurry, choose one profile. If you have more time, choose the Custom profile and select a set of tasks. If you have plenty of time and want very precise control on what is or is not installed, skip this step and use the full power of dselect.


Soon, you will enter into dselect. If you selected tasks or profiles, remember to skip the “Select” step of dselect, because the selections have already been made.


A word of warning about the size of the tasks as they are displayed: The size shown for each task is the sum of the sizes of its packages. If you choose two tasks that share some packages, the actual disk requirement will be less than the sum of the sizes for the two tasks.


Once you’ve added both logins (root and personal), you’ll be dropped into the dselect program. 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 if 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 after you have transported the Debian package files to your system. You must be the superuser (root) when you run dselect. Information on how to use dselect is given in section 3.20.

3.20 Package Installation with dselect

It is now time to install the software packages of your choice on your Debian system. This is done using Debian’s package management tool, dselect.

3.20.1 Introduction

This section documents dselect for first-time users. It makes no attempt to explain everything, so when you first meet dselect, work through the help screens.


dselect is used to select which packages you wish to install (there are currently about 2,250 packages in Debian 2.1). It will be run for you during the installation. It is a very powerful and somewhat complex tool. As such, having some knowledge of it beforehand is highly recommended. Careless use of dselect can wreak havoc on your system.


dselect will step you through the package installation process outlined here:


  1. Choose the access method to use.


  2. Update list of available packages, if possible.


  3. Select the packages you want on your system.


  4. Install and upgrade wanted packages.


  5. Configure any packages that are unconfigured.


  6. Remove unwanted software.


As each step is completed successfully, dselect will lead you on to the next. Go through them in order without skipping any steps.


Here and there in this document we talk of starting another shell. Linux has six console sessions or shells available at any one time. You switch between them by pressing Left Alt-F1 through Left Alt-F6, after which you log in on your new shell and go ahead. The console used by the install process is the first one, a.k.a. tty1, so press Left Alt-F1 when you want to return to that process.


3.20.2 Once dselect Is Launched

Once in dselect, you will get this screen:

Debian Linux ‘dselect’ package handling frontend.

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.


Let’s look at these one by one.


Access


![Figure 3.2: dselect Access screen

](https://cdn.hackernoon.com/images/vSShvCAio4bqP19bBfmp6FnYQFk1-23a3yzr.png)


Here we tell dselect where our packages are. Ignore the order that these appear in. It is very important that you select the proper method for installation. You may have a few more methods listed, or a few less, or you may see them listed in a different order; just don’t worry about it. In the following list, we describe the different methods.


multi_cd. Quite large and powerful, this complex method is the recommended way of installing a recent version of Debian from a set of multiple binary CDs. Each of these CDs should contain information about the packages in itself and all prior CDs (in the file Packages.cd). When you first select this method, be sure the CD-ROM you will be using is not mounted. Place the last binary disk of the set (we don’t need the source CDs) in the drive and answer the questions you are asked:


CD-ROM drive location Confirmation that you are using a multi-cd set The location of the Debian distribution on the disk(s) [ Possibly ] the location(s) of the Packages file(s)


Once you have updated the available list and selected the packages to be installed, the multi_cd method diverges from normal procedure. You will need to run an “install” step for each of the CDs you have, in turn. Unfortunately, due to the limitations of dselect, it will not be able to prompt you for a new disk at each stage; the way to work for each disk is outlined here:


  1. Insert the CD in your CD-ROM drive.


  2. From the main dselect menu, select “Install.”


  3. Wait until dpkg finishes installing from this CD. (It may report installation successful, or possibly installation errors. Don’t worry about these until later.)


  4. Press Return to go back to the main dselect menu.


  5. Repeat with the next CD in the set.


It may be necessary to run the installation step more than once to cover the order of package installation; some packages installed early may need to have later packages installed before they will configure properly.


Running a “Configure” step is recommended to help fix any packages that may end up in this state.


multi_nfs, multi_mount. These are similar to the multi_cd method and are refinements on the theme of coping with changing media—for example, installing from a multi_cd set exported via NFS from another machine’s CD-ROM drive. indexdselect!multi-NFS, multi-mount installation


apt. One of the best options for installation from a local mirror of the Debian archive or from the network. This method uses the “apt” system to do complete dependency analysis and ordering, so it’s most likely to install packages in the optimal order.


Configuration of this method is straightforward. You may select any number of different locations, mixing and matching file: URLs (local disks or NFS mounted disks), http: URLs, or ftp: URLs. Note, however, that the HTTP and FTP options do not support local authenticating proxies.


If you have proxy server for either HTTP or FTP (or both), make sure you set the http_proxy and ftp_proxy environment variables, respectively. Set them from your shell before starting dselect by using the following command:


# export http_proxy=http://gateway:3128/

# dselect


Update

dselect will read the Packages or Packages.gz files from the mirror and create a database on your system of all available packages. This may take a while as it downloads and processes the files.


Select

Hang on to your hat. This is where it all happens. The object of the exercise is to select just which packages you wish to have installed.


Press 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 pressing ? at any point in the “Select” screens, and you can page through the help screens by hitting the . (full stop) key.


Before you dive in, note these points:


◼ To exit the “Select” screen after all selections are complete, press Enter. This will return you to the main screen if there is no problem with your selection. Otherwise, you will be asked to deal with that problem. When you are happy with any given screen, press 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, dselect will warn you of the problem and will most likely suggest a solution. If package A conflicts with package B (i.e., if they are mutually exclusive), you will be asked to decide between them.


Let’s look at the top two lines of the Select screen. This header reminds us of some of the special keys listed in Table 3.1.


                    Table 3.1: Special dselect keys
        +------------------------------------------------------+
        | Key  |                  Description                  |
        |------+-----------------------------------------------|
        |  +   |      Select a package for installation.       |
        |------+-----------------------------------------------|
        |  =   |            Place a package on hold            |
        |------+-----------------------------------------------|
        |  -   |               Remove a package.               |
        |------+-----------------------------------------------|
        |  _   | Remove a package and its configuration files. |
        |------+-----------------------------------------------|
        | i, I |      Toggle/cycle information displays.       |
        |------+-----------------------------------------------|
        | o, O |        Cycle through the sort options.        |
        |------+-----------------------------------------------|
        | v, V |            A terse/verbose toggle.            |
        +------------------------------------------------------+


Table 3.2 lists the states that dselect uses to denote the status of each package it is aware of.

                   Table 3.2: dselect Package States
           +-----------------------------------------------+
           | Flag |     Meaning     |   Possible values    |
           |------+-----------------+----------------------|
           |  E   |      Error      |     Space, R, I      |
           |------+-----------------+----------------------|
           |  I   | Installed State | Space, *, -, U, C, I |
           |------+-----------------+----------------------|
           |  O   |    Old Mark     |    *, -, =, _, n     |
           |------+-----------------+----------------------|
           |  M   |      Mark       |    *, -, =, _, n     |
           +-----------------------------------------------+


Rather than spell all this out here, I refer you to the Help screens where all is revealed. One example, though.


You enter dselect and find a line like this:


EIOM Pri Section Package Description ** Opt misc loadlin a loader (running under DOS) for LINUX


This is saying that loadlin was selected when you last ran dselect and that it is still selected, but it is not installed. Why not? The answer must be that the loadlin package is not physically available. It is missing from your mirror.


The information that dselect uses to get all the right packages installed is buried in the packages themselves. Nothing in this world is perfect, and it does sometimes happen that the dependencies built into a package are incorrect, which means that dselect simply cannot resolve the situation. A way out is provided where the user can regain control; it takes the form of the commands Q and X, which are available in the Select screen.


Q An override. Forces dselect to ignore the built-in dependencies and to do what you have specified. The results, of course, will be on your own head.


X Use X if you get totally lost. It puts things back the way they were and exits.


Select screen (dselect) Keys that help you not to get lost (!) are R, U, and D.


R Cancels all selections at this level. Does not affect selections made at the previous level.


U If dselect has proposed changes and you have made further changes U will restore dselect’s selections.


D Removes the selections made by dselect, leaving only yours.


An example follows. The boot-floppies package (not an example for beginners, I know, but it was chosen because it has a lot of dependencies) depends on these packages:


◼ libc6-pic ◼ slang1-pic ◼ sysutils ◼ makedev ◼ newt0.25 ◼ newt0.25-dev ◼ popt ◼ zlib1g ◼ zlib1g-dev ◼ recode


The person maintaining boot-floppies also thinks that the following packages should be installed. These are not, however, essential:


◼ lynx ◼ debiandoc-sgml ◼ unzip


When you select boot-floppies, dselect brings up the conflict resolution screen. You’ll notice that all the required packages have been selected.


Pressing the R key puts things back to the starting point.


EIOM Pri Section Package Description __ Opt admin boot-floppie Scripts to create the Debian __ Opt devel newt0.25-dev Developer’s toolkit for newt __ Opt devel slang1-dev The S-Lang programming library __ Opt devel slang1-pic The S-Lang programming library


If you decide now that you don’t want boot-floppies, just press Enter.


Pressing the D key puts things the way I selected them in the first place:


EIOM Pri Section Package Description _* Opt admin boot-floppie Scripts to create the Debian

__ Opt devel newt0.25-dev Developer’s toolkit for newt __ Opt devel slang1-dev The S-Lang programming library __ Opt devel slang1-pic The S-Lang programming library


Pressing the U key restores dselect’s selections:


EIOM Pri Section Package Description _* Opt admin boot-floppie Scripts to create the Debian installation _* Opt devel newt0.25-dev Developer’s toolkit for newt _* Opt devel slang1-dev The S-Lang programming library _* Opt devel slang1-pic The S-Lang programming library


I suggest running with the defaults for now; you will have ample opportunities to add more later.

Whatever you decide, press Enter to accept and return to the main screen. If this results in unresolved problems, you will be bounced right back to another problem resolution screen.


The R, U, and D keys are very useful in “what if” situations. You can experiment at will and then restore everything and start again. Don’t look on them as being in a glass box labeled “Break in Case of Emergency.”


After making your selections in the Select screen, press I to give you a big window, press t to take you to the beginning, and then use the Page Down key to look quickly through the settings. This way you can check the results of your work and spot glaring errors. Some people have deselected whole groups of packages by mistake and not noticed the error until too late. dselect is a very powerful tool; don’t misuse it.


You should now have the situation shown in Table 3.3.

              Table 3.3: Expected Package Category States
                +--------------------------------------+
                | Package category |      Status       |
                |------------------+-------------------|
                |     Required     |   all selected    |
                |------------------+-------------------|
                |    Important     |   all selected    |
                |------------------+-------------------|
                |     Standard     |  mostly selected  |
                |------------------+-------------------|
                |     Optional     | mostly deselected |
                |------------------+-------------------|
                |      Extra       | mostly deselected |
                +--------------------------------------+


Happy? Press Enter to exit the Select process. You can come back and run Select again if you wish.


Install

dselect runs through the entire set of packages and installs those selected. Expect to be asked to make decisions as you go. It is often useful to switch to a different shell to compare, say, an old configuration with a new one. If the old file is conf.modules, the new one will be conf.modules.dpkg-dist.


The screen scrolls past fairly quickly on a fast machine. You can stop and start it with Ctrl-s and Ctrl-q, respectively, and at the end of the run, you will get a list of any uninstalled packages.


It can happen that a package does not get installed because it depends on some other package that is listed for installation but is not yet installed. The answer here is to run Install again. Cases have been reported where it was necessary to run it four times before everything slipped into place. This will vary by your acquisition method.


Configure

Most packages get configured in step 3, but anything left hanging can be configured here.


Remove

Removes packages that are installed but no longer required.


Quit

I suggest running /etc/cron.daily/find at this point, because you have a lot of new files on your system. Then you can use locate to get the location of any given file.


3.20.3 A Few Hints in Conclusion

When the install process runs dselect for you, you will doubtless be eager to get Debian running as soon as possible. Well, please be prepared to take an hour or so to learn your way around and then get it right. When you enter the Select screen for the first time, don’t make any selections at all—just press Enter and see what dependency problems there are. Try fixing them. If you find yourself back at the main screen, run Select again.


You can get an idea of the size of a package by pressing i twice and looking for the “Size” figure. This is the size of the compressed package, so the uncompressed files will be a lot bigger (see “Installed-Size,” which is in kilobytes, to know it).


Installing a new Debian system is a complex thing, but dselect can do it for you as easy as can be. So take the time to learn how to drive it. Read the help screens and experiment with i, I, o, and O. Use the R key. It’s all there, but it’s up to you to use it effectively.

3.21 Glossary

The following terms will be useful to you throughout this book and in general when you’re talking about Debian.


Package. A file that contains everything needed to install, de-install, and run a particular program. The program that handles packages is dpkg. dselect is a front-end to dpkg. Experienced users often use dpkg to install or remove a package.


Package names. All package names have the form xxxxxxxxxxx.deb. Sample package names include the following:


◼ efax_08a-1.deb ◼ lrzsz_0.12b-1.deb ◼ mgetty_0.99.2-6.deb ◼ minicom_1.75-1.deb ◼ term_2.3.5-5.deb ◼ uucp_1.06.1-2.deb ◼ uutraf_1.1-1.deb ◼ xringd_1.10-2.deb ◼ xtel_3.1-2.deb




About HackerNoon Book Series: We bring you the most important technical, scientific, and insightful public domain books.


This book is part of the public domain. John Goerzen and Ossama Othman (2004). Debian GNU/Linux : Guide to Installation and Usage. Urbana, Illinois: Project Gutenberg. Retrieved https://www.gutenberg.org/cache/epub/6527/pg6527-images.html


This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org, located at https://www.gutenberg.org/policy/license.html.