dbootstrap
dbootstrap
is the name of the program which 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 network IP, host name,
and other aspects of your networking setup, if any. This also
includes the configuration of ``kernel modules'', which are drivers
which are linked into the kernel. These modules include storage
hardware drivers, network drivers, special language support, and
support for other peripherals.
Configuring these fundamentals is done first, because it is often necessary for the proper functioning of your system or for the next steps of installation.
dbootstrap
is a simple, character-based application (some
systems do not have graphics capability). 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 found you made a mistake.
Navigation within dbootstrap
is accomplished with the
arrow keys, Enter, and Tab.
If you are an experienced Unix or Linux user, press
Left Alt-F2 to get to the second virtual
console. That's the Alt key on the left-hand side of the
space bar, and the F2 function key, at the same time. This is
a separate window running a Bourne shell clone called
ash
. At this point you are booted from the RAM disk, and
there is a limited set of Unix utilities available for your use. You
can see what programs are available with the command ls /bin /sbin
/usr/bin /usr/sbin. Use the menus to perform any task that they
are able to do -- the shell and commands are only there in case
something goes wrong. In particular, you should always use the menus,
not the shell, to activate your swap partition, because the menu
software can't detect that you've done this from the shell. Press
Left Alt-F1 to get back to menus. Linux provides up to 64
virtual consoles, although the Rescue Floppy only uses a few of
them.
Error messages are usually redirected the third virtual terminal
(known as tty3). You can access this terminal by pressing
Alt-F3 (hold the Alt key while pressing the
F3 function key); get back to dbootstrap
with
Alt-F1.
Once the system has finished booting, you should see the ``Select Color or Monochrome display'' dialog box. If your monitor is only capable of displaying black-and-white, press Enter to continue with the installation. Otherwise, use the arrow keys to move the cursor to the Color menu item and then press Enter. The display should change from black-and-white to color. Then press Enter again to continue with the installation.
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.''. On some systems,
this will go by too quickly to read. You'll see this dialog box
between steps in the main menu. The installation program,
dbootstrap
, will check the state of the system in between
each step. This checking allows you to re-start the installation
without losing the work you have already done, in case you happen to
halt your system in the middle of the installation process. If you
have to restart an installation, you will have to configure
color-or-monochrome, configure your keyboard, re-activate your swap
partition, and re-mount any disks that have been initialized. Anything
else that you have done with the installation system will be saved.
During the entire installation process, you will be presented with the main menu, entitled ``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 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.
Make sure the highlight is on the ``Next'' item, and press
Enter to go to the keyboard configuration menu. Select a
keyboard that conforms to the layout used for your national language,
or select something close if the keyboard layout you want isn't
represented. Once the system installation is complete, you'll be able
to select a keyboard layout from a wider range of choices (run
kbdconfig
as root when you have completed the
installation).
Move the highlight to the keyboard selection you desire and press Enter. Use the arrow keys to move the highlight -- they are in the same place in all national language keyboard layouts, so they are independent of the keyboard configuration.
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.
If you have not already partitioned your disks for Linux native and Linux swap filesystems, i.e., as described in Partitioning Prior to Installation, section 4.5, the menu item ``Next'' will be ``Partition a Hard Disk''. If you have already created at least one Linux native and one Linux swap disk partition, the ``Next'' menu selection will be ``Initialize and Activate a Swap Partition'', or you may even skip that step if your system had low memory and you were asked to activate the swap partition as soon as the system started. Whatever the ``Next'' menu selection is, you can use the down-arrow key to select ``Partition a Hard Disk''.
The ``Partition a Hard Disk'' menu item presents you with a list of disk drives you can partition, and runs a partitioning application. 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 Partitioning Your Hard Drive, chapter 4. If you are unsure how to partition your system, go back and read that chapter.
Depending on your architecture, there are different programs which can be used. These are the program or programs available on your architecture:
fdisk
cfdisk
If your unsure how to decide which partitions to make, and how large to make them, re-read Partitioning Your Hard Drive, chapter 4.
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.
Remember to mark your root partition ``Bootable''.
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, and doing without a swap partition. It's always permissible to re-initialize 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 Return.
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 never hurts (although it can be time-consuming). Properly-working disks in most modern systems don't need this choice, as they have their own internal mechanism for mapping out bad disk blocks.
Finally, there is a confirmation message, since initialization destroys any data previously on the partition. If all is well, select ``Yes''. The screen will flash as the initialization program runs.
At this point, the next menu item presented should be ``Initialize a Linux Partition''. If it isn't, it is because 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
. For upgrading instructions for Debian
, see the upgrade instructions.
Thus, 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 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.
An alternative to ``Initialize a Linux Partition'', section 7.8 is the ``Mount a Previously-Initialized Partition'' step. Use this if you are resuming an installation that was broken off, or if you want to mount partitions that have already been initialized.
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 (as you planned in Choosing Initial Boot Media, subsection 5.1.1).
If you are installing from a local filesystem, select the ``harddisk''
device if the device is not yet mounted, or the ``mounted'' device if
it is. Next, select the partition where the Debian installation
software was installed back in Installing from a Hard Disk, section 5.3. Next you'll
be asked to specify the location on the filesystem where you put
files; make sure you put a leading ``/'' on the location. After that,
you should probably let dbootstrap
try to find the actual
files on its own; but it will let you pick if you need to.
If your installing from floppies, you'll need to feed in the Rescue Floppy (which is probably already in the drive), followed by the Drivers Floppy.
Other steps may need to be taken for other installation media.
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), then 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 if in doubt. The You can generally leave the next few sets of options blank. Again, certain hardware has special needs; the Linux PCMCIA HOWTO contains plenty of information in case the default doesn't work.
In some unusual cases, you may also need to read and edit
/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 manually forcing a reload of the
modules using insmod
and rmmod
.
Once PCMCIA is properly configured and installed, you should jump back up and configure your device drivers as described in the previous section.
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 (see Choosing Media for Installing Base, subsection 5.1.2). This might include ethernet drivers or filesystem modules.
If you want to install the base system via NFS you must load and configure the driver module for your network card, and the NFS module itself, available under ``filesystems''. If you are installing from a local disk, make sure that you look for the filesystem type in the modules list; support for that filesystem type may already be compiled in the kernel, but it's best to check. Another commmonly useful module is the PS/2 mouse driver module, called ``psaux'', in the ``misc'' category.
At any point after the system is installed, you can reconfigure your
modules with the modconf
program.
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 Information You Will Need, section 3.2. 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 Information You Will Need, section 3.2. 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''.
Some technical details you might, or might not, 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 /etc/init.d/
.)
During the ``Install the Base System'' step, you'll be offered a menu of devices from which may install the base system. You should select the appropriate device, depending on the choice you made in Choosing Media for Installing Base, subsection 5.1.2.
If you choose to install from a filesystem on the harddisk or from
CD-ROM, you will be prompted to specify the path to the
base2_1.tgz
. As with the ``Install Operating System Kernel and Modules'' step,
you can either let ``dbootstrap'' find the file on itself or type in
the path at the prompt.
If you choose to install from floppy disk, feed in the base floppies
in order, as requested by dbootstrap
. If one of the base
floppies is unreadable, you'll have to create a replacement floppy and
feed all floppies into the system again. Once the floppies have all
been read, the system will install the files it had read from the
floppies. This could take 10 minutes or more on slow systems, less on
faster ones.
If you are installing the base system from NFS, then choose NFS and
continue. You'll be prompted to specify the server, the share on the
server, and the subdirectory within that share where the
base2_1.tgz
file can be found. If you have
problems mounting NFS, make sure that the system time on the NFS
server more or less agrees with the system time on the client. You
can set your date on tty2
using the date
command; you'll have to set it by hand. See the date(1)
manual page.
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, or state) 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 Unix 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 users who are logged in from other time zones to individually set the time zone used on their terminal.
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.
If you answer ``No'' to this question, you can set the bootable
partition later with the Linux commands fdisk
or
activate
programs. From DOS, you can use fdisk
/mbr to reinstall the DOS boot block (but then you'll need to use
some other way to get into Debian).
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
.
You should make a boot floppy even if you intend to boot the system from the hard disk. The reason for this 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, as the software will format and write it. Mark this the ``Custom Boot'' floppy and write-protect it once it has been written.
You system's first boot on its own power is what electrical engineers call the ``smoke test''. If you have any floppies in you 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 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 specific rescue root=root, where root 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.
The root account is also called the super-user; it is a login that bypasses all security protection on your system. The root account should only be used to perform system administration, and only used for as short a time as possible.
Any password you create should contain from 6 to 8 characters, and should contain both upper- and lower-case 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 which could be guessed.
If anyone ever tells you they need your root password, be extremely wary. You should normally never give your root account out, unless you are administering a machine with more than one system administrator.
The system will ask you to create an ordinary user account. This account should be your main personal log-in. You should not use the root account for daily use or as your personal login.
Why not? Well, one reason to avoid using root's privileges is that it is very easy to do irreparable damage as root. Another reason is that you might be tricked into running a Trojan-horse program -- that is a program that takes advantage of your super-user 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 it 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''.
Next, the system will ask whether you want to enable shadow passwords.
This is a system in which your Linux system is made to be a bit more secure. In
a system without shadow passwords, passwords are stored (encrypted) in
a world-readable file, /etc/password
. This file has to
be readable to anyone who can log in because it contains vital user
information, for instance, how to map between numeric user identifiers
and login names. Therefore, someone could conceivably grab your
/etc/password
file and run a brute force attack against
it to try to determine passwords.
If you have shadow passwords enabled, passwords are instead stored in
/etc/shadow
, which is not readable only to
root. Therefore, we recommend that you enable shadow passwords.
Reconfiguration of the shadow password system can be done at any time
with the shadowconfig
program. See
/usr/doc/passwd/README.debian.gz
after installation for
more information.
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).
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 do 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 around 2250 packages
available in Debian!
So, you have the ability to choose tasks or profiles instead. A task is a 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 the tasks, you can choose only one profile.
To summary, 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
, since 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. 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
.
After you've quit dselect
, you'll be presented with the login
prompt. Log in using the personal login and password you
selected. Your system is now ready to use.
NOTE: In case you are installing from CD-ROM and/or are connected directly to the network, you can safely skip this section. The installation system will only prompt you for this information if the network hasn't been configured yet.
The base system includes a full ppp
package. This
package allows you to connect to your ISP using PPP. Below are some
basic instructions for setting up your ppp connection. The boot disks
contain a program called pppconfig
which will help you
set up PPP. Make sure, when it asks you for the name of your
dialup connection, that you name it ``provider''.
Hopefully, the pppconfig
program will walk you through a
pain-free PPP connection setup. However, if it does not work for you,
see below for detailed instructions.
In order to setup PPP, you'll need to know the basics of file viewing
and editing in Linux. To view files, you should use
more
, and zmore
for compressed files with a
.gz extension. For example, to view
README.debian.gz
, type zmore README.debian.gz.
The only editor that comes with the base
system is ae
, which also poses as vi
. It is
very simple to use, but does not have a lot of features. You will
probably want to install more full-featured editors and viewers later,
such as nvi
, less
, and emacs
.
Edit /etc/ppp/peers/provider
and replace ``/dev/modem''
with ``/dev/ttyS#'' where # stands for
the number of your serial port. In Linux, serial ports are counted
from 0; your first serial port (i.e., COM1)
is /dev/ttyS0
under Linux. The
next step is to edit /etc/chatscripts/provider
and insert
your provider's phone number, your user-name and password. Please do
not delete the ``\q'' that precedes the password. It hides the
password from appearing in your log files.
Many providers use PAP or CHAP for login sequence instead of text mode
authentication. Others use both. If your provider requires PAP or
CHAP, you'll need to follow a different procedure. Comment out
everything below the dialing string (the one that starts with
``ATDT'') in /etc/chatscripts/provider
, modify
/etc/ppp/peers/provider
as described above, and add
user name where name stands for
your user-name for the provider you are trying to connect to. Next,
edit /etc/pap-secrets
or /etc/chap-secrets
and enter your password there.
You will also need to edit /etc/resolv.conf
and add your
provider's name server (DNS) IP addresses. The lines in
/etc/resolv.conf
are in the following format:
nameserver xxx.xxx.xxx.xxx where the xs
stand for numbers in your IP address.
Unless your provider has a login sequence different than the majority
of ISPs, you are done! Start the PPP connection by typing
pon
as root, and monitor the process using
plog
command. To disconnect, use poff
,
again, as root.
Information about the installation of the rest of your Debian system
is examined in separate document, the dselect Tutorial. Remember to skip the ``Select'' step in
dselect
if you are using the profiles and tasks from Select and Install Profiles, section 7.23.