6.3. Using Individual Components

In this section we will describe each installer component in detail. The components have been grouped into stages that should be recognizable for users. They are presented in the order they appear during the install. Note that not all modules will be used for every installation; which modules are actually used depends on the installation method you use and on your hardware.

6.3.1. Setting up Debian Installer and Hardware Configuration

Let's assume the Debian Installer has booted and you are facing its first screen. At this time, the capabilities of debian-installer are still quite limited. It doesn't know much about your hardware, preferred language, or even the task it should perform. Don't worry. Because debian-installer is quite clever, it can automatically probe your hardware, locate the rest of its components and upgrade itself to a capable installation system. However, you still need to help debian-installer with some information it can't determine automatically (like selecting your preferred language, keyboard layout or desired network mirror).

You will notice that debian-installer performs hardware detection several times during this stage. The first time is targeted specifically at the hardware needed to load installer components (e.g. your CD-ROM or network card). As not all drivers may be available during this first run, hardware detection needs to be repeated later in the process.

6.3.1.1. Check available memory

One of the first things debian-installer does, is to check available memory. If the available memory is limited, this component will make some changes in the installation process which hopefully will allow you to install Debian GNU/Linux on your system.

During a low memory install, not all components will be available. One of the limitations is that you won't be able to choose a language for the installation.

6.3.1.2. Language Chooser

As the first step of the installation, select the language in which you want the installation process to proceed. The language names are listed in both English (left side) and in the language itself (right side); the names on the right side are also shown in the proper script for the language. The list is sorted on the English names.

The language you choose will be used for the rest of the installation process, provided a translation of the different dialogs is available. If no valid translation is available for the selected language, the installer will default to English. The selected language will also be used to help select a suitable keyboard layout.

6.3.1.3. Country Chooser

If you selected a language in Section 6.3.1.2, “Language Chooser” which has more than one country associated with it (true for Chinese, English, French, and many other languages), you can specify the country here. If you choose Other at the bottom of the list, you will be presented with a list of all countries, grouped by continent.

This selection will be used later in the installation process to pick the default timezone and a Debian mirror appropriate for your geographic location. If the defaults proposed by the installer are not suitable, you can make a different choice. The selected country, together with the selected language, may also affect locale settings for your new Debian system.

6.3.1.4. Choosing a Keyboard

Keyboards are often tailored to the characters used in a language. Select a layout that conforms to the keyboard you are using, 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 after 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. An 'extended' keyboard is one with F1 through F10 keys along the top row.

6.3.1.5. Looking for the Debian Installer ISO Image

When installing via the hd-media method, there will be a moment where you need to find and mount the Debian Installer iso image in order to get the rest of the installation files. The component iso-scan does exactly this.

At first, iso-scan automatically mounts all block devices (e.g. partitions) which have some known filesystem on them and sequentially searches for filenames ending with .iso (or .ISO for that matter). Beware that the first attempt scans only files in the root directory and in the first level of subdirectories (i.e. it finds /whatever.iso, /data/whatever.iso, but not /data/tmp/whatever.iso). After an iso image has been found, iso-scan checks its content to determine if the image is a valid Debian iso image or not. In the former case we are done, in the latter iso-scan seeks for another image.

In case the previous attempt to find an installer iso image fails, iso-scan will ask you whether you would like to perform a more thorough search. This pass doesn't just look into the topmost directories, but really traverses whole filesystem.

If iso-scan does not discover your installer iso image, reboot back to your original operating system and check if the image is named correctly (ending in .iso), if it is placed on a filesystem recognizable by debian-installer, and if it is not corrupted (verify the checksum). Experienced Unix users could do this without rebooting on the second console.

6.3.1.6. Configuring Network

As you enter this step, if the system detects that you have more than one network device, you'll be asked to choose which device will be your primary network interface, i.e. the one which you want to use for installation. The other interfaces won't be configured at this time. You may configure additional interfaces after installation is complete; see the interfaces(5) man page.

