[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]

Installing Debian GNU/Linux 2.1 For SPARC - Chapter 7
Using dbootstrap for Initial System Configuration

7.1 Introduction to 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 IP address, 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 Left Alt-F3 (hold the Alt key while pressing the F3 function key); get back to dbootstrap with Left Alt-F1.

7.2 ``Select Color or Monochrome display''

Once the system has finished booting, you should see the ``Select Color or Monochrome display'' dialog box. That is, unless you are booting from a serial console. In that case, this dialog will be skipped; continue below at ``Debian GNU/Linux Installation Main Menu'', Section 7.3.

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 is only capable of black-and-white, use the arrow keys to move the cursor to the ``Next'' menu item and then Enter to continue with the installation.

7.3 ``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.''. 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.

7.4 ``Configure the Keyboard''

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.

Due to a bug in dbootstrap, if you are running from a serial console, you will see a message such as ``Cannot open /dev/tty0'' when the system tries to load the keymap. Just ignore this problem and continue.

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.12. After that, you will be prompted to mount your NFS root partition in ``Mount a Previously-Initialized Partition'', Section 7.9.

7.5 Last Chance!

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.

7.6 ``Partition a Hard Disk''

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 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:

The original Linux disk partitioner, good for gurus; read the 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.

Make sure you create a ``Sun disk label'' on your boot disk. This is the only kind of partition scheme that the OpenBoot PROM understands, and so it's the only scheme from which you can boot. The s key is used in fdisk to create Sun disk labels.

Furthermore, on SPARC disks, make sure your first partition on your boot disk starts at cylinder 0. While this is required, it also means that the first partition will contain the partition table and the boot block, which are the first two sectors of the disk. You must not put swap on the first partition of the boot drive, since swap partitions do not preserve the first few sectors of the partition. You can put Ext2 or UFS partitions there; these will leave the partition table and the boot block alone.

It is also advised that the third partition should be of type ``Whole disk'' (type 5), and contain the entire disk (from the first cylinder to the last). This is simply a convention of Sun disk labels, and helps the SILO boot loader keep its bearings.

7.7 ``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, 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.''. Note that on the Sun4u architecture, a bug in dbootstrap will prevent you from creating swap at this point. You can create swap later, once the base system is installed. 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 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.

7.8 ``Initialize a Linux Partition''

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 2.1, 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.

7.9 ``Mount a Previously-Initialized Partition''

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.

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.

7.10 ``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 (as you planned in Choosing Initial Boot Media, Section 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 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.

If you wish to install the kernel and modules over the network, you can do this using the ``nfs'' option. Your networking interfaces must be supported by the standard kernel (see Peripherals and Other Hardware, Section 2.4). If the ``nfs'' option doesn't appear, you need to select ``Cancel'', then go back and select the ``Configure the Network'' step (see ``Configure the Network'', Section 7.12). 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 Drivers Floppy images on the NFS server in the proper location, these file should be available to you for installing the kernel and modules.

If you are installing a diskless workstation, you should have already configured your networking as described in ``Configure the Network'', Section 7.12. You should be given the option to install the kernel and modules from NFS. Proceed just as in the above paragraph.

Other steps may need to be taken for other installation media.

7.11 ``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 (see Choosing Media for Installing Base, Section 5.1.2). This includes ethernet drivers.

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

7.12 ``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 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/init.d/network. (On a Debian system, daemons are started by scripts in /etc/init.d/.)

7.13 ``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. You should select the appropriate device, depending on the choice you made in Choosing Media for Installing Base, Section 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 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 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.

7.14 ``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 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.

7.15 ``Make Linux Bootable Directly From Hard Disk''

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 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.

The standard sparc boot loader is called ``silo''. It is documented in /usr/doc/silo/. 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 may wish to set the OpenBoot to boot from the network by default; see Boot Device Selection, Section 3.3.2.

7.16 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 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''.

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

7.17 Set the Root Password

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.

7.18 Create an Ordinary User

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''.

7.19 Shadow Password Support

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 against it to try to determine passwords.

If you have shadow passwords enabled, passwords are instead stored in /etc/shadow, which is 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. After installation, see /usr/doc/passwd/README.debian.gz for more information.

7.20 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 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 2000 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.

7.21 Log In

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.

7.22 Setting up PPP

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/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 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.

7.23 Installing the Rest of Your System

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.20.

[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]
Installing Debian GNU/Linux 2.1 For SPARC
version 2.1.11, 28 August, 1999
Bruce Perens
Sven Rudolph
Igor Grobman
James Treacy
Adam Di Carlo