Skip to content

Instantly share code, notes, and snippets.

Created May 20, 2015 17:49
Show Gist options
  • Save scottslowe/9116c0bf80f931a5eca2 to your computer and use it in GitHub Desktop.
Save scottslowe/9116c0bf80f931a5eca2 to your computer and use it in GitHub Desktop.
This is a preseed file, written for Ubuntu Server 14.04.2, that provides a fully automated installation (assuming the presence of a PXE boot infrastructure and a local HTTP server to provide the installation files).
# Ubuntu Server automated installation
# by Scott Lowe (
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i netcfg/choose_interface select eth0
d-i netcfg/get_hostname string hostname
d-i netcfg/get_domain string
d-i netcfg/wireless_wep string
d-i mirror/country string manual
d-i mirror/http/hostname string
d-i mirror/http/directory string /ubuntu/14.04.2
d-i mirror/http/proxy string
d-i live-installer/net-image string
d-i clock-setup/utc boolean true
d-i time/zone string US/Mountain
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/new_vg_name string hostname_vg
d-i partman-auto/expert_recipe string \
standard :: \
512 512 512 ext3 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext3 } \
mountpoint{ /boot } \
. \
24576 10000 -1 ext4 \
$lvmok{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } \
lv_name{ root_lv } \
. \
1024 512 3172 linux-swap \
$lvmok{ } \
method{ swap } \
format{ } \
lv_name{ swap_lv } \
d-i partman-auto/choose_recipe standard
d-i partman-auto-lvm/guided_size string max
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-auto/confirm boolean true
#d-i passwd/root-login boolean false
#d-i passwd/make-user boolean false
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
d-i passwd/user-fullname string Administrator
d-i passwd/username string admin
d-i passwd/user-password password ChangeMe!
d-i passwd/user-password-again password ChangeMe!
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false
d-i pkgsel/include string openssh-server update-motd
tasksel tasksel/first multiselect server, openssh-server
d-i pkgsel/update-policy select none
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i preseed/late_command string \
wget -O /target/etc/apt/sources.list; \
wget -O /target/etc/apt/apt.conf
d-i finish-install/reboot_in_progress note
Copy link

azm777 commented Sep 7, 2019

Hi Sir,
I really enjoyed Reading your article. I tried to replicate your process to create an automated installation for Ubuntu 16.04 server. I followed all the suggestion that you had given and implemented all the three components that you shared in your article to complete the automated process. I completed creating the PXE Boot Infrastructure and preseed file but I faced some problems in the second component which is the local HTTP source. The problem here is that I’m having trouble starting the Apache service. The Apache service fails to start. Can you please guide me if I’m missing anything.


Copy link

I can only suggest that you carefully review the logs from your Apache service to see why it is failing to start. The logs should provide more information that will help you resolve the situation. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment