Skip to content

Instantly share code, notes, and snippets.

@yolabingo
Created April 3, 2018 19:25
Show Gist options
  • Save yolabingo/8ae7c47b8ba256f0a3cf0a5a0d518030 to your computer and use it in GitHub Desktop.
Save yolabingo/8ae7c47b8ba256f0a3cf0a5a0d518030 to your computer and use it in GitHub Desktop.
Debian preseed.cfg example
=========== preseed.cfg ==========
#### IMPORTANT NOTE - replace "strongpassword" with an actual strong
password.
## autostart SSH install
d-i debian-installer/country string AU
d-i debian-installer/locale string en_AU.UTF-8
d-i debian-installer/language string en_AU:en
### Network configuration
# d-i netcfg/disable_dhcp boolean true
# d-i netcfg/dhcp_options select Configure network manually
# d-i netcfg/confirm_static boolean true
d-i netcfg/disable_autoconfig boolean true
# see http://lists.debian.org/debian-boot/2012/10/msg00054.html
d-i netcfg/target_network_config select ifupdown
d-i netcfg/choose_interface select eth0
d-i netcfg/get_hostname string preseed
d-i netcfg/get_domain string dev
# Static networ kconfiguration.
d-i netcfg/get_nameservers string 8.8.8.8
d-i netcfg/get_ipaddress string 192.168.0.56
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.0.6
### Console and SSH
d-i anna/choose_modules string network-console openssh-client-udeb
d-i debian-installer/consoledisplay string console-setup
network-console network-console/start note
d-i network-console/password password debian
d-i network-console/password-again password debian
d-i preseed/early_command string anna-install network-console
openssh-client-udeb
### Mirror settings
d-i mirror/country string enter information manually
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string http://192.168.0.2:3142
### apt
d-i apt-setup/local0/source boolean false
d-i pkgsel/include string mc deborphan openssh-server openssh-client
openssh-blacklist openssh-blacklist-extra screen localepurge bzip2 unzip
zip rar unrar debconf-utils
d-i pkgsel/upgrade select none
d-i pkgsel/update-policy select none
apt-setup-udeb apt-setup/security_host string security.debian.org
popularity-contest popularity-contest/participate boolean true
d-i hw-detect/select_modules multiselect usb-storage (USB storage)
apt-mirror-setup apt-setup/contrib boolean true
apt-mirror-setup apt-setup/non-free boolean true
### Partitioning
### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string Australia/Canberra
### Installation setup
d-i prebaseconfig/reboot_in_progress note
d-i debian-installer/shell-plugin terminal
base-config base-config/intro note
base-config base-config/login note
bootstrap-base base-installer/initramfs-tools/driver-policy select targeted
d-i keyboard-configuration/modelcode string pc105
# d-i keyboard-configuration/model select Generic 105-key (Intl) PC
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/xkb-keymap string us
d-i cdrom-detect/load_media boolean true
### Users
# root
d-i passwd/root-login boolean true
user-setup-udeb passwd/root-login boolean true
d-i passwd/root-password password strongpassword
d-i passwd/root-password-again password strongpassword
# d-i passwd/root-password-crypted password []
# $ printf "password" | mkpasswd -s -m md5
# Enable shadow passwords.
user-setup-udeb passwd/shadow boolean true
# The user's name and login.
d-i passwd/make-user boolean true
user-setup-udeb passwd/make-user boolean true
passwd passwd/user-fullname string Scott Ferguson
passwd passwd/username string scott
d-i passwd/user-password password strongpassword
d-i passwd/user-password-again password strongpassword
#d-i passwd/user-password-crypted password []
# user-setup-udeb user-setup/password-weak boolean false
# And other user properties
d-i passwd/user-default-groups string scott lp dialout cdrom audio dip
video plugdev users mlocate powerdev netdev fuse sambashare lpadmin scanner
d-i user-setup/encrypt-home boolean false
user-setup-udeb user-setup/encrypt-home boolean false
# install desktop + standard packages
# bootstrap-base base-installer/kernel/image select linux-image-686-pae
bootstrap-base base-installer/kernel/image select linux-image-686-pae
linux-image-3.2.0-4-686-pae
discover discover/install_hw_packages multiselect
virtualbox-ose-guest-x11 wbritish curl
tasksel tasksel/first multiselect standard
### Finish the installation
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
===========================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment