diff options
-rw-r--r-- | debian-10.4-amd64.json | 50 | ||||
l--------- | http/debian-10.4 | 1 | ||||
-rw-r--r-- | http/debian/preseed.cfg | 63 |
3 files changed, 114 insertions, 0 deletions
diff --git a/debian-10.4-amd64.json b/debian-10.4-amd64.json new file mode 100644 index 0000000..26662ea --- /dev/null +++ b/debian-10.4-amd64.json @@ -0,0 +1,50 @@ +{ + "variables": { + "iso_base_url": "https://ftp.fau.de/debian-cd/current/amd64/iso-cd", + "iso_checksum_type": "sha256", + "vm_name": "debian-10.4-amd64", + "http_dir": "http", + "preseed_path": "debian-10.4/preseed.cfg", + "shutdown_command": "systemctl poweroff", + "ssh_password": "{{ env `ROOTPW` }}" + }, + "builders": [{ + "type": "qemu", + "accelerator": "kvm", + "iso_url": "{{ user `iso_base_url` }}/debian-10.4.0-amd64-netinst.iso", + "iso_checksum_url": "{{ user `iso_base_url` }}/SHA256SUMS", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "output_directory": "{{ user `output_directory` }}", + "vm_name": "{{ user `vm_name` }}", + "disk_size": "{{ user `disk_size` }}", + "format": "qcow2", + "headless": "{{ user `headless` }}", + "boot_wait": "5s", + "ssh_timeout": "{{user `ssh_timeout`}}", + "ssh_username": "{{ user `ssh_username` }}", + "ssh_password": "{{ user `ssh_password` }}", + "shutdown_command": "{{ user `shutdown_command` }}", + "http_directory": "{{ user `http_dir` }}", + "boot_command": [ + "<esc><wait>", + "install ", + "initrd=/install/initrd.gz ", + "auto=true ", + "passwd/root-password={{ user `ssh_password` }} ", + "passwd/root-password-again={{ user `ssh_password` }} ", + "debconf/priority=critical ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ", + "<enter>" + ], + "qemuargs": [ + ["-cpu", "host"], + ["-m", "{{user `memory`}}"], + ["-smp", "{{user `cpus`}}"] + ] + }], + "provisioners": [{ + "type": "ansible", + "playbook_file": "{{ user `playbook` }}", + "extra_arguments": "{{ user `extra_ansible_args` }}" + }] +} diff --git a/http/debian-10.4 b/http/debian-10.4 new file mode 120000 index 0000000..b2f7fd3 --- /dev/null +++ b/http/debian-10.4 @@ -0,0 +1 @@ +debian
\ No newline at end of file diff --git a/http/debian/preseed.cfg b/http/debian/preseed.cfg new file mode 100644 index 0000000..749dd61 --- /dev/null +++ b/http/debian/preseed.cfg @@ -0,0 +1,63 @@ +d-i debian-installer/locale string en_US +d-i time/zone string Europe/Berlin +d-i keyboard-configuration/xkb-keymap select de + +d-i mirror/country string manual +d-i mirror/http/hostname string ftp.de.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string +d-i mirror/http/mirror select ftp.de.debian.org + +d-i partman-basicfilesystems/choose_label string gpt +d-i partman-basicfilesystems/default_label string gpt +d-i partman-basicfilesystems/no_swap boolean false +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 +d-i partman-swapfile/size string 0 +d-i partman-auto/disk string /dev/vda +d-i partman-auto/method string regular +d-i partman-auto/expert_recipe string \ + scheme :: \ + 32 32 32 free \ + $gptonly{ } \ + $primary{ } \ + $bios_boot{ } \ + method{ biosgrub } . \ + 1 0 -1 ext4 \ + $gptonly{ } \ + $primary{ } \ + method{ format } \ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + label{ SLX_SYS } \ + 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 + +d-i base-installer/excludes string laptop-detect +d-i passwd/make-user boolean false +d-i passwd/root-login boolean true +d-i user-setup/allow-password-weak boolean true + +## install base packages ## +d-i pkgsel/include string openssh-server +d-i preseed/early_command string \ + mkdir -p /usr/lib/post-base-installer.d && \ + echo "sed -i -e 's/^in-target.*tasksel.*/#\\0/' /var/lib/dpkg/info/pkgsel.postinst" > /usr/lib/post-base-installer.d/90skip-tasksel && \ + chmod +x /usr/lib/post-base-installer.d/90skip-tasksel + +d-i preseed/late_command string \ + in-target sed -i 's,^[# \t]*PermitRootLogin.*,PermitRootLogin yes,' /etc/ssh/sshd_config ; \ + in-target apt-get update ; \ + in-target apt-get -y upgrade + +d-i grub-installer/bootdev string /dev/vda +d-i grub-installer/only_debian boolean true +d-i grub-installer/with_other_os boolean true + +d-i finish-install/reboot_in_progress note |