Skip to content

Instantly share code, notes, and snippets.

@hurulu
Created March 25, 2015 05:43
Show Gist options
  • Select an option

  • Save hurulu/b9a2eea534ea1aadce74 to your computer and use it in GitHub Desktop.

Select an option

Save hurulu/b9a2eea534ea1aadce74 to your computer and use it in GitHub Desktop.
Ubuntu unattended installation preseed sample
# Ubuntu Server Quick Install
# by Dustin Kirkland <kirkland@ubuntu.com>
# * Documentation: http://bit.ly/uquick-doc
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
#d-i console-setup/variantcode string
d-i netcfg/choose_interface select auto
#d-i netcfg/get_nameservers string
#d-i netcfg/get_ipaddress string
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string
#d-i netcfg/confirm_static boolean true
d-i mirror/country string manual
d-i mirror/http/hostname string au.archive.ubuntu.com
d-i mirror/http/directory string /ubuntu/
d-i mirror/codename string trusty
d-i mirror/suite string trusty
d-i mirror/http/proxy string
d-i passwd/root-login boolean false
d-i passwd/make-user 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
d-i user-setup/allow-password-weak boolean false
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
d-i clock-setup/utc boolean true
d-i time/zone string Australia/Adelaide
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 192.168.16.200
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
#d-i partman-basicfilesystems/no_swap boolean true
d-i partman-auto/expert_recipe string \
root :: \
100 1000000 1000000 ext4 \
$primary{ } $bootable{ } method{ format } \
format{ } use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
2048 2048 2048 linux-swap \
method{ swap } format{ } \
.
#d-i partman-auto/choose_recipe select atomic
d-i partman-auto/choose_recipe select root
#d-i partman-partitioning/confirm_write_new_label boolean true
#d-i partman/choose_partition select Finish partitioning and write changes to disk
#d-i partman/confirm boolean true
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/kernel/image string linux-server
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
d-i debian-installer/allow_unauthenticated string false
d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/language-packs multiselect
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true
d-i grub-installer/skip boolean false
d-i lilo-installer/skip boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/keep-consoles boolean false
d-i finish-install/reboot_in_progress note
d-i cdrom-detect/eject boolean true
d-i debian-installer/exit/halt boolean false
d-i debian-installer/exit/poweroff boolean false
d-i pkgsel/include string openssh-server vim
d-i preseed/late_command string \
in-target wget -O /root/late_command.sh http://192.168.16.203/late_command.sh ;\
in-target chmod +x /root/late_command.sh ;\
in-target /root/late_command.sh
# Ubuntu Server Quick Install
# by Dustin Kirkland <kirkland@ubuntu.com>
# * Documentation: http://bit.ly/uquick-doc
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
#d-i console-setup/variantcode string
d-i netcfg/choose_interface select auto
#d-i netcfg/get_nameservers string
#d-i netcfg/get_ipaddress string
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string
#d-i netcfg/confirm_static boolean true
d-i mirror/country string manual
d-i mirror/http/hostname string au.archive.ubuntu.com
d-i mirror/http/directory string /ubuntu/
d-i mirror/codename string trusty
d-i mirror/suite string trusty
d-i mirror/http/proxy string
d-i passwd/root-login boolean false
d-i passwd/make-user 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
d-i user-setup/allow-password-weak boolean false
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
d-i clock-setup/utc boolean true
d-i time/zone string Australia/Adelaide
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 192.168.16.200
d-i partman-auto/disk string /dev/md0
d-i partman-auto/method string regular
#d-i partman-basicfilesystems/no_swap boolean true
d-i partman-auto/expert_recipe string \
root :: \
100 1000000 1000000 ext4 \
$primary{ } $bootable{ } method{ format } \
format{ } use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
#d-i partman-auto/choose_recipe select atomic
d-i partman-auto/choose_recipe select root
#d-i partman-partitioning/confirm_write_new_label boolean true
#d-i partman/choose_partition select Finish partitioning and write changes to disk
#d-i partman/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
partman-basicfilesystems partman-basicfilesystems/no_swap boolean false
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i base-installer/kernel/image string linux-server
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
d-i debian-installer/allow_unauthenticated string false
d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/language-packs multiselect
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true
d-i grub-installer/skip boolean false
d-i lilo-installer/skip boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/keep-consoles boolean false
d-i finish-install/reboot_in_progress note
d-i cdrom-detect/eject boolean true
d-i debian-installer/exit/halt boolean false
d-i debian-installer/exit/poweroff boolean false
d-i pkgsel/include string openssh-server vim
d-i preseed/late_command string \
in-target wget -O /root/late_command.sh http://192.168.16.203/late_command.sh ;\
in-target chmod +x /root/late_command.sh ;\
in-target /root/late_command.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment