History rewrite

This commit is contained in:
AJ Schroeder
2023-11-21 20:27:31 -06:00
parent 25255fd6b8
commit 397034b53e
69 changed files with 6568 additions and 8 deletions

View File

@@ -0,0 +1,97 @@
# 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 ~}

View File

@@ -0,0 +1,157 @@
%{~ if length(lvm) != 0 ~}
d-i partman-auto/method string lvm
d-i partman-auto-lvm/guided_size string max
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
%{~ for volume_group in lvm ~}
d-i partman-auto-lvm/new_vg_name string ${volume_group.name}
%{~ endfor ~}
%{~ endif ~}
d-i partman-efi/non_efi_system boolean true
# Ensure the partition table is GPT - this is required for EFI
d-i partman-partitioning/choose_label select gpt
d-i partman-partitioning/default_label string gpt
# If there is only one partition defined and its name is 'autopart'
# then use auto partitioning
%{~ if length(partitions) == 1 && partitions[0].name == "autopart" ~}
d-i partman-auto/disk string /dev/${device}
%{~ if partitions[0].format.fstype == "lvm" ~}
d-i partman-auto/method string lvm
# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
%{~ endif ~}
%{~ if partitions[0].format.fstype == "simple" ~}
d-i partman-auto/method string regular
%{~ endif ~}
%{ if partitions[0].format.fstype == "" ~}
d-i partman-auto/method string regular
%{~ endif ~}
# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /var, and /tmp partitions
d-i partman-auto/choose_recipe select atomic
%{~ else ~} # if length(partitions) == 1 && partitions[0].name == "autopart"
%{~ if swap == false ~}
d-i partman-basicfilesystems/no_swap boolean false
%{~ endif ~}
d-i partman-auto/expert_recipe string \
custom :: \
%{~ for partition in partitions ~}
%{~ if lookup(partition, "volume_group", "") == "" ~}
%{~ if partition.size != -1 ~}
${partition.size} ${partition.size} ${partition.size} ${partition.format.fstype} \
%{~ else ~}
100 100 -1 ${partition.format.fstype} \
%{~ endif ~}
$primary{ } \
%{~ if partition.mount.path == "/boot" ~}
$bootable{ } \
mountpoint{ /boot } \
method{ format } \
%{~ endif ~}
%{~ if partition.mount.path == "/boot/efi" ~}
mountpoint{ /boot/efi } \
method{ efi } \
%{~ endif ~}
%{~ if partition.mount.path != "/boot" && partition.mount.path != "/boot/efi" ~}
%{~ if partition.mount.path != "" ~}
mountpoint{ ${partition.mount.path} } \
%{~ endif ~}
method{ ${partition.format.fstype} } \
%{~ endif ~}
format{ } \
%{~ if partition.format.fstype != "swap" ~}
use_filesystem{ } \
%{~ if partition.format.fstype == "fat32" ~}
filesystem{ vfat } \
%{~ else ~}
filesystem{ ${partition.format.fstype} } \
%{~ endif ~}
%{~ endif ~}
label { ${partition.format.label} } \
%{~ for option in split(",", lookup(partition.mount, "options", "")) ~}
%{~ if option != "" ~}
options/${option}{ ${option} } \
%{~ endif ~}
%{~ endfor ~}
. \
%{~ else /* if lookup(partition, "volume_group", "") == "" */ ~}
%{~ for volume_group in lvm ~}
%{~ if volume_group.name == partition.volume_group ~}
%{~ for partition in volume_group.partitions ~}
%{ if partition.size != -1 ~}
%{ if partition.format.fstype == "swap" ~}
${partition.size} ${partition.size} ${partition.size} linux-swap \
%{~ else ~}
${partition.size} ${partition.size} ${partition.size} ${partition.format.fstype} \
%{~ endif ~}
%{~ else ~}
%{~ if partition.format.fstype != "swap" /* I don't know who would fill their disk with swap but it could happen */ ~}
100 100 -1 ${partition.format.fstype} \
%{~ else ~}
100 100 -1 linux-swap \
%{~ endif ~}
%{ endif ~}
$lvmok{ } \
%{~ if partition.mount.path != "" ~}
mountpoint{ ${partition.mount.path} } \
%{~ endif ~}
lv_name{ ${partition.name} } \
in_vg { ${volume_group.name} } \
%{~ if partition.format.fstype == "swap" ~}
method{ swap } \
%{~ else ~}
method{ format } \
%{~ endif ~}
format{ } \
%{~ if partition.format.fstype != "swap" ~}
use_filesystem{ } \
filesystem{ ${partition.format.fstype} } \
%{~ endif ~}
label { ${partition.format.label} } \
%{~ for option in split(",", lookup(partition.mount, "options", "")) ~}
%{~ if option != "" ~}
options/${option}{ ${option} } \
%{~ endif ~}
%{~ endfor ~}
. \
%{~ endfor /* partition in volume_group.partitions */ ~}
1024 1024 1024 ext4 \
method{ lvm } \
$lvmok{ } \
lv_name{ lv_delete } \
mountpoint{ /tmp/lv_delete } \
. \
%{~ endif /* volume_group.name == partition.volume_group */ ~}
%{~ endfor /* for volume_group in lvm */ ~}
%{~ endif /* if lookup(partition, "volume_group", "") == "" */ ~}
%{~ endfor /* for partition in partitions */ ~}
%{~ endif /* if length(partitions) == 1 && partitions[0].name == "autopart" */ ~}
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
# To make sure the machine can boot we install grub on the first harddisk:
d-i grub-installer/bootdev string /dev/${device}