Updated Debian 12 to use a local preseed

This commit is contained in:
Gregory Ballantine 2024-04-18 19:56:37 -04:00
parent 770a3291b8
commit 3210d922bf
2 changed files with 166 additions and 1 deletions

View File

@ -13,7 +13,11 @@ source "proxmox-iso" "debian-12" {
template_description = "Debian 12.5, generated on ${timestamp()}" template_description = "Debian 12.5, generated on ${timestamp()}"
boot_wait = "10s" boot_wait = "10s"
boot_key_interval = "200ms" boot_key_interval = "200ms"
boot_command = ["<esc><wait1s>", "auto url=http://ks.int.metaunix.net/preseeds/debian-bookworm.cfg", "<enter><wait6m>"] boot_command = ["<esc><wait1s>", "auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian.cfg", "<enter><wait6m>"]
http_directory = "http"
http_port_max = "8089"
http_port_min = "8080"
os = "l26" os = "l26"
cores = "2" cores = "2"

161
http/debian.cfg Normal file
View File

@ -0,0 +1,161 @@
#### Contents of the preconfiguration file (for wheezy)
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US
# Keyboard selection.
d-i keymap select us
d-i keyboard-configuration/xkb-keymap select us
d-i console-keymaps-at/keymap select us
### Network configuration
# 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
# If you want the preconfiguration file to work on systems both with and
# without a dhcp server, uncomment these lines and the static network
# configuration below.
#d-i netcfg/dhcp_failed note
#d-i netcfg/dhcp_options select Configure network manually
# Any hostname and domain names assigned from dhcp take precedence over values set here.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Force a hostname
#d-i netcfg/hostname string somehost
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# If non-free firmware is needed for the network or other hardware, this will try to load it
d-i hw-detect/load_firmware boolean true
### Mirror settings
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
### Account setup
# Root password,
d-i passwd/root-password-crypted password $6$CPlWX.5WLxqmNT2$VSJcR9FIZq4Efq32hMHmsB.qN7mbvDxxi3MueUjGVeSKp.t9EgYz5qFNWYpWKyvA66erkhJcHrqN3p/kgm/Y./
# To create a normal user account.
d-i passwd/user-fullname string Remote admin user
d-i passwd/username string xadmin
d-i passwd/user-password-crypted password $6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
d-i passwd/user-uid string 1000
### Clock and time zone setup
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean false
# 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 America/New_York
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
d-i clock-setup/ntp-server string ntp.example.com
### Partitioning
#d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/purge_lvm_from_device boolean true
d-i partman-md/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
# atomic: all files in one partition
# home: separate /home partition
# multi: separate /home, /usr, /var, and /tmp partitions
#d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
boot-root :: \
1000 1000 1000 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
256 512 768 linux-swap \
method{ swap } format{ } \
. \
5000 10000 1000000000 xfs \
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
## Controlling how partitions are mounted
# The default is to mount by UUID, but you can also choose "traditional" to
# use traditional device names, or "label" to try filesystem labels before
# falling back to UUIDs.
d-i partman/mount_style select uuid
## Installing the bootloader
# 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
### Base system installation
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
d-i base-installer/kernel/image string linux-image-486
### Apt setup
# 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 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
# By default the installer requires that repositories be authenticated using a known gpg key.
d-i debian-installer/allow_unauthenticated boolean true
# Select the boot device to install to
d-i grub-installer/bootdev string default
# This will eject the installation media upon reboot
d-i cdrom-detect/eject boolean true
# Install combination of stuff
tasksel tasksel/first multiselect standard
# Individual additional packages to install
d-i pkgsel/include string \
apt-transport-https \
curl \
dnsutils \
openssh-server \
nfs-common \
qemu-guest-agent \
sudo \
vim
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select none
# Some versions of the installer can report back on what software you have installed, and what software you use.
popularity-contest popularity-contest/participate boolean false
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
#### Advanced options
# This first command is run as early as possible, just after preseeding is read.
#d-i preseed/early_command string anna-install some-udeb
# This command is run just before the install finishes, but when there is still a usable /target directory.
#d-i preseed/late_command string in-target wget -O /root/post-install.sh http://tarsonis.metaunix.net/scripts/post-install.sh; in-target chmod +x /root/post-install.sh; in-target /root/post-install.sh
d-i preseed/late_command string in-target usermod -aG sudo xadmin; in-target systemctl enable qemu-guest-agent