2.2. Starting the Debian Installer

When the installer boots, its menu offers a graphical install, a text install, advanced options, help, and an accessible entry. The graphical installer is the default on amd64 and uses the same components as the text installer with a different front end. The advanced options lead to expert mode, rescue mode, and automated installation. Most installations need only the default entry and the answers described in this section.

The installer performs hardware detection more than once. The first pass loads the components needed to reach the installation media and the network; a later pass, after the installer has loaded its full set of modules, detects storage and other devices. A device missing in the first pass can appear later, and a firmware request in the first pass can be answered before the main menu is complete.

2.2.1. Language, Keyboard, and Accessibility Options

The first questions select the language used by the installer, the geographic location, and the locale used by the installed system. Language controls the translation of the installer dialogs. Location controls the default time zone and the list of package mirrors. The locale controls character encoding, collation, and the language of installed programs that have translations.

The installer offers a C locale at the top of the language list. Choosing it runs the installation in English and does not install the locales package, so the installed system has no localization support. C.UTF-8 is different: it is the C locale with UTF-8 encoding, and it is the locale on the example system. It handles non-ASCII text but does not translate messages. The installed system's locale settings can be read with locale:

$ locale
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

LANG is the default for every category that is not set separately. The quoted values are expanded by locale for display; each category inherits C.UTF-8 here. C.UTF-8 is a workable baseline for a server whose administrators work in English; a desktop installation normally selects a language-specific locale during the installer's localization step.

The keyboard layout is a separate choice from the language. The boot prompt interprets the keyboard as US QWERTY even before the installer's keyboard question, so any boot parameters typed there must be typed as if the keyboard were US English. After installation, the console keymap and the graphical layout are recorded separately, and localectl reads both.

$ localectl status
System Locale: LANG=C.UTF-8
    VC Keymap: (unset)
   X11 Layout: us
    X11 Model: pc105
  X11 Options: ctrl:nocaps,terminate:ctrl_alt_bksp

The virtual-console keymap is unset on the example image, and its X11 options were set when the image was built - a normal installation configures both from the installer's keyboard question. Neither value affects the installer itself, which used its own layout. The settings can be corrected after installation with dpkg-reconfigure keyboard-configuration, and a wrong locale with dpkg-reconfigure locales once the locales package is installed.

Subcommand or option Description
status Show the current locale, console keymap, and X11 layout.
set-locale LOCALE Set the system-wide locale.
set-keymap MAP Set the virtual-console keymap.
set-x11-keymap LAYOUT Set the X11 layout and optional model, variant, and options.

The installer's accessibility support is chosen at the boot menu, before any question is asked. Software speech synthesis is available on all images that carry the graphical installer - the netinst and DVD images and the graphical netboot variant - and is started by typing s and Enter at the boot menu; the spoken language follows the language selection. USB braille displays are detected automatically; hardware speech synthesizers need a speakup.synth=driver boot parameter because they cannot be probed safely. The boot menu beeps when it is ready: once on BIOS systems, twice on UEFI systems.

Front end Selection Strength Limitation
Graphical Default boot entry Mouse, more languages, several questions per screen Needs about 810 MB of memory; with less it falls back to text, and below 780 MB the graphical entry may fail to boot
Text/newt Install entry Works with little memory; keyboard-driven Fewer languages are displayed correctly
Speech s at the boot menu Spoken prompts and navigation Requires audio output; the rate and volume are adjusted with CapsLock keys
Braille Detected USB display or brltty= parameter Tactile access to the text installer Serial displays need an explicit driver and port

Expert mode, rescue mode, and automated installation are reachable from the advanced options menu with the same accessibility features available. The accessibility entries are documented in the Installation Guide's boot-screen section; the remainder of this chapter describes the default path.

2.2.2. Detecting Hardware and Providing Firmware

The installer probes the PCI bus, loads drivers for the devices it finds, and records the results in the kernel ring buffer. lspci shows the devices and the driver currently bound to each one.

Option Description
-nn Show numeric vendor and device IDs as well as names.
-k Show the kernel driver in use and available kernel modules.
-v Show verbose capability and status information.
-s bus:device.function Select one device by its PCI address.
$ lspci -nnk | grep -A3 -E "VGA|Ethernet|SCSI"
00:02.0 VGA compatible controller [0300]: Cirrus Logic GD 5446 [1013:00b8]
    Subsystem: Red Hat, Inc. QEMU Virtual Machine [1af4:1100]
    Kernel driver in use: cirrus
    Kernel modules: cirrusfb, cirrus
00:03.0 SCSI storage controller [0100]: Red Hat, Inc. Virtio block device [1af4:1001]
    Subsystem: Red Hat, Inc. Device [1af4:0002]
    Kernel driver in use: virtio-pci
00:04.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon [1af4:1002]
--
00:05.0 Ethernet controller [0200]: Red Hat, Inc. Virtio network device [1af4:1000]
    Subsystem: Red Hat, Inc. Device [1af4:0001]
    Kernel driver in use: virtio-pci

