98 lines
3.9 KiB
HCL
98 lines
3.9 KiB
HCL
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
# Debian 11 (Bullseye) Preseed File
|
|
# https://www.debian.org/releases/bullseye/amd64/
|
|
|
|
# Locale and Keyboard
|
|
d-i debian-installer/locale string ${vm_os_language}
|
|
d-i keyboard-configuration/xkb-keymap select ${vm_os_keyboard}
|
|
|
|
# Clock and Timezone
|
|
d-i clock-setup/utc boolean true
|
|
d-i clock-setup/ntp boolean true
|
|
d-i time/zone string ${vm_os_timezone}
|
|
|
|
# Grub and Reboot Message
|
|
d-i finish-install/reboot_in_progress note
|
|
d-i grub-installer/only_debian boolean true
|
|
|
|
# Partitioning
|
|
${storage}
|
|
|
|
# Network configuration
|
|
d-i netcfg/choose_interface select auto
|
|
d-i netcfg/get_hostname string unassigned-hostname
|
|
d-i netcfg/get_domain string unassigned-domain
|
|
|
|
|
|
### Apt setup
|
|
# Choose, if you want to scan additional installation media
|
|
# (default: false).
|
|
d-i apt-setup/cdrom/set-first boolean false
|
|
# You can choose to install non-free firmware.
|
|
#d-i apt-setup/non-free-firmware boolean true
|
|
# You can choose to install non-free and contrib software.
|
|
#d-i apt-setup/non-free boolean true
|
|
#d-i apt-setup/contrib boolean true
|
|
# Uncomment the following line, if you don't want to have the sources.list
|
|
# entry for a DVD/BD installation image active in the installed system
|
|
# (entries for netinst or CD images will be disabled anyway, regardless of
|
|
# this setting).
|
|
#d-i apt-setup/disable-cdrom-entries boolean true
|
|
# Uncomment this if you don't want to use a network mirror.
|
|
#d-i apt-setup/use_mirror boolean false
|
|
# Select which update services to use; define the mirrors to be used.
|
|
# Values shown below are the normal defaults.
|
|
#d-i apt-setup/services-select multiselect security, updates
|
|
#d-i apt-setup/security_host string security.debian.org
|
|
|
|
# Mirror settings
|
|
d-i mirror/country string manual
|
|
d-i mirror/http/hostname string cdn-fastly.deb.debian.org
|
|
d-i mirror/http/directory string /debian
|
|
d-i mirror/http/proxy string
|
|
|
|
# User Configuration
|
|
d-i passwd/root-login boolean false
|
|
d-i passwd/user-fullname string ${build_username}
|
|
d-i passwd/username string ${build_username}
|
|
d-i passwd/user-password-crypted password ${build_password_encrypted}
|
|
|
|
# Package Configuration
|
|
d-i pkgsel/run_tasksel boolean false
|
|
d-i pkgsel/include string openssh-server qemu-guest-agent python3
|
|
|
|
# You can choose, if your system will 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 should be included on the first CD/DVD.
|
|
popularity-contest popularity-contest/participate boolean false
|
|
|
|
### Boot loader installation
|
|
# Grub is the boot loader (for x86).
|
|
|
|
# This is fairly safe to set, it makes grub install automatically to the UEFI
|
|
# partition/boot record if no other operating system is detected on the machine.
|
|
d-i grub-installer/only_debian boolean true
|
|
|
|
# Avoid that last message about the install being complete.
|
|
d-i finish-install/reboot_in_progress note
|
|
|
|
# Post-install script
|
|
# - Add User to Sudoers
|
|
# - Remove lv_delete volume group
|
|
d-i preseed/late_command string \
|
|
echo '${build_username} ALL=(ALL) NOPASSWD: ALL' > /target/etc/sudoers.d/${build_username} ; \
|
|
in-target chmod 440 /etc/sudoers.d/${build_username}%{ if length(lvm) != 0 ~} ; \
|
|
lvremove -f /dev/%{ for volume_group in lvm ~}${volume_group.name}%{ endfor ~}/lv_delete > /dev/null 2>&1%{ endif }
|
|
|
|
%{ if common_data_source == "disk" ~}
|
|
# Umount preseed media early
|
|
d-i preseed/early_command string \
|
|
umount /media && echo 1 > /sys/block/sr1/device/delete ;
|
|
%{ endif ~}
|
|
|