Add Debian templates for Worldskills VMs
This commit is contained in:
141
common/template/debian13-gui/http/preseed.cfg
Normal file
141
common/template/debian13-gui/http/preseed.cfg
Normal file
@@ -0,0 +1,141 @@
|
||||
# Debian 13 (Trixie) — fully automated preseed for vSphere template builds
|
||||
# All packages are resolved from the six mounted BD ISOs; no internet access
|
||||
# is required during installation.
|
||||
|
||||
# ── Locale & keyboard ────────────────────────────────────────────────────────
|
||||
d-i debian-installer/locale string en_US.UTF-8
|
||||
d-i localechooser/supported-locales multiselect en_US.UTF-8
|
||||
d-i keyboard-configuration/model string pc105
|
||||
d-i keyboard-configuration/layoutcode string us
|
||||
d-i keyboard-configuration/variantcode string
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
d-i keyboard-configuration/options string
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i console-setup/layoutcode string us
|
||||
d-i console-setup/variantcode string
|
||||
|
||||
# ── Network ──────────────────────────────────────────────────────────────────
|
||||
# DHCP is used during installation so Packer can reach the VM over SSH.
|
||||
# No static IP, hostname, or domain is written to the installed system —
|
||||
# each clone from the template configures its own network on first boot.
|
||||
d-i netcfg/choose_interface select auto
|
||||
d-i netcfg/get_hostname string debian
|
||||
d-i netcfg/get_domain string local
|
||||
d-i netcfg/hostname string debian
|
||||
d-i netcfg/wireless_wep string
|
||||
|
||||
# ── Mirror / apt sources ──────────────────────────────────────────────────────
|
||||
# Disable network mirror entirely. All packages come from the six BD ISOs
|
||||
# that are mounted as CD-ROM drives. The installer scans every optical drive
|
||||
# automatically and registers them as apt sources.
|
||||
d-i apt-setup/use_mirror boolean false
|
||||
d-i apt-setup/no_mirror boolean true
|
||||
d-i apt-setup/cdrom/set-first boolean true
|
||||
d-i apt-setup/cdrom/set-next boolean true
|
||||
d-i apt-setup/cdrom/set-failed boolean true
|
||||
d-i apt-setup/services-select multiselect
|
||||
|
||||
# ── Clock ─────────────────────────────────────────────────────────────────────
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string UTC
|
||||
d-i clock-setup/ntp boolean false
|
||||
|
||||
# ── Partitioning ──────────────────────────────────────────────────────────────
|
||||
# GPT layout required for UEFI. Three partitions:
|
||||
# 1. EFI System Partition — 512 MB fat32
|
||||
# 2. Swap — 2 GB
|
||||
# 3. Root — remainder of disk, xfs
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-partitioning/choose_label string gpt
|
||||
d-i partman-partitioning/default_label string gpt
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-lvm/confirm boolean true
|
||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||
d-i partman/default_filesystem string xfs
|
||||
|
||||
d-i partman-auto/choose_recipe select boot-root
|
||||
d-i partman-auto/expert_recipe string \
|
||||
boot-root :: \
|
||||
512 512 512 fat32 \
|
||||
$primary{ } \
|
||||
method{ efi } \
|
||||
format{ } \
|
||||
. \
|
||||
2048 2048 2048 linux-swap \
|
||||
$primary{ } \
|
||||
method{ swap } \
|
||||
format{ } \
|
||||
. \
|
||||
1000 30000 -1 xfs \
|
||||
$primary{ } \
|
||||
method{ format } \
|
||||
format{ } \
|
||||
use_filesystem{ } \
|
||||
filesystem{ xfs } \
|
||||
mountpoint{ / } \
|
||||
.
|
||||
|
||||
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
|
||||
|
||||
# ── Users ─────────────────────────────────────────────────────────────────────
|
||||
# Root only — no regular user created; cloud-init handles user provisioning.
|
||||
d-i passwd/root-login boolean true
|
||||
d-i passwd/root-password password Passw0rd!
|
||||
d-i passwd/root-password-again password Passw0rd!
|
||||
d-i passwd/make-user boolean false
|
||||
|
||||
# ── Package selection ─────────────────────────────────────────────────────────
|
||||
tasksel tasksel/first multiselect standard, xfce-desktop
|
||||
d-i pkgsel/include string \
|
||||
sudo \
|
||||
openssh-server \
|
||||
open-vm-tools \
|
||||
open-vm-tools-desktop \
|
||||
cloud-init \
|
||||
smbclient \
|
||||
curl \
|
||||
lynx \
|
||||
dnsutils \
|
||||
ldap-utils \
|
||||
ftp \
|
||||
lftp \
|
||||
wget \
|
||||
nfs-common \
|
||||
rsync \
|
||||
telnet \
|
||||
traceroute \
|
||||
tcptraceroute \
|
||||
tcpdump \
|
||||
net-tools \
|
||||
cifs-utils \
|
||||
resolvconf \
|
||||
nmap \
|
||||
vim
|
||||
|
||||
d-i pkgsel/upgrade select full-upgrade
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# ── Boot loader ───────────────────────────────────────────────────────────────
|
||||
# On UEFI, grub-efi installs to the EFI System Partition automatically —
|
||||
# do not specify bootdev or it will conflict with EFI installation.
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/with_other_os boolean false
|
||||
|
||||
# ── Late command ──────────────────────────────────────────────────────────────
|
||||
# Runs inside the installed system (chroot) just before the first reboot.
|
||||
# 1. Configure SSH to allow root login and password authentication.
|
||||
# 2. Enable the SSH service.
|
||||
# 3. Configure LightDM to auto-login as root so Xfce setup completes on boot.
|
||||
d-i preseed/late_command string \
|
||||
in-target sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config; \
|
||||
in-target sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config; \
|
||||
in-target systemctl enable ssh; \
|
||||
in-target sh -c 'printf "[SeatDefaults]\nautologin-user=root\nautologin-user-timeout=0\n" >> /etc/lightdm/lightdm.conf'
|
||||
|
||||
# ── Finish ────────────────────────────────────────────────────────────────────
|
||||
d-i finish-install/reboot_in_progress note
|
||||
Reference in New Issue
Block a user