Last active
March 17, 2019 18:15
-
-
Save c-t-n/0c8382afeb7792c7043df7cf9e568c09 to your computer and use it in GitHub Desktop.
Debian simple preseed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preseeding only locale sets language, country and locale. | |
d-i debian-installer/locale string en_US | |
# netcfg will choose an interface that has link if possible. This makes it | |
# skip displaying a list if there is more than one interface. | |
d-i netcfg/choose_interface select auto | |
# To set a different link detection timeout (default is 3 seconds). | |
# Values are interpreted as seconds. | |
d-i netcfg/link_wait_timeout string 10 | |
# Keyboard selection. | |
d-i keyboard-configuration/xkb-keymap select us | |
# Any hostname and domain names assigned from dhcp take precedence over | |
# values set here. However, setting the values still prevents the questions | |
# from being shown, even if values come from dhcp. | |
d-i netcfg/get_hostname string ganymede-rs1 | |
d-i netcfg/get_domain string slash16.local | |
# If you want to force a hostname, regardless of what either the DHCP | |
# server returns or what the reverse DNS entry for the IP is, uncomment | |
# and adjust the following line. | |
d-i netcfg/hostname string ganymede-rs1 | |
# Disable that annoying WEP key dialog. | |
d-i netcfg/wireless_wep string | |
# If you select ftp, the mirror/country string does not need to be set. | |
#d-i mirror/protocol string ftp | |
d-i mirror/country string manual | |
d-i mirror/http/hostname string ftp.fr.debian.org | |
d-i mirror/http/directory string /debian | |
d-i mirror/http/proxy string | |
# Skip creation of a normal user account. | |
d-i passwd/make-user boolean false | |
# Root password, either in clear text | |
# or encrypted using a crypt(3) hash. | |
# Right now it's "helloworld" | |
d-i passwd/root-password-crypted password $6$633fa5790c74f476$10hyWPvc.4saHWzuhj5LafvBgKnbXiYd.DUMXfS53baZ7DMEYuxacjrmh6cBWcBLQDir6gg0fy86bwdRxqBCL1 | |
# Controls whether or not the hardware clock is set to UTC. | |
d-i clock-setup/utc boolean true | |
# You may set this to any valid setting for $TZ; see the contents of | |
# /usr/share/zoneinfo/ for valid values. | |
d-i time/zone string Europe/Paris | |
# Controls whether to use NTP to set the clock during the install | |
d-i clock-setup/ntp boolean true | |
d-i partman-basicfilesystems/choose_label string gpt | |
d-i partman-basicfilesystems/default_label string gpt | |
d-i partman-partitioning/choose_label string gpt | |
d-i partman-partitioning/default_label string gpt | |
d-i partman/choose_label string gpt | |
d-i partman/default_label string gpt | |
partman-partitioning partman-partitioning/choose_label select gpt | |
d-i partman-auto/disk string /dev/sda | |
d-i partman-basicfilesystems/no_swap boolean false | |
d-i partman-auto/method string regular | |
d-i partman-auto/expert_recipe string \ | |
boot-root :: \ | |
4500 2000 4500 ext4 \ | |
$primary{ } $bootable{ } \ | |
method{ format } format{ } \ | |
use_filesystem{ } filesystem{ ext4 } \ | |
mountpoint{ / } \ | |
. \ | |
2000 10000 100000000 ext4 \ | |
method{ format } format{ } \ | |
use_filesystem{ } filesystem{ ext4 } \ | |
mountpoint{ /opt } \ | |
. | |
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 | |
# When disk encryption is enabled, skip wiping the partitions beforehand. | |
d-i partman-auto-crypto/erase_disks boolean false | |
tasksel tasksel/first multiselect standard, ssh-server | |
# Individual additional packages to install | |
d-i pkgsel/include string openssh-server build-essential | |
# Some versions of the installer can report back on what software you have | |
# installed, and what software you use. The default is not to report back, | |
# but sending reports helps the project determine what software is most | |
# popular and include it on CDs. | |
popularity-contest popularity-contest/participate boolean false | |
# This is fairly safe to set, it makes grub install automatically to the MBR | |
# if no other operating system is detected on the machine. | |
d-i grub-installer/only_debian boolean true | |
d-i grub-installer/bootdev string /dev/sda | |
# Avoid that last message about the install being complete. | |
d-i finish-install/reboot_in_progress note | |
# This will prevent the installer from ejecting the CD during the reboot, | |
# which is useful in some situations. | |
d-i cdrom-detect/eject boolean true | |
# DANGEROUS !!! | |
# Post installation script for activating ssh through root and permit password connection | |
# Used to ease Ansible installation | |
# Delete this if you want to use it in production and use another way for provisionning | |
d-i preseed/late_command string \ | |
cd /target; \ | |
sed -i -e 's/#PermitRootLogin.*$/PermitRootLogin yes/g' etc/ssh/sshd_config; \ | |
sh -c 'echo "" >> etc/network/interfaces'; \ | |
sh -c 'echo "allow-hotplug enp0s8" >> etc/network/interfaces'; \ | |
sh -c 'echo "iface enp0s8 inet dhcp" >> etc/network/interfaces' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment