diff --git a/http/ubuntu-14.04-preseed.cfg b/http/ubuntu-14.04-preseed.cfg new file mode 100644 index 0000000..f98d3a6 --- /dev/null +++ b/http/ubuntu-14.04-preseed.cfg @@ -0,0 +1,85 @@ +### 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 archive.ubuntu.com +d-i mirror/http/directory string /ubuntu +d-i mirror/http/proxy string + +### 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 +d-i user-setup/allow-password-weak boolean true +# 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 +# This makes partman automatically partition without confirmation, provided +# that you told it what to do using one of the methods above. +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/services-select multiselect security +d-i apt-setup/security_host string security.ubuntu.com +d-i apt-setup/security_path string /ubuntu + +### Package selection +#tasksel tasksel/first multiselect ssh-server +tasksel tasksel/first multiselect openssh-server +d-i pkgsel/upgrade select safe-upgrade +#d-i pkgsel/include string sed openssh-server + +popularity-contest popularity-contest/participate boolean false + +### GRUB +d-i grub-installer/only_debian boolean true +d-i grub-installer/bootdev string /dev/vda + +### 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 +#in-target touch /root/ko diff --git a/ubuntu_14_04.json b/ubuntu_14_04.json new file mode 100644 index 0000000..93b24d3 --- /dev/null +++ b/ubuntu_14_04.json @@ -0,0 +1,60 @@ +{ + "description": "Ubuntu 14.04.5 LTS (Trusty Tahr)", + "variables": { + "box_version": "14.04.5" + }, + "builders": [ + { + "boot_command": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "/install/vmlinuz ", + "initrd=/install/initrd.gz ", + "net.ifnames=0 ", + "auto-install/enable=true ", + "debconf/priority=critical ", + "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-14.04-preseed.cfg ", + "" + ], + "disk_size": "1300", + "disk_interface": "virtio", + "headless": true, + "http_directory": "http", + "iso_checksum": "dde07d37647a1d2d9247e33f14e91acb10445a97578384896b4e1d985f754cc1", + "iso_checksum_type": "sha256", + "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-{{user `box_version`}}-server-amd64.iso", + "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": "ubuntu-{{user `box_version`}}-amd64.img", + "output_directory": "ubuntu-14.04-amd64", + "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" + } + ] +}