2.4. Installing the Base System and Software

After partitioning, the installer creates filesystems, installs the base system, downloads or reads the selected tasks, and installs the boot loader. This is the longest phase. Package unpacking and configuration messages are written to the fourth virtual console, reached with Left Alt+F4; Left Alt+F1 returns to the installer. The messages are also saved in the installer's log (Section 2.6.3). The base system is installed without the packages that other packages merely recommend; the task-selection stage that follows uses APT's normal recommendation behavior, which is why a task-based installation is larger than the base system alone.

2.4.1. Creating Filesystems and Reviewing Destructive Changes

The partitioner shows the planned layout - each partition's size, filesystem, and mount point - before it writes anything. Read this screen as a destructive-change review: the device name, the partition sizes, and the mount points must match the plan. Undo changes to partitions returns to the partitioner; Finish partitioning and write changes to disk commits the table and then asks for confirmation before creating filesystems.

The filesystems and identifiers the installer produced can be inspected after installation. lsblk -f shows the filesystem type, version, label, UUID, and usage for each block device:

$ lsblk -f
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
vda                                                                           
└─vda1 ext4   1.0         be225267-eaf4-410c-9ffa-5cd32b221ce0     88G     5% /

The disk itself has no filesystem; the filesystem lives on the partition. The UUID is the stable identifier the installer writes into /etc/fstab. Device names such as /dev/vda1 can change when disks are added or reordered; UUIDs normally do not. blkid prints the same identifiers plus the partition's own UUID:

$ sudo blkid
/dev/vda1: UUID="be225267-eaf4-410c-9ffa-5cd32b221ce0" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="3427c43a-01"

UUID identifies the filesystem, PARTUUID the partition, and BLOCK_SIZE the filesystem's block size. The static filesystem table records how the system mounts these at boot:

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file sys>    <mount point>   <type>  <options>   <dump>  <pass>

# device during installation: /dev/loop0p1
UUID=be225267-eaf4-410c-9ffa-5cd32b221ce0   /   ext4    rw,discard,errors=remount-ro    0   1
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
#VAGRANT-END

The root entry names the filesystem by its UUID, the mount point, the type, and the options seen earlier with findmnt. The dump field is unused by current tools, and the final 1 schedules a filesystem check of the root before other filesystems. The comment naming /dev/loop0p1 and the two VAGRANT markers record how the example image was built; an installation made by the Debian installer has neither. On a UEFI system the table also contains a vfat entry for /boot/efi, and an encrypted LVM system activates LUKS and LVM before mounting the logical volumes.

The installer offers a choice of filesystem for each partition it formats:

Filesystem Installer role Growth and shrink Notes
ext4 Default for root and general use Grow online; shrink offline with care Journaling, mature repair tools, the usual choice
ext2, ext3 Available Same tools as ext4 No reason to prefer them for a new installation
XFS Available for large volumes Grow online; cannot shrink Journaling; good for large, growing data volumes
JFS Available, architecture-dependent Grow; shrinking not supported Rarely a new choice
swap Swap area, not a mounted filesystem Resize by recreating Memory pressure and hibernation; hibernation needs at least RAM
FAT32 EFI system partition Resize with partition tools Required on UEFI; mounted at /boot/efi; not for the root filesystem

Btrfs is available in the archive and covered in Chapter 12, but the guided installer does not offer it. Whatever the choice, the installer creates the filesystems; do not run mkfs by hand on a device unless you have identified it and intend to erase it. mkfs.ext4 /dev/vda1 on a mounted root filesystem fails or corrupts the running system, and the same command on the wrong disk destroys unrelated data. If a shell is needed during installation, identify the target with lsblk -f and findmnt before any formatting command. Chapter 11 covers partition management and Chapter 12 filesystem administration.

2.4.2. Choosing Desktop Environments and Server Tasks

The installer's software-selection screen uses tasksel to present collections of packages. A task is not a single package; selecting it installs a group of packages that the Debian maintainers consider useful for that role. The list of tasks, with each task's current state, can be inspected after installation.

Option Description
--list-tasks List available tasks and their installation state.
--task-packages task List the packages that make up a task.
install task Install a task from the command line.
$ tasksel --list-tasks
i desktop   Debian desktop environment
u gnome-desktop GNOME
i xfce-desktop  Xfce
u gnome-flashback-desktop   GNOME Flashback
u kde-desktop   KDE Plasma
u cinnamon-desktop  Cinnamon
u mate-desktop  MATE
u lxde-desktop  LXDE
u lxqt-desktop  LXQt
u web-server    web server
u ssh-server    SSH server
u laptop    laptop
u blendsel  Choose a Debian Blend for installation

The first column is the task's state: i installed, u not installed. On the example image the desktop and Xfce tasks are installed - that is why the machine boots toward a graphical target - while a minimal netinst installation with no desktop task selected shows u for all of them. The listing shows what tasks exist and which are present, not which individual packages the tasks installed.

Task Installs Choose when
desktop A Debian desktop environment, defaulting to GNOME A graphical workstation is wanted
gnome-desktop, kde-desktop, xfce-desktop, and the other environment tasks One specific desktop environment The desktop choice is known and its dependencies are acceptable
web-server Apache and related packages The machine will serve HTTP content
ssh-server The OpenSSH server Remote administration over SSH is required
laptop Power-management and laptop-specific tools The system is a portable machine
blendsel A selected Debian Pure Blend A curated field-specific package set is wanted

