diff --git a/http/debian-9-stretch-preseed.cfg b/http/debian-9-stretch-preseed.cfg new file mode 100644 index 0000000..5589e0d --- /dev/null +++ b/http/debian-9-stretch-preseed.cfg @@ -0,0 +1,82 @@ +### Localization +d-i debian-installer/locale string en_US +d-i debian-installer/language string en +d-i debian-installer/country string US +d-i debian-installer/locale string en_US.UTF-8 +d-i localechooser/supported-locales multiselect en_US.UTF-8 + +# Keyboard selection. +d-i console-tools/archs select at +d-i console-keymaps-at/keymap select us + +d-i keyboard-configuration/xkb-keymap select us + +### Network configuration +d-i netcfg/choose_interface select auto + +### Mirror settings +d-i mirror/country string manual +d-i mirror/http/hostname string httpredir.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string + +# Do not scan for another CD or DVD +apt-cdrom-setup apt-setup/cdrom/set-first boolean false + +### Account setup +# Create root account +d-i passwd/root-login boolean true +d-i passwd/root-password password root +d-i passwd/root-password-again password root +# Skip creating normal user +d-i passwd/make-user boolean false + +### Clock and time zone setup +d-i clock-setup/utc boolean true +d-i time/zone string GMT+0 +d-i clock-setup/ntp boolean true + +### Partitioning +d-i partman-auto/method string regular +# Do not create a swap partition. +# Create a single partition having at least 1000 MB and the maximum possible (-1), +# with a priority of 50, and using ext4. +d-i partman-auto/expert_recipe string singlepart :: 1000 50 -1 ext4 \ + $primary{ } $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . +d-i partman-auto/choose_recipe select singlepart +# Disables partman warning message for not having a swap partition. +d-i partman-basicfilesystems/no_swap boolean false +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 partman/mount_style select uuid + +### Apt setup +d-i apt-setup/non-free boolean false +d-i apt-setup/contrib boolean false +d-i apt-setup/services-select multiselect security +d-i apt-setup/security_host string security.debian.org + +### Package selection +tasksel tasksel/first multiselect ssh-server + +d-i pkgsel/upgrade select safe-upgrade + +popularity-contest popularity-contest/participate boolean false + +### GRUB +d-i grub-installer/only_debian boolean true +d-i grub-installer/bootdev string default + +### Finishing up the installation +d-i finish-install/keep-consoles boolean true +d-i finish-install/reboot_in_progress note + +# Permit root login +d-i preseed/late_command string \ +in-target sed -i 's/^.PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config diff --git a/stretch.json b/stretch.json new file mode 100644 index 0000000..3175809 --- /dev/null +++ b/stretch.json @@ -0,0 +1,58 @@ +{ + "description": "Vanilla Debian Stretch base box", + "variables": { + "box_version": "9.0.0", + "box_changelog": "* stable point release\n" + }, + "builders": [ + { + "boot_command": [ + "", + "install ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian-9-stretch-preseed.cfg ", + "debian-installer=en_US ", + "auto ", + "locale=en_US ", + "kbd-chooser/method=us ", + "netcfg/get_hostname=stretch ", + "netcfg/get_domain=grnet.gr ", + "fb=false ", + "debconf/frontend=noninteractive ", + "console-setup/ask_detect=false ", + "console-keymaps-at/keymap=us ", + "keyboard-configuration/xkb-keymap=us ", + "" + ], + "disk_size": "1050", + "disk_interface": "virtio", + "headless": false, + "http_directory": "http", + "iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.0.0-amd64-netinst.iso", + "iso_checksum_type": "sha256", + "iso_checksum": "9d98f339016dc2a3998881949a8f0678baede26b5106f18ef1168d7e13606773", + "shutdown_command": "poweroff", + "ssh_password": "root", + "ssh_username": "root", + "ssh_port": "22", + "ssh_wait_timeout": "100000s", + "type": "qemu", + "qemuargs": [[ "-m", "2048" ],[ "-smp", "2" ]], + "accelerator": "kvm", + "vm_name": "debian-stretch-{{user `box_version`}}-x86_64.img", + "output_directory": "stretch.build", + "format": "raw" + } + ], + "provisioners": [ + { + "type": "shell", + "pause_before": "5s", + "inline": ["sed -i 's/PermitRootLogin.*/PermitRootLogin without-password/g' /etc/ssh/sshd_config"] + }, + { + "type": "file", + "source": "files/resolv.conf", + "destination": "/etc/resolv.conf" + } + ] +}