Ubuntu Kickstart

Page content

How to Kickstart a Ubuntu Installation …

edit dhcpd.conf

host ubuntu {
  hardware ethernet 4E:E5:80:xx:xx:xx;
  fixed-address x.x.x.x;
  filename "ubuntu/pxelinux.0";
  next-server x.x.x.200;
}

restart dhcpd

prepare env on tftp server (x.x.x.200)

mkdir -p /tftpboot/ubuntu/
cd /tftpboot/ubuntu/
ftp http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz
tar xfz netboot.tar.gz

kickstart cfg

put the following file in a webroot available from the client machine

cat <<'EOF' > /var/www/htdocs/ks.cfg
#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard ch
#System mouse
mouse
#System timezone
timezone Europe/Zurich
#Root password (here 123456)
rootpw --iscrypted $1$r6te7M.4$C55eKRGO2xdodwc3tBe48/
#Initial user
user --disabled
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://mirror.init7.net/ubuntu/
#System bootloader configuration
bootloader --location=mbr 
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part swap --size 1024 
part /boot --fstype ext4 --size 512 
part / --fstype ext4 --size 1 --grow 
#System authorization infomation
auth  --useshadow  --enablemd5 
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled 
#Do not configure the X Window System
skipx
EOF

start and install client

  • pxe boot client
  • on the install screen, press tab and add ‘ks=http://x.x.x.x/ks.cfg’
  • Enter and wait until done

sha256: b892c913248325dacd802d28eba8cec1cba7eb0f0d4926b9f71c6a666d3f5cb2