By default, debian-installer tries to configure your computer's network automatically via DHCP. If the DHCP probe succeeds, you are done. If the probe fails, it may be caused by many factors ranging from unplugged network cable, to a misconfigured DHCP setup. Or maybe you don't have a DHCP server in your local network at all. For further explanation check the error messages on the third console. In any case, you will be asked if you want to retry, or if you want to perform manual setup. DHCP servers are sometimes really slow in their responses, so if you are sure everything is in place, try again.

The manual network setup in turn asks you a number of questions about your network, notably IP address, Netmask, Gateway, Name server addresses, and a Hostname. Moreover, if you have a wireless network interface, you will be asked to provide your Wireless ESSID and a WEP key. Fill in the answers from Section 3.3, “Information You Will Need”.

Note

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 also guess your gateway. 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. Alternatively, you can install etherconf, which will step you through your network setup.

6.3.2. Partitioning and Mount Point Selection

At this time, after hardware detection has been executed a final time, debian-installer should be at its full strength, customized for the user's needs and ready to do some real work. As the title of this section indicates, the main task of the next few components lies in partitioning your disks, creating filesystems, assigning mountpoints and optionally configuring closely related issues like LVM or RAID devices.

6.3.2.1. Partitioning Your Disks

Now it is time to partition your disks. If you are uncomfortable with partitioning, or just want to know more details, see Appendix B, Partitioning for Debian.

First you will be given the opportunity to automatically partition either an entire drive, or free space on a drive. This is also called “guided” partitioning. If you do not want to autopartition, choose Manually edit partition table from the menu.

If you choose guided partitioning, you will be able to choose from the schemes listed in the table below. All schemes have their pros and cons, some of which are discussed in Appendix B, Partitioning for Debian. If you are unsure, choose the first one. Bear in mind, that guided partitioning needs certain minimal amount of free space to operate with. If you don't give it at least about 1GB of space (depends on chosen scheme), guided partitioning will fail.

Partitioning scheme Minimum space Created partitions
All files in one partition 600MB /, swap
Desktop machine 500MB /, /home, swap
Multi-user workstation 1GB /, /home, /usr, /var, /tmp, swap

If you chose an automatic partitioning for your Alpha system, an additional, unformatted partition will be allocated at the beginning of your disk to reserve this space for the aboot boot loader.

After selecting a scheme, the next screen will show your new partition table, including information on whether and how partitions will be formatted and where they will be mounted.

The list of partitions might look like this:

  IDE1 master (hda) - 6.4 GB WDC AC36400L
        #1 primary   16.4 MB     ext2       /boot
        #2 primary  551.0 MB     swap       swap
        #3 primary    5.8 GB     ntfs
           pri/log    8.2 MB     FREE SPACE

  IDE1 slave (hdb) - 80.0 GB ST380021A
        #1 primary   15.9 MB     ext3
        #2 primary  996.0 MB     fat16
        #3 primary    3.9 GB     xfs        /home
        #5 logical    6.0 GB     ext3       /
        #6 logical    1.0 GB     ext3       /var
        #7 logical  498.8 GB     ext3
        #8 logical  551.5 GB     swap       swap
        #9 logical   65.8 GB     ext2

This example shows two IDE harddrives divided into several partitions; the first disk has some free space. Each partition line consists of the partition number, its type, size, optional flags, file system, and mountpoint (if any).

This concludes the guided partitioning. If you are satisfied with the generated partition table, you can choose Finish partitioning and write changes to disk from the menu to implement the new partition table (as described at the end of this section). If you are not happy, you can choose to Undo changes to partitions, to run guided partitioning again or modify the proposed changes as described below for manual partitioning.

A similar screen to the one shown just above will be displayed if you choose manual partitioning except that your existing partition table will be shown and without the mount points. How to manually setup your partition table and the usage of partitions by your new Debian system will be covered in the remainder of this section.

