This is an old revision of the document!


Debian preseed

Example configuration

# https://wiki.debian.org/DebianInstaller/Preseed

# B.4.1. Localization

d-i debian-installer/locale string en_US
d-i debian-installer/locale string en_GB.UTF-8
d-i debian-installer/country string GB
d-i debian-installer/language string en
d-i keyboard-configuration/xkb-keymap select GB

# B.4.2. Network configuration

d-i netcfg/choose_interface select enp1s0

# B.4.3. Network console

d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string 192.168.0.110
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.0.1
d-i netcfg/get_nameservers string 192.168.0.177
d-i netcfg/confirm_static boolean true
d-i netcfg/get_hostname string debian
d-i netcfg/get_domain string example.com

# B.4.4. Mirror settings

# B.4.5. Account setup

d-i passwd/root-login boolean true
d-i passwd/make-user boolean false
d-i passwd/root-password password root
d-i passwd/root-password-again password root

# B.4.6. Clock and time zone setup

d-i clock-setup/utc boolean true
d-i time/zone string Etc/UTC
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string debian.pool.ntp.org

# B.4.7. Partitioning

d-i partman-auto/disk string /dev/vda
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# B.4.7.3. Controlling how partitions are mounted

d-i partman/mount_style select uuid

# B.4.8. Base system installation

d-i base-installer/kernel/image string linux-image-amd64

# B.4.9. Apt setup

d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/non-free-firmware boolean false
d-i apt-setup/non-free boolean false
d-i apt-setup/contrib boolean false
d-i apt-setup/disable-cdrom-entries boolean true
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
d-i debian-installer/allow_unauthenticated boolean false

apt-mirror-setup apt-setup/use_mirror boolean false

# B.4.10. Package selection

tasksel tasksel/first multiselect standard, ssh-server
d-i pkgsel/upgrade select full-upgrade
popularity-contest popularity-contest/participate boolean false

# B.4.11. Boot loader installation

d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev string /dev/vda

# B.4.12. Finishing up the installation

d-i finish-install/reboot_in_progress note
d-i cdrom-detect/eject boolean true

# B.4.13. Preseeding other packages

# B.5.1. Running custom commands during the installation

d-i preseed/late_command string \
in-target --pass-stdout echo PermitRootLogin yes >> /target/etc/ssh/sshd_config; \
in-target --pass-stdout echo deb http:\/\/deb.debian.org\/debian\/ bookworm main non-free-firmware >> /target/etc/apt/sources.list.d/bookworm.list; \
in-target --pass-stdout echo deb http:\/\/deb.debian.org\/debian\/ bookworm-updates main non-free-firmware >> /target/etc/apt/sources.list.d/bookworm.list; \
in-target --pass-stdout echo deb http:\/\/security.debian.org\/debian-security\/ bookworm-security main non-free-firmware >> /target/etc/apt/sources.list.d/bookworm.list; \
in-target apt-get update; \
in-target apt-get -y full-upgrade;

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies