Digital Sanctum

Personal blog of Shane Witbeck Tags · Archive · About

Ubuntu Automatic Install Tutorial

Published: 13 Mar 2013

This tutorial will walk through the steps necessary for a completely automated installation of Ubuntu.

First, download an ISO to use as the starting point.

Create a work directory and extract the ISO files so we can edit them:

$ mkdir -p /media/ubuntu-install
$ mount -o loop /path/to/ubuntu-12.04.1-server-amd64.iso /media/ubuntu-install
$ rsync -av /media/ubuntu-install/ /opt/cd-image
$ cd /opt/cd-image/preseed
$ cp ubuntu-server.seed autoinstall.seed
$ cd /opt/cd-image/isolinux
$ cp isolinux.cfg isolinux

Edit isolinux.cfg:

# D-I config version 2.0
include menu.cfg
LABEL autoinstall
  menu label ^Auto installation
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/autoinstall.seed debian-installer/locale=en_US console-setup/layoutcode=us localechooser/translation/warn-light=true localechooser/translation/warn-severe=true initrd=/install/initrd.gz 
ramdisk_size=16384 root=/dev/ram rw quiet --
default autoinstall
prompt 0
timeout 10
ui gfxboot bootlogo

Now create the new ISO:

$ IMAGE=autoinstall.iso
$ BUILD=/opt/cd-image/
$ mkisofs -r -V "Auto Install CD" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table -o $IMAGE $BUILD

References

Tags: #ubuntu#linux#how-to#iso