If you select a pristine disk which doesn't have neither partitions nor free space on it, you will be offered to create a new partition table (this is needed so you can create new partitions). After this a new line entitled “FREE SPACE” should appear under the selected disk.

If you select some free space, you will be offered to create new partition. You will have to answer a quick series of questions about its size, type (primary or logical), and location (beginning or end of the free space). After this, you will be presented with detailed overview of your new partition. There are options like mountpoint, mount options, bootable flag, or way of usage. If you don't like the preselected defaults, feel free to change them to your liking. E.g. by selecting the option Use as:, you can choose different filesystem for this partition including the possibility to use the partition for swap, software RAID, LVM, or not use it at all. Other nice feature is the possibility to copy data from existing partition onto this one. When you are satisfied with your new partition, select Finished with partition and you will be thrown back to the partman's main screen.

If you decide you want to change something about your partition, simply select the partition, which will bring you to the partition configuration menu. Because this is the same screen like when creating a new partition, you can change the same set of options. One thing which might not be very obvious at a first glance is that you can resize the partition by selecting the item displaying the size of the partition. Filesystems known to work are at least fat16, fat32, ext2, ext3 and swap. This menu also allows you to delete a partition.

Be sure to create at least two partitions: one for the root filesystem (which must be mounted as /) and one for swap. If you forget to mount the root filesystem, partman won't let you continue until you correct this issue.

Capabilities of partman can be extended with installer modules, but are dependent on your system's architecture. So if you can't see all promised goodies, check if you have loaded all required modules (e.g. partman-ext3, partman-xfs, or partman-lvm).

After you are satisfied with partitioning, select Finish partitioning and write changes to disk from the partitioning menu. You will be presented with a summary of changes made to the disks and asked to confirm that the filesystems should be created as requested.

6.3.2.2. Configuring Logical Volume Manager (LVM)

If you are working with computers at the level of system administrator or “advanced” user, you have surely seen the situation where some disk partition (usually the most important one) was short on space, while some other partition was grossly underused and you had to manage this situation with moving stuff around, symlinking, etc.

To avoid the described situation you can use Logical Volume Manager (LVM). Simply said, with LVM you can combine your partitions (physical volumes in LVM lingo) to form a virtual disc (so called volume group), which can then be divided into virtual partitions (logical volumes). The point is that logical volumes (and of course underlying volume groups) can span across several physical discs.

Now when you realize you need more space for your old 160GB /home partition, you can simply add a new 300GB disc to the computer, join it with your existing volume group and then resize the logical volume which holds your /home filesystem and voila — your users have some room again on their renewed 460GB partition. This example is of course a bit oversimplified. If you haven't read it yet, you should consult the LVM HOWTO.