The desktop task is large, especially over netinst, because most of its packages come from the mirror; the Installation Guide warns that once the task installation has started there is no option to cancel it. Select only the tasks the machine needs: a server administered over SSH does not need a desktop, and a workstation that will use one environment does not need several. Multiple desktop environments are possible but some combinations are not co-installable, and more than one display manager can produce a login screen that starts an unexpected session. The standard system utilities task installs every package of priority standard - many common command-line tools - and should stay selected unless a deliberately minimal system is wanted. If a language-specific locale was selected earlier, tasksel also installs localization packages for that locale and for the selected desktop.

Starting with Debian 13, the task list also offers Choose a Debian Blend for installation, which opens a second selection dialog (blendsel) of curated Pure Blends such as Debian Edu, Debian Med, and Debian Science. Choose a blend when the machine's field has one and the curated package set fits. Chapter 4 covers desktop environments, Chapter 20 the SSH server, and Chapter 23 web servers.

2.4.3. Installing the Boot Loader and Finishing Installation

The boot loader is the program the firmware starts before the kernel. On amd64, the installer uses GRUB. Before installing it, the installer probes for other operating systems and adds a menu entry for each one it recognizes; the detection is not perfect for unusual setups, so a multi-boot machine should be checked after the first reboot. The installed GRUB packages can be identified with dpkg-query.

Option Description
-W Query installed packages by name.
-f format Format output with fields such as ${Package} and ${Version}.
-L package List files installed by a package.
-S path Show which package owns a file.
$ dpkg-query -W -f='${Package} ${Version}\n' grub-common grub2-common
grub-common 2.12-9+deb13u2
grub2-common 2.12-9+deb13u2

grub-common carries the GRUB tools and configuration generators, and grub2-common the files shared by the BIOS and EFI variants; the architecture-specific package - grub-pc on this BIOS system, or grub-efi-amd64 on UEFI - is installed alongside them. The installed generator reports its own version:

$ sudo grub-install --version
grub-install (GRUB) 2.12-9+deb13u2

grub-mkconfig generates the boot menu from the scripts in /etc/grub.d and the kernels found in /boot. Writing the result to a preview file in the workspace shows what the generator would produce without touching the live configuration:

Option Description
-o file Write the generated configuration to file.
--help Show the generator's options.
$ sudo grub-mkconfig -o /home/john/debian-handbook/installation/grub-preview.cfg
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.12.117+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.117+deb13-amd64
Found linux image: /boot/vmlinuz-6.12.86+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.86+deb13-amd64
Adding boot menu entry for UEFI Firmware Settings ...
done

The generator writes its progress to the terminal as standard error and the configuration itself to the file. It found two kernels: 6.12.117, installed by an earlier package update, and 6.12.86, the running kernel, which remains as a fallback. The UEFI Firmware Settings line is a menu entry the generator adds when its EFI script is present; it is harmless on a BIOS machine and is not evidence that the machine booted in UEFI mode. Count the top-level menu entries in the preview file:

$ sudo grep -c "^menuentry" /home/john/debian-handbook/installation/grub-preview.cfg
1

There is one top-level entry. GRUB places additional kernels and recovery modes in submenus, so a count of one does not mean only one kernel is bootable. Show the entry to see its identity:

$ sudo grep "^menuentry" /home/john/debian-handbook/installation/grub-preview.cfg
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-be225267-eaf4-410c-9ffa-5cd32b221ce0' {

The entry is named Debian GNU/Linux, and its identifier embeds the root filesystem's UUID, tying the menu entry to the installed system rather than to a device name. The entry body, below this line in the file, selects the newest kernel, passes the root UUID on the kernel command line, and loads the matching initramfs. The files it names are in /boot:

$ ls /boot
System.map-6.12.117+deb13-amd64
System.map-6.12.86+deb13-amd64
config-6.12.117+deb13-amd64
config-6.12.86+deb13-amd64
grub
initrd.img-6.12.117+deb13-amd64
initrd.img-6.12.86+deb13-amd64
vmlinuz-6.12.117+deb13-amd64
vmlinuz-6.12.86+deb13-amd64

vmlinuz-* is the compressed kernel, initrd.img-* the initramfs, and config-* and System.map-* build metadata used for debugging and module builds. The grub directory holds the live generated configuration. A kernel package update adds files here and regenerates the configuration through update-grub, a wrapper around grub-mkconfig -o /boot/grub/grub.cfg.

On a BIOS system the installer writes GRUB's boot code into the MBR of the selected disk, with the core image in the space that follows the partition table. On a UEFI system it writes the GRUB EFI binary to the EFI system partition and creates a boot entry in the firmware's NVRAM. The example machine booted through BIOS, so it has no EFI variables to read:

Option Description
-v Show boot entries and their device paths verbosely.
-d disk Operate on the boot entries associated with disk.
-p partition Select a partition on the specified disk.
-b entry Select one boot entry by number.
$ sudo efibootmgr -v
EFI variables are not supported on this system.
error trace:

The command exits 2 and prints its error to standard error. That is the expected result on BIOS boot, not a damaged GRUB installation. On a UEFI system the same command lists BootCurrent, BootOrder, and entries such as Boot0001* debian with the device path of the EFI system partition; Chapter 7 covers interpreting and repairing those entries.

The installer finishes by asking whether the machine's clock is set to UTC. Say no only if the machine also runs an operating system that expects local time in the hardware clock, which traditionally means Windows; the question is skipped when the installer can infer the answer. The installer then asks for confirmation before rebooting and reminds you to remove the installation media. Remove the USB stick or disc - not a data disk - and confirm that the firmware's boot order puts the installed disk first. If the installer offered Continue Without Boot Loader, the system will not boot on its own until a boot loader is configured: check /target/boot for the kernel and initramfs and follow Chapter 7.