dbootstrap
for Initial System Configuration
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 essential elements of your system. For
instance, you may need to use certain ``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 which are not automatically built in to the kernel you are using.
Disk partitioning, disk formatting, and networking setup are also handled by
dbootstrap
. This fundamental setup is done first, since it is
often necessary for the proper functioning of your system.
dbootstrap
is a simple, character-based application, designed for
maximum compatability in all situations (such as installation over a serial
line). It is very easy to use. 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 find you have 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 redirected to the third virtual terminal (known as
tty3). You can access this terminal by pressing Left
Alt-F3 (hold the Alt key while pressing the F3 function
key); get back to dbootstrap
with Left Alt-F1.
These messages can also be found in /var/log/messages
. After
installation, this log is copied to /var/log/installer.log
on your
new system.
The first screen dbootstrap
will present you with is the ``Release
Notes''. This screen presents the version information for the
boot-floppies
software you are using, and gives a brief
introduction to Debian developers.
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 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.
If you are installing a diskless workstation, the next few steps will be skipped, since there are no local disks to partition. In that case, your next step will be ``Configure the Network'', Section 7.13. After that, you will be prompted to mount your NFS root partition in ``Mount a Previously-Initialized Partition'', Section 7.10.
In certain unusual situations, you may wish to pre-load kernel modules from the floppy drive. Generally, you can ignore this alternate.
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.6, the next step 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:
atari-fdisk
fdisk
; read the atari-fdisk manual page
.
amiga-fdisk
fdisk
; read the amiga-fdisk manual page
.
mac-fdisk
fdisk
; read the mac-fdisk manual page
.
pmac-fdisk
fdisk
, also used by BVM and Motorola
VMEbus systems; read the pmac-fdisk manual
page
.
One of these programs will be run by default when you select ``Partition a Hard
Disk''. If the one which is run by default isn't the one you want, quit the
partitioner, go to the shell (tty2), and manually type in the name of the
program you want to use (and arguments, if any). Then skip the ``Partition a
Hard Disk'' step in dbootstrap
and continue to the next step.
A swap partition is strongly recommended, but you can do without one if you insist, and if your system has more than 5MB RAM. If you wish to do this, please select the ``Do Without a Swap Partition'' item from the menu.
This will be the next step 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 Enter.
Next, 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 help on upgrading to Debian 2.2, 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 ``Initialize a Linux Partition'' 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 asked whether to preserve ``Pre-2.2 Linux Kernel Compatibility?''. Saying ``No'' here means that you cannot run 2.0 or earlier Linux kernels on your system, since the file systems enable some features not supported in the 2.0 kernel. If you know you'll never need to run a 2.0 or earlier vintage kernel, then you can achieve some minor benefits by saying ``No'' here. The default is ``Yes'' in the name of compatibility.
You will also be asked about whether to scan for bad blocks. The default here is to skip the bad block scan, since the scan can be very time consuming, and modern disk drive controllers internally detect and deal with bad blocks. However, if you are at all unsure about the quality of your disk drive, or if you have a rather old system, you should probably do the bad block scan.
The next prompts are just confirmation steps. You will be asked to confirm
your action, since initializing is destructive to any data on the partition,
and you will be informed that the partition is being mounted as /
.
(Technically, it's being mounted at /target
; when you reboot into
the system itself, that will become /
.)
Once you've mounted the /
partition, if you have additional file
systems that you wish to initialize and mount, you should use the ``Alternate''
menu item. This is for those who have created separate partitions for
/boot
, /var
, /usr
or others, which ought
to be initialized and mounted at this time.
An alternative to ``Initialize a Linux Partition'', Section 7.9 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 or have data on it which you wish to preserve.
If you are installing a diskless workstation, at this point, you want to NFS
mount your root partition from the remote NFS server. Specify the path to the
NFS server in standard NFS syntax, namely,
server-name-or-IP:server-share-path. If you
need to mount additional filesystems as well, you can do that at this time.
The server-share-path for the BVM and Motorola VMEbus systems should
match the path specified in tftplilo.conf
on the TFTP server; it
is used to tell the Linux kernel which directory to mount when the installed
system is booted. The default path in tftplilo.conf
is
/nfshome/%C
, where %C is replaced by the IP address,
in dotted quad notation, of the booting client system.
If you have not already setup your network as described in ``Configure the Network'', Section 7.13, then selecting an NFS install will prompt you to do so.
The next step is to install a kernel and kernel modules onto your new system.
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. Remember that you can use any devices which is available to you, and that you are not restricted to using the same media you used to mount with (see Methods for Installing Debian, Chapter 5).
Note that the options presented to you will vary based on what hardware
dbootstrap
has detected. If you are installing from an official
CD-ROM, the software should do the right thing automatically.
If you are installing from a local filesystem, you have a choice between two
options. Select ``harddisk'' if the disk partition is not yet mounted; select
``mounted'' if it is. In both cases, you will be prompted to ``Choose Debian
archive path'' -- this is the directory within the disk where you have placed
the required installation files discussed in Booting from a Hard Disk, Section
6.3. If you have a Debian archive mirrored locally, you can use that by
giving the directory where that exists, which is often
/archive/debian
. Such archives are characterized by directory
structures such as debian/dists/stable/main/disks-m68k/current
.
You can type in the path manually, or use the <...> button
to browse through the filesystem tree.
Continuing the discusssion on installation from a local disk or similar medium
(such as NFS), you will next be prompted for the actual directory containing
the needed files (which may be based on your subarchitecture). Note that the
system may be quite insistent that the files appear in the precise location
indicated, including the subdirectories, if any. See the logs in tty3 (see Using the Shell and
Viewing the Logs, Section 7.1.1) where dbootstrap
will log the
location of the files it's looking for.
If the ``default'' option appears, then you should use that. Otherwise, try
the ``list'' option to let dbootstrap
try to find the actual files
on its own (but note that this can be very slow if you're mounting over NFS).
As a last resort, use the ``manual'' option to specify the directory manually.
On Macintosh systems, you will be offered three choices due to a quirk in the Linux HFS filesystem code:
/instmnt/debian/.finderinfo
/instmnt/debian/.resource
/instmnt/debian
Only the last directory actually contains the data portion of the files.
Either type in the right path, or skip the .finderinfo
and
.resource
entries.
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 Driver Floppies.
If you wish to install the kernel and modules over the network, you can do this using the ``network'' (HTTP) or ``nfs'' options. Your networking interfaces must be supported by the standard kernel (see Peripherals and Other Hardware, Section 2.4). If these ``nfs'' options don't appear, you need to select ``Cancel'', then go back and select the ``Configure the Network'' step (see ``Configure the Network'', Section 7.13), and then re-run this step.
Select the ``nfs'' option, and then tell dbootstrap
your NFS
server name and path. Assuming you've put the Rescue Floppy and Driver
Floppies images on the NFS server in the proper location, these files should be
available to you for installing the kernel and modules. The NFS filesystem
will be mounted under /instmnt
. Select the location of the files
as for ``harddisk'' or ``mounted''.
Select the ``network'' option, and then tell dbootstrap
the URL
and path to the Debian archive. The default will usually work fine, and in any
case, the path part is probably correct for any official Debian mirror, even if
you edit the server part. You may choose to pull the files in through a proxy
server; just enter the server ...this sentence isn't
finished...
If you are installing a diskless workstation, you should have already configured your networking as described in ``Configure the Network'', Section 7.13. You should be given the option to install the kernel and modules from NFS. Proceed using the ``nfs'' option described above.
Other steps may need to be taken for other installation media.
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. This includes Ethernet drivers.
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).
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/network/interfaces
.
During the ``Install the Base System'' step, you'll be offered a menu of devices from which you may install the base system. You should select the appropriate device.
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 http://http.us.debian.org/debian/dists/potato/main/disks-m68k/current/base2_2.tgz
file. If you have official 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.
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
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 http://http.us.debian.org/debian/dists/potato/main/disks-m68k/current/base2_2.tgz
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, 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 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, and you are not installing a diskless workstation, 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. 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 root partition 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 document does not even attempt to document the various boot managers, which vary by architecture and even by subarchitecture. You should see your boot manager's documentation for more information. Remember: when working with the boot manager, you can never be too careful.
FIXME: about the boot manager
If you are installing a diskless workstation, obviously, booting off the local disk isn't a meaningful option, and this step will be skipped.
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 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=root, where root is your root partition, such as ``/dev/sda1''.
If you have just performed a diskless install on a BVM or Motorola VMEbus
machine. Once the system has loaded the tftplilo
program from the
TFTP server, from the LILO Boot: prompt enter one of:
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/passwd
. 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/passwd
file and run a
brute force attack (i.e. run an automated test of all possible password
combinations) against it to try to determine passwords.
If you have shadow passwords enabled, passwords are instead stored in
/etc/shadow
, which is readable and writable only by root, and
readable by group shadow. Therefore, we recommend that you enable shadow
passwords.
Reconfiguration of the shadow password system can be done at any time with the
shadowconfig
program. After installation, see
/usr/share/doc/passwd/README.debian.gz
for more information.
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 3650 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.
In 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 base system comes with two editors:
ae
, which is very simple to use, but does not have a lot of
features, and elvis-tiny
, a limited clone of vi
. 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
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/ppp/pap-secrets
or /etc/ppp/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. Optionally, you could add the usepeerdns option
to the /etc/ppp/peers/provider
file, which will enable automatic
choosing of appropriate DNS servers, using settings the remote host usually
provides.
Unless your provider has a login sequence different from 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.
Read /usr/share/doc/ppp/README.Debian.gz
file for more information
on using PPP on Debian.
Information about the installation of the rest of your Debian system is
contained in a 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.21.