LVM setup in debian-installer is quite simple. At first, you have to mark your partitions to be used as physical volumes for LVM. (This is done in partman in the Partition settings menu where you should select Use as:->physical volume for LVM.) Then start the lvmcfg module (either directly from partman or from the debian-installer's main menu) and combine physical volumes to volume group(s) under the Modify volume groups (VG) menu. After that, you should create logical volumes on the top of volume groups from the menu Modify logical volumes (LV).

After returning from lvmcfg back to partman, you will see any created logical volumes in the same way as ordinary partitions (and you should treat them like that).

6.3.2.3. Configuring Multidisk Device (Software RAID)

If you have more than one harddrive[7] in your computer, you can use mdcfg to setup your drives for increased performance and/or better reliability of your data. The result is called Multidisk Device (or after its most famous variant software RAID).

MD is basically a bunch of partitions located on different disks and combined together to form a logical device. This device can then be used like an ordinary partition (i.e. in partman you can format it, assign a mountpoint, etc.).

The benefit you gain depends on a type of a MD device you are creating. Currently supported are:

RAID0

Is mainly aimed at performance. RAID0 splits all incoming data into stripes and distributes them equally over each disk in the array. This can increase the speed of read/write operations, but when one of the disks fails, you will loose everything (part of the information is still on the healthy disk(s), the other part was on the failed disk).

The typical use for RAID0 is a partition for video editing.

RAID1

Is suitable for setups where reliability is the first concern. It consists of several (usually two) equally sized partitions where every partition contains exactly the same data. This essentially means three things. First, if one of your disks fails, you still have the data mirrored on the remaining disks. Second, you can use only a fraction of the available capacity (more precisely, it is the size of the smallest partition in the RAID). Third, file reads are load balanced among the disks, which can improve performance on a server, such as a file server, that tends to be loaded with more disk reads than writes.

Optionally you can have a spare disk in the array which will take the place of the failed disk in the case of failure.

RAID5

Is a good compromise between speed, reliability and data redundancy. RAID5 splits all incomming data into stripes and distributes them equally on all but one disks (similar to RAID0). Unlike RAID0, RAID5 also computes parity information, which gets written on the remaining disk. The parity disk is not static (that would be called RAID4), but is changing periodically, so the parity information is distributed equally on all disks. When one of the disks fails, the missing part of information can be computed from remaining data and its parity. RAID5 must consist of at least three active partitions. Optionally you can have a spare disk in the array which will take the place of the failed disk in the case of failure.

As you can see, RAID5 has similar degree of reliability like RAID1 while achieving less redundancy. On the other hand it might be a bit slower on write operation than RAID0 due to computation of parity information.

To sum it up:

Type Minimum Devices Spare Device Survives disk failure? Available Space
RAID0 2 no no Size of the smallest partition multiplied by number of devices in RAID
RAID1 2 optional yes Size of the smallest partition in RAID
RAID5 3 optional yes Size of the smallest partition multiplied by (number of devices in RAID minus one)

If you want to know the whole truth about Software RAID, have a look at Software RAID HOWTO.

To create a MD device, you need to have the desired partitions it should consist of marked for use in a RAID. (This is done in partman in the Partition settings menu where you should select Use as:->Use the partition as a RAID device.)

Warning

Support for MD is a relatively new addition to the installer. You may experience problems for some RAID levels and in combination with some bootloaders if you try to use MD for the root (/) filesystem. For experienced users, it may be possible to work around some of these problems by executing some configuration or installation steps manually from a shell.

Next, you should choose Configure software RAID from the main partman menu. On the first screen of mdcfg simply select Create MD device. You will be presented with a list of supported types of MD devices, from which you should choose one (e.g. RAID1). What follows depends on the type of MD you selected.

  • RAID0 is simple — you will be issued with the list of available RAID partitions and your only task is to select the partitions which will form the MD.

  • RAID1 is a bit more tricky. First, you will be asked to enter the number of active devices and the number of spare devices which will form the MD. Next, you need to select from the list of available RAID partitions those that will be active and then those that will be spare. The count of selected partitions must be equal to the number provided few seconds ago. Don't worry. If you make a mistake and select different number of partitions, the debian-installer won't let you continue until you correct the issue.

  • RAID5 has similar setup procedure as RAID1 with the exception that you need to use at least three active partitions.

It is perfectly possible to have several types of MD at once. For example if you have three 200 GB hard drives dedicated to MD, each containing two 100 GB partitions, you can combine first partitions on all three disk into the RAID0 (fast 300 GB video editing partition) and use the other three partitions (2 active and 1 spare) for RAID1 (quite reliable 100 GB partition for /home).

After you setup MD devices to your liking, you can Finish mdcfg to return back to the partman to create filesystems on your new MD devices and assign them the usual attributes like mountpoints.

6.3.3. Installing the Base System

Although this stage is the least problematic, it consumes most time of the install because it downloads, verifies and unpacks the whole base system. If you have a slow computer or network connection, this could take some time.

6.3.3.1. Base System Installation

During the Base installation, package unpacking and setup messages are redirected to tty3. You can access this terminal by pressing Left Alt-F3; get back to the main installer process with Left Alt-F1.

The unpack/setup messages generated by the base installation are saved in /var/log/messages when the installation is performed over a serial console.

As part of the installation, a Linux kernel will be installed. At the default priority, the installer will choose one for you that best matches your hardware. In lower priority modes, you will be able to choose from a list of available kernels.

6.3.4. Making Your System Bootable

If you are installing a diskless workstation, obviously, booting off the local disk isn't a meaningful option, and this step will be skipped.

Note that multiple operating systems 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.

6.3.4.1. Detecting other operating systems

Before a boot loader is installed, the installer will attempt to probe for other operating systems which are installed on the machine. If it finds a supported operating system, you will be informed of this during the boot loader installation step, and the computer will be configured to boot this other operating system in addition to Debian.

Note that multiple operating systems booting on a single machine is still something of a black art. The automatic support for detecting and setting up boot loaders to boot other operating systems varies by architecture and even by subarchitecture. If it does not work you should consult your boot manager's documentation for more information.

Note

The installer may fail to detect other operating systems if the partitions on which they reside are mounted when the detection takes place. This may occur if you select a mountpoint (e.g. /win) for a partition containing another operating system in partman, or if you have mounted partitions manually from a console.

6.3.4.2. Install aboot on a Hard Disk

If you have booted from SRM, if you select this option, the installer will write aboot to the first sector of the disk on which you installed Debian. Be very careful — it is not possible to boot multiple operating systems (e.g. GNU/Linux, Free/Open/NetBSD, OSF/1 a.k.a. Digital Unix a.k.a. Tru64 Unix, or OpenVMS) from the same disk. If you also have a different operating system installed on the disk where you have installed Debian, you will have to boot GNU/Linux from a floppy instead.

6.3.4.3. Continue Without Boot Loader

This option can be used to complete the installation even when no boot loader is to be installed, either because the arch/subarch doesn't provide one, or because none is desired (e.g. you will use existing boot loader).

If you plan to manually configure your bootloader, you should check the name of the installed kernel in /target/boot. You should also check that directory for the presence of an initrd; if one is present, you will probably have to instruct your bootloader to use it. Other information you will need are the disk and partition you selected for your / filesystem and, if you chose to install /boot on a separate partition, also your /boot filesystem.

6.3.5. Finishing the First Stage

These are the last bits to do before rebooting to your new Debian. It mostly consists of tidying up after the debian-installer.

6.3.5.1. Finish the Installation and Reboot

This is the last step in the initial Debian installation process. You will be prompted to remove the boot media (CD, floppy, etc) that you used to boot the installer. The installer will do any last minute tasks, and then reboot into your new Debian system.

6.3.6. Miscellaneous

The components listed in this section are usually not involved in the installation process, but are waiting in the background to help the user in case something goes wrong.

6.3.6.1. Saving the installation logs

If the installation is successful, the logfiles created during the installation process will be automatically saved to /var/log/debian-installer/ on your new Debian system.

Choosing Save debug logs from the main menu allows you to save the log files to a floppy disk. This can be useful if you encounter fatal problems during the installation and wish to study the logs on another system or attach them to an installation report.

6.3.6.2. Using the Shell and Viewing the Logs

There is an Execute a Shell item on the menu. If the menu is not available when you need to use the shell, press Left Alt-F2 (on a Mac keyboard, Option-F2) to switch 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 and by typing help. The text editor is nano. The shell has some nice features like autocompletion and history.

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, or type exit if you used a menu item to open the shell.

6.3.6.3. Running base-config From Within debian-installer

It is possible to configure the base system within the first stage installer (before rebooting from the hard drive), by running base-config in a chroot environment. This is mainly useful for testing the installer and a vast majority of people should avoid it.



[7] To be honest, you can construct MD device even from partitions residing on single physical drive, but that won't bring you anything useful.