Preseeding Debian Installer

Use examples when they help make things clearer.

So, let me break this down for you like a boss: ‘Preseeding Debian Installer’ means that we can set up some options before the actual installation process begins. This is useful if you want to customize your system without having to go through all those boring steps again and again (because who has time for that, am I right?).

For example, let’s say you always install the same packages during a fresh Debian install. Instead of manually selecting them every single time, you can create a file called ‘preseed.cfg’ with your preferred options inside it. Then, when running the installation process, just pass that file as an argument to the debian-installer script:

#!/bin/bash

# This script is used to automate the installation process of Debian by passing a preseed file as an argument to the debian-installer script.

# The 'sudo' command is used to run the following command as a superuser, allowing for the installation process to have the necessary permissions.
sudo debian-installer --preseed=/path/to/your/file.cfg

This will automatically apply all those settings during the installation and save you a ton of time (and frustration). Pretty cool, right?

Here’s an example ‘preseed.cfg’ file that installs some common packages:

# This is a sample preseed configuration file for Debian Installer
# It will be used to customize the installation process and set up some options beforehand

# Set the debconf frontend to interactive, allowing for user input during installation
d-i debconf/frontend select interactive

# Automatically select the appropriate network interface for installation
d-i netcfg/choose_interface select auto

# Prompt for keyboard detection during installation
d-i console-setup/ask_detect boolean true

# Set the keyboard layout to English
d-i keyboard-configuration/layoutcode en

# Set the keyboard model to pc105
d-i keyboard-configuration/modelcode pc105

# Set the mirror country to US
d-i mirror/country code=US

# Disable the use of a proxy for downloading packages
d-i mirror/http/proxy none

# Select the tasks to be installed, including standard, server, and sshserver
tasksel tasksel/first multiselect standard, server, sshserver

# Install recommended packages during installation
apt::install-recommends "true";

# Do not install suggested packages during installation
apt::install-suggests "false";

In this example, we’re selecting the ‘interactive’ debconf frontend (instead of non-interactive), choosing the first available network interface automatically, detecting keyboard layout and model code, setting up US mirror for package downloads, disabling proxy settings, installing tasksel with standard, server, and sshserver options, and enabling installation of recommended packages but not suggested ones.

SICORPS