The pipeline has two stages: lspci lists every PCI device, and grep keeps the display, storage, and network controllers plus three lines of context after each match; the -- line marks where an unmatched section was skipped. On the virtual machine, the display, storage, and network devices are all virtio or emulated hardware with in-kernel drivers, and none needs a separately loaded firmware file. A physical machine shows its real GPU and network adapters here, and the Kernel driver in use line is the first place to look when a device does not work.

The kernel ring buffer records storage and firmware messages as devices are detected. dmesg reads that buffer; restricting it to a few patterns keeps the output readable, and head stops after the first 20 matching lines.

Option Description
--level=list Show only messages at the listed levels, such as err,warn.
-T Print human-readable timestamps.
-w Follow new messages as they arrive.
-H Use paging and human-readable output.
$ sudo dmesg | grep -i -E "virtio_blk|ata_piix|firmware" | head -20
[    1.906954] virtio_blk virtio0: 1/0/0 default/read/poll queues
[    1.945521] virtio_blk virtio0: [vda] 209715200 512-byte logical blocks (107 GB/100 GiB)
[    2.097072] ata_piix 0000:00:01.1: version 2.13
[    2.103162] scsi host0: ata_piix
[    2.104447] scsi host1: ata_piix
[    3.726564] systemd[1]: systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info skipped, unmet condition check ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67

sudo is needed because the buffer is restricted to unprivileged readers on recent kernels. The virtio block driver attaches the 100 GiB disk as vda, and ata_piix registers the emulated IDE controller. The last line is a systemd service noting that UEFI hibernation state is absent, consistent with BIOS boot. The absence of firmware: failed to load messages is useful evidence, but not proof that every device is satisfied: a driver may request firmware later, when the device is first used.

When a driver requests firmware that is not available, the installer displays a dialog naming the missing file. The official images include many firmware packages, but not all. The recommended way to supply missing firmware is a FAT-formatted USB stick with the firmware files or packages in its root directory or in a directory named firmware; the installer scans the medium, copies the files to /lib/firmware, and reloads the driver. Tarballs and zip files with the current firmware packages for a release are published under https://cdimage.debian.org/cdimage/firmware/. If the firmware came from a package, the installer also installs that package on the target system and adds the non-free-firmware archive component to APT's sources, so the firmware keeps updating later.

Skipping the firmware dialog is reasonable only when the device is not needed during installation and either is not needed after boot or can be repaired later by installing the firmware package. A network adapter without its firmware may prevent the installer from reaching a mirror; a graphics adapter without its firmware may leave a black screen after reboot. The example machine has no physical Wi-Fi or GPU hardware that needs firmware files, so this branch is the documented procedure above rather than a captured dialog.

2.2.3. Configuring Installation Networking and Package Mirrors

If the machine has more than one network interface, the installer asks which one to use for the installation, then tries DHCP for IPv4 and IPv6. If automatic configuration fails, it offers a retry or a manual configuration with an address, prefix length or netmask, gateway, name servers, and hostname. The manual screen is also where a wireless ESSID and passphrase are entered when the installer supports the adapter.

On the installed system, APT reads its sources from a configuration file. The example image uses a traditional one-line-per-source file:

$ cat /etc/apt/sources.list
deb https://deb.debian.org/debian trixie main
deb-src https://deb.debian.org/debian trixie main
deb https://security.debian.org/debian-security trixie-security main
deb-src https://security.debian.org/debian-security trixie-security main
deb https://deb.debian.org/debian trixie-updates main
deb-src https://deb.debian.org/debian trixie-updates main
deb https://deb.debian.org/debian trixie-backports main
deb-src https://deb.debian.org/debian trixie-backports main

main is the archive component that contains software complying with the Debian Free Software Guidelines. trixie is the stable suite, trixie-updates carries point-release updates, and trixie-security carries security updates from the security archive. trixie-backports provides newer packages rebuilt for stable and is optional. The deb-src lines download source package indexes and are not needed to install binaries. A current Debian 13 installation normally writes the equivalent deb822 format to /etc/apt/sources.list.d/debian.sources; the suite, component, and archive names mean the same thing there. Chapter 6 covers both formats and the keys that sign them.

The installed system's addressing, routing, and resolver state can be inspected with ip and the resolver file. -br selects a brief, one-line layout.

Option Description
-br Brief output, one line per object.
addr Show interface addresses.
route Show the routing table.
-4 / -6 Restrict output to IPv4 or IPv6.
link Show interface flags, MTU, and link state.
$ ip -br addr
lo               UNKNOWN        127.0.0.1/8 ::1/128 
eth0             UP             192.168.121.39/24 fe80::5054:ff:fe30:78ce/64 

eth0 is up with the IPv4 address 192.168.121.39/24 and an IPv6 link-local address. The /24 is the prefix length, equivalent to the netmask 255.255.255.0; the loopback interface carries the usual 127.0.0.1 and ::1.

$ ip route
default via 192.168.121.1 dev eth0 
192.168.121.0/24 dev eth0 proto kernel scope link src 192.168.121.39 

The first line is the default route: traffic for addresses outside the local prefix goes to the gateway 192.168.121.1 through eth0. The second line is the connected route for the local subnet, installed by the kernel when the address was configured.

$ cat /etc/resolv.conf
nameserver 192.168.121.1

The resolver uses the gateway as its name server. A system running a local resolver such as systemd-resolved shows a loopback address or a symlink here; Chapter 17 explains how the effective resolver is assembled.

Resolve a name through the system's name service switch. getent hosts asks for host entries and prints the addresses and canonical names it finds.

$ getent hosts deb.debian.org
2a04:4e42:20::644 debian.map.fastlydns.net deb.debian.org

The resolver returned an IPv6 address and the canonical name. A different network returns IPv4, IPv6, or both; the important result is that the name resolved. getent does not test whether the remote service is reachable, only that the name service produced an answer.

Test the first hop with a single ICMP echo request. -c 1 sends one packet and -W 2 bounds the wait to two seconds.

$ ping -c 1 -W 2 192.168.121.1
PING 192.168.121.1 (192.168.121.1) 56(84) bytes of data.
64 bytes from 192.168.121.1: icmp_seq=1 ttl=64 time=0.263 ms

--- 192.168.121.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.263/0.263/0.263/0.000 ms

The gateway answers, so the local link and the first hop work. Some networks filter ICMP, so a failed ping does not prove the network is down; use the address, route, and name-resolution checks together rather than one test alone.

APT reads the source list, downloads the signed index files, and stores them locally. sudo asks for john's password the first time in a session and remembers the authentication for a short period afterwards; the password is not echoed while it is typed.

Option Description
update Refresh package indexes from the configured sources.
install package Install a package and its required dependencies.
-s, --simulate Show what would happen without changing the system.
--error-on=any Return a failure status if any source fails.
-o KEY=VALUE Override an APT configuration setting for this command.
$ sudo apt-get update
Hit:1 https://security.debian.org/debian-security trixie-security InRelease
Hit:2 https://deb.debian.org/debian trixie InRelease
Hit:3 https://deb.debian.org/debian trixie-updates InRelease
Hit:4 https://deb.debian.org/debian trixie-backports InRelease
Reading package lists...

Hit means the index has not changed since the last download. A successful update establishes that the configured sources are reachable and their signatures verified; it does not establish that every package can be installed, because dependencies are resolved later.

An unreachable mirror is easier to diagnose when APT is told to treat any source failure as an error. The following exercise uses a source list and package cache inside the workspace, so the system's normal APT state is not touched. The address 192.0.2.1 is in the TEST-NET-1 documentation range and is not a Debian mirror. The first command is silent; it creates the directory layout APT expects.

$ mkdir -p ~/debian-handbook/installation/apt-lists/partial ~/debian-handbook/installation/apt-cache/archives/partial

Write the source file with a redirection; it prints nothing to the terminal.

$ printf 'deb http://192.0.2.1/debian trixie main\n' > ~/debian-handbook/installation/unreachable.list

Read the file back to confirm what was written.

$ cat ~/debian-handbook/installation/unreachable.list
deb http://192.0.2.1/debian trixie main

Run update with the isolated configuration. The -o settings point APT at the exercise source list and the workspace directories, disable the normal source-parts directory, keep root as the download sandbox user because the workspace belongs to john, and shorten the timeout and retry count so the failure is quick.

$ sudo apt-get --error-on=any -o Dir::Etc::sourcelist=/home/john/debian-handbook/installation/unreachable.list -o Dir::Etc::sourceparts=- -o Dir::State::lists=/home/john/debian-handbook/installation/apt-lists -o Dir::Cache=/home/john/debian-handbook/installation/apt-cache -o APT::Sandbox::User=root -o Acquire::http::Timeout=3 -o Acquire::Retries=0 update
Err:1 http://192.0.2.1/debian trixie InRelease
  Could not connect to 192.0.2.1:80 (192.0.2.1), connection timed out
Reading package lists...
E: Failed to fetch http://192.0.2.1/debian/dists/trixie/InRelease  Could not connect to 192.0.2.1:80 (192.0.2.1), connection timed out
E: Some index files failed to download. They have been ignored, or old ones used instead.

The command exits 100 because --error-on=any turns the source failure into an error. Could not connect points at routing, a firewall, or a server that is not listening; a name-resolution failure would name the host instead. The isolated source file did not change the system's configuration; confirm that the normal sources still work by running the ordinary update again.

$ sudo apt-get update
Hit:1 https://security.debian.org/debian-security trixie-security InRelease
Hit:2 https://deb.debian.org/debian trixie InRelease
Hit:3 https://deb.debian.org/debian trixie-updates InRelease
Hit:4 https://deb.debian.org/debian trixie-backports InRelease
Reading package lists...

The recovery update reaches all four configured sources again. During installation, the mirror question appears after the network is configured. The installer offers a country-based list and deb.debian.org as the default; that name redirects to a mirror that is normally current and fast. If the default is unreachable, choose another mirror or enter a host name manually. On an IPv6-only network the default may be unreachable even when other mirrors answer; the Installation Guide suggests ftp.ipv6.debian.org as an IPv6 alias for such networks. If no mirror is reachable, the installer can continue from a DVD, but a netinst installation without a mirror will not have the packages needed for a desktop task or most server tasks.