| auto=true priority=critical debian-installer/locale=en_US.UTF-8 keyboard-configuration/layoutcode=us ubiquity/reboot=true languagechooser/language-name=English countrychooser/shortlist=US localechooser/supported-locales=en_US.UTF-8 boot=casper automatic-ubiquity initrd=/casper/initrd.lz quiet splash noprompt noshell preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-16.04-preseed.cfg --- |
| # Taken from http://askubuntu.com/questions/806820/ | |
| # Partitioning | |
| # Old style using d-i command | |
| #d-i partman-auto/disk string /dev/sda | |
| #d-i partman-auto/method string regular | |
| #d-i partman-lvm/device_remove_lvm boolean true | |
| #d-i partman-md/device_remove_md boolean true | |
| #d-i partman-auto/choose_recipe select atomic | |
| # Newer ubiquity command | |
| ubiquity partman-auto/disk string /dev/sda | |
| ubiquity partman-auto/method string regular | |
| ubiquity partman-lvm/device_remove_lvm boolean true | |
| ubiquity partman-md/device_remove_md boolean true | |
| ubiquity partman-auto/choose_recipe select atomic | |
| # This makes partman automatically partition without confirmation | |
| 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 | |
| # Locale | |
| d-i debian-installer/locale string en_US.UTF-8 | |
| d-i console-setup/ask_detect boolean false | |
| d-i console-setup/layoutcode string us | |
| # Network | |
| d-i netcfg/get_hostname string unassigned-hostname | |
| d-i netcfg/get_domain string unassigned-domain | |
| d-i netcfg/choose_interface select auto | |
| # Clock | |
| d-i clock-setup/utc-auto boolean true | |
| d-i clock-setup/utc boolean true | |
| d-i time/zone string US/Pacific | |
| d-i clock-setup/ntp boolean true | |
| # Packages, Mirrors, Image | |
| d-i mirror/country string US | |
| d-i apt-setup/multiverse boolean true | |
| d-i apt-setup/restricted boolean true | |
| d-i apt-setup/universe boolean true | |
| # Users | |
| d-i passwd/user-fullname string Packer User | |
| d-i passwd/username string packer | |
| d-i passwd/user-password-crypted password SECRET | |
| d-i passwd/user-default-groups string adm audio cdrom dip lpadmin sudo plugdev sambashare video | |
| d-i passwd/root-login boolean true | |
| d-i passwd/root-password-crypted password SECRET | |
| d-i user-setup/allow-password-weak boolean true | |
| # Grub | |
| d-i grub-installer/grub2_instead_of_grub_legacy boolean true | |
| d-i grub-installer/only_debian boolean true | |
| d-i finish-install/reboot_in_progress note | |
| # Custom Commands | |
| ubiquity ubiquity/success_command string \ | |
| beep ;\ | |
| echo "Installation successful!!!" ;\ | |
| sleep 5 |
| { | |
| "description": "My VM Template", | |
| "builders": [ | |
| { | |
| "type": "virtualbox-iso", | |
| "guest_os_type": "Ubuntu_64", | |
| "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso", | |
| "iso_checksum": "0f3086aa44edd38531898b32ee3318540af9c643c27346340deb2f9bc1c3de7e", | |
| "iso_checksum_type": "sha256", | |
| "ssh_username": "packer", | |
| "ssh_password": "packer", | |
| "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", | |
| "boot_wait": "5s", | |
| "boot_command": [ | |
| "<enter><wait><esc><wait><f6><wait><esc>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
| "auto=true", | |
| " priority=critical", | |
| " debian-installer/locale=en_US.UTF-8", | |
| " keyboard-configuration/layoutcode=us", | |
| " ubiquity/reboot=true", | |
| " languagechooser/language-name=English", | |
| " countrychooser/shortlist=US", | |
| " localechooser/supported-locales=en_US.UTF-8", | |
| " boot=casper", | |
| " automatic-ubiquity", | |
| " initrd=/casper/initrd.lz", | |
| " quiet", | |
| " splash", | |
| " noprompt", | |
| " noshell", | |
| " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-16.04-preseed.cfg", | |
| " ---", | |
| " <wait>", | |
| "<enter><wait>" | |
| ], | |
| "http_directory": "preseed" | |
| } | |
| ], | |
| "provisioners": [ | |
| { | |
| "type": "shell", | |
| "inline": [ | |
| "sleep 30", | |
| "sudo apt-get update", | |
| "sudo apt-get -y upgrade", | |
| "sudo apt-get -y dist-upgrade", | |
| "sudo apt-get -y install python3-pip python3-virtualenv" | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment