Unattended Install for Ubuntu Image Processing Server



Prepare the Ubuntu ISO for Unattended Installation


Australian mirror site with all recent Ubuntu releases:


Download a non graphical ubuntu installation ISO – server will do it.

Mount it

sudo su –

mkdir -p /mnt/iso
mount -o loop ubuntu_install.iso /mnt/iso

Copy the relevant files to a different directory

mkdir -p /opt/ubuntuiso
cp -rT /mnt/iso /opt/ubuntuiso

Prevent the language selection menu from appearing

cd /opt/ubuntuiso
echo en >isolinux/lang

Use GUI program to add a kickstart file named ks.cfg

apt-get install system-config-kickstart


Sample ks.cfg:

Change the IP address details and user details and packages to match your needs. password is encrypted by system-config-kickstart program.

#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T

#System language
lang en_AU
#Language modules to install
langsupport en_AU
#System keyboard
keyboard us
#System mouse
#System timezone
timezone –utc Australia/Sydney
#Root password
rootpw –disabled
#Initial user
user sample –fullname “Sample User” –iscrypted –password $1$xm6rggTW$VCwW3fbHA9hiube3eA1ZP1
#Reboot after installation
#Use text mode install
#Install OS instead of upgrade
#Use CDROM installation media
#System bootloader configuration
bootloader –location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart –all –initlabel
#System authorization infomation
auth –useshadow –enablemd5
#Network information
network –bootproto=static –ip=192.168.0.XXX –netmask= –gateway= –nameserver= –device=eth0
#Firewall configuration
firewall –disabled
#Install Extra Packages
@ ubuntu-server


Create a Preseed file

Next create a preseed file, to suppress other questions – I tried a few things and couldn’t prevent it asking me to press yes or not to partition the disk but that is the only part of the install which requires a response in the install.

Mine is ks.preseed in /opt/cd-image/preseed:

d-i partman/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/confirm_write_new_label boolean true
d-i partman-lvm/confirm_nooverwrite boolean true


Edit isolinux/txt.cfg

Search for

label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet —

add ks=cdrom:/ks.cfg and preseed file=/cdrom/preseed/ks.preseed to the append line. You can remove the quiet and vga=788 words. It should look like:


default install
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz ks=cdrom:/ks.cfg preseed/file=/cdrom/preseed/ks.preseed —



# Suggest LVM by default.
d-i partman-auto/init_automatically_partition string some_device_lvm
d-i partman-auto/init_automatically_partition seen false
# Install the Ubuntu Server seed.
tasksel tasksel/force-tasks string server
# Only install basic language packs. Let tasksel ask about tasks.
d-i pkgsel/language-pack-patterns string
# No language support packages.
d-i pkgsel/install-language-support boolean false
# Only ask the UTC question if there are other operating systems installed.
d-i clock-setup/utc-auto boolean true
# Verbose output and no boot splash screen.
d-i debian-installer/quiet boolean false
d-i debian-installer/splash boolean false
# Install the debconf oem-config frontend (if in OEM mode).
d-i oem-config-udeb/frontend string debconf
# Wait for two seconds in grub
d-i grub-installer/timeout string 2
# Add the network and tasks oem-config steps by default.
oem-config oem-config/steps multiselect language, timezone, keyboard, user, network, tasks


Make the iso:

mkisofs -D -r -V “ATTENDLESS_UBUNTU” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /opt/autoinstall.iso /opt/cd-image/


Now you have an (almost) unattended install iso to create a bootable USB or CD if you’re feeling old school.


With thanks to:



Further reading: