dselect (Re: Using dpkg for a custom installation from cdrom media)
On Mon, 2 Mar 1998, Henry Hollenberg wrote:
> I have a particular list of packages I would like to install saved in
> a file and am using a 3 CD-ROM Debian 1.3.1 set I got with Dale Scheetz's
> book as my media.
> I imagine I need to mount the cdrom and use dpkg --get-selections and
> dpkg --set-selections and maybe cd to the cdrom stable directory then do
> some sort of dpkg -R command....
No, you just need to use the dselect program.
> but I have no idea how to hang all these steps together.
Dselect takes care of most of the detail work.
> Anybody know how to do this?....type/talk slowly so I can see your
> lips move.
First become superuser (root) to be able to make system-level changes; you
do this with the command "su -" and typing in root's password at the
Next, type the "dselect" command.
Now, read slowly what messages dselect shows on screen, or you might get
confused at a later stage about the purpose of the questions dselect asks
you and what keypresses are at your disposition to instruct dselect.
Generally, every time dselect comes up with a screen of informative text,
read it thoroughly before hitting the "space" key. Another valuable
piece of knowledge is that pressing the "?" key brings you to a help
screen, where you can find out about the general purpose and setup of
dselect (more or less what I'm typing here) and about specific
The first time you are going to use your cd, you'll have to set the
"Access method". If you have installed the system from cd, then it
probably isn't necessary set the access method again and you can skip
Every time you insert a new cd, you have to "Update the available list",
so that the dselect engine (called dpkg) knows what packages are available
for installation. If you just want to add a package from a cd that you
have previously used, then you can safely assume that dpkg still knows
what's available and skip this step.
Next comes the "Select" part. This is often the most difficult and
confusing part because it requires the most user interaction.
You're first shown an informative text. Read it. When you're finished, you
arrive at the list of available packages. The list shows a lot of
information at once, so don't be confused. If you are not sure about the
meaning of symbols, just press "?" and read the on-line documentation.
Because there are so many available packages (more then you would ever
want - or even could - install on your system,) it is the easiest to find
a package by its name if you know a part of that. Press "/" and type a
part of the package's name and hit "enter". If that gives a result that is
not quite right, press "\" (yes, I know, this isn't the most intuitive key
for the job) to search for the next match until you find what you're
To mark a package for installation, you move the selection bar to the line
that lists the package. You can also mark a group of packages by putting
the selection bar on the group's header in the list, but I don't advise
you to do this until you understand all about the dependency mechanism as
explained below. Selecting a lot of packages at once is very likely to
cause a bunch of dependency conflicts between packages at once and this is
very confusing, even to the initiated.
There are a couple of keybindings to mark a package for installation, I
always use "insert", but that doesn't always work when I login remotely
over the net, so you might want to check all the possibilities. Just press
the "?" key and lookup the keybindings.
Assuming you have found the package you want to add to your system, mark
it for installation. This will not install it yet, it just tells dselect
that you want dpkg to install it in a later phase. One reason to do
things this way is to allow the dselect program to check your wishes
against package dependencies. Some packages conflict, you can't have them
installed at the same time. Others depend, you must have one to install
the other. The dpkg engine won't install packages until these dependencies
This is what dselect is good at, it tries to help you along in resolving
the dependencies. When you change a package's status, by marking or
unmarking it, dselect will look for dependency issues and if it detects
cinflicts, it steps in and presents the (in)famous dependency screen. This
is one of the things that has so many people confused, while it is in fact
one of the best things since sliced bread. It is (apart from the high
standards and strong consistency of the distribution) the big difference
between Debian's packaging tools and The Others.
What happens when dselect finds a dependency unresolved is that it first
shows you an informative message. Read it. Next, you see a sublist of the
entire packages list with only those packages that are in some way or
another involved in the dependency. Dselect has already suggested a
marking for each package involved, but you can still change the suggested
markings before you acknowledge the markings with "enter". You can also
back out completely and go back to the state your selection was in before
you made the change that forced dselect to enter dependency resolution
mode. Or you can force dselect to accept an unresolved dependency, but you
don't want to do this unless you really know what you're doing and how to
handle dpkg at the command line. Lets just assume that you will always
either accept dselect's suggestions (maybe slightly modified) or will
completely backout the change that caused the dependency conflict. All the
keybindings you need are explained in the help screen. So, in order to
make you read the documentation, I'll only tell you one key: the "?" one.
Supposing you've made all the markings that are necessary for now, just
press the "enter" key in the main package list (actually, you can use all
the keys, including the backing-out or overriding ones as in the
dependency resolution mode) to finish the selection stage.
To actually install the packages, choose "Install" and see dselect make
dpkg look at all the packages to see if they need to be installed or
upgraded from an older version. Most of this needs no user interaction and
(depending on the speed of your cdrom) you can get a cup of coffee. Only
in the later part of the installation run are packages configured and at
that time, some packages will ask you some questions that you have to
When this is finished, there are (apart from "Quit") two more items on
dselect's main menu: "Configure" and "Remove". The "Configure" command is
usually useless, as "Install" most of the time gets things right the first
time. It is only in very exceptional cases, where there are very hairy
dependency problems, that some packages are installed, but not yet
configured. For these cases this menu was created. It will only try to
configure what has been left over (dpkg keeps a record of that
information) without recursing again through the entire packages tree.
The "Remove" command is used when you have marked an installed package for
removal or purge (a more drastic form of removal.) If you have only marked
a package or two for removal in the selection screen, then you can skip
the installation procedure and go straight for the removal command.
The last command, "Quit" returns you to the shell. Everything should be
dandy and you should logout as root, before you do any unintentional
damage to the system.
Only in very exceptional cases, like when upgrading 300 packages all at
once when there have been major changes in the distribution structure or
standards, may you have to actually run both "Install", Configure" and
"Remove" commands several consecutive times. You are not likely to end up
in a situation like this, but it is a sort of catch-all emergency measure
when the normal subtle methods of dselect don't do things right the first
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .