Created
December 1, 2018 16:23
-
-
Save NickCrew/3482d185cb7b1232449ef76c52390bd2 to your computer and use it in GitHub Desktop.
Ubuntu 18.04 Preseed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 18.04 preseed config | |
# Larry Smith Jr. | |
# @mrlesmithjr | |
# http://everythingshouldbevirtual.com | |
### Localization | |
d-i debian-installer/locale string en_US | |
d-i console-setup/ask_detect boolean false | |
d-i keyboard-configuration/layoutcode string us | |
### Network configuration | |
d-i netcfg/choose_interface select auto | |
d-i netcfg/get_hostname string unassigned-hostname | |
d-i netcfg/get_domain string domain.com | |
d-i netcfg/wireless_wep string | |
### Mirror settings | |
d-i mirror/http/countries select US | |
d-i mirror/country string US | |
d-i mirror/http/hostname string us.archive.ubuntu.com | |
d-i mirror/http/directory string /images/Ubuntu/18.04 | |
d-i mirror/http/mirror select us.archive.ubuntu.com | |
d-i mirror/http/proxy string | |
### Clock and time zone setup | |
d-i clock-setup/utc boolean true | |
d-i time/zone string US/Eastern | |
d-i clock-setup/ntp boolean true | |
### Partitioning | |
d-i partman-auto/disk string /dev/vda | |
d-i partman-auto/method string lvm | |
d-i partman-lvm/device_remove_lvm boolean true | |
d-i partman-md/device_remove_md boolean true | |
d-i partman-lvm/confirm boolean false | |
d-i partman-lvm/confirm_nooverwrite boolean true | |
d-i partman-auto-lvm/guided_size string max | |
# - atomic: all files in one partition | |
# - home: separate /home partition | |
# - multi: separate /home, /usr, /var, and /tmp partitions | |
d-i partman-auto/choose_recipe select atomic | |
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-md/confirm boolean true | |
d-i partman-partitioning/confirm_write_new_label boolean true | |
d-i partman/choose_partition select finish | |
d-i partman/confirm_nooverwrite boolean true | |
### Account setup | |
d-i passwd/root-login boolean false | |
d-i passwd/user-fullname string ubuntu | |
d-i passwd/username string ubuntu | |
d-i passwd/user-password password ubuntu | |
d-i passwd/user-password-again password ubuntu | |
# Use mkpasswd -m sha-512 to create an MD5 hash password | |
#d-i passwd/user-password-crypted password [MD5 hash] | |
d-i user-setup/allow-password-weak boolean true | |
d-i user-setup/encrypt-home boolean false | |
### Apt setup | |
### Package selection | |
tasksel tasksel/first multiselect | |
# Individual additional packages to install | |
d-i pkgsel/include string git openssh-server python-simplejson sudo | |
d-i pkgsel/update-policy select none | |
d-i pkgsel/upgrade select none | |
popularity-contest popularity-contest/participate boolean false | |
### Boot loader installation | |
d-i grub-installer/only_debian boolean true | |
d-i grub-installer/with_other_os boolean true | |
### Finishing up the installation | |
d-i finish-install/reboot_in_progress note | |
d-i debian-installer/exit/poweroff boolean true | |
### Preseeding other packages | |
#### Advanced options | |
d-i preseed/late_command string \ | |
echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /target/etc/sudoers; \ | |
in-target ln -s /lib/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]; \ | |
rm -f /target/etc/ssh/ssh_host_*; \ | |
in-target sed -i -e 's|exit 0||' /etc/rc.local; \ | |
in-target sed -i -e 's|.*test -f /etc/ssh/ssh_host_dsa_key.*||' /etc/rc.local; \ | |
in-target bash -c 'echo "test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server" >> /etc/rc.local'; \ | |
in-target bash -c 'echo "exit 0" >> /etc/rc.local'; \ | |
cat /dev/null > /target/etc/hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment