Automatic Installation

For installing on multiple computers it's possible to do fully automatic installations. Ubuntu packages intended for this include fai (which uses an install server), replicator, systemimager, autoinstall, and the Ubuntu Installer itself.

Automatic Installation Using the Ubuntu Installer

The Ubuntu Installer supports automating installs via preconfiguration files. A preconfiguration file can be loaded from the network or from removable media, and used to fill in answers to questions asked during the installation process.

Full documentation on preseeding including a working example that you can edit is in Appendix B, Automating the installation using preseeding.

Automatic Installation Using Kickstart

The Ubuntu installer has preliminary support for automating installs using Kickstart files, as designed by Red Hat for use in their Anaconda installer. This method is not as flexible as the preconfiguration file method above, but it requires less knowledge of how the installer works.

This section documents only the basics, and differences between Anaconda and the Ubuntu installer. Refer to the Red Hat documentation for detailed instructions.

To generate a Kickstart file, install the system-config-kickstart package and run system-config-kickstart. This offers you a graphical user interface to the various options available.

Once you have a Kickstart file, you can edit it if necessary, and place it on a web, FTP, or NFS server, or copy it onto the installer's boot media. Wherever you place the file, you need to pass a parameter to the installer at boot time to tell it to use the file.

To make the installer use a Kickstart file downloaded from a web or FTP server, add ks=http://url/to/ks.cfg or ks=ftp://url/to/ks.cfg respectively to the kernel boot parameters. This requires the installer to be able to set up the network via DHCP on the first connected interface without asking any questions; you may also need to add ksdevice=eth1 or similar if the installer fails to determine the correct interface automatically.

Similarly, to make the installer use a Kickstart file on an NFS server, add ks=nfs:server:/path/to/ks.cfg to the kernel boot parameters. The method supported by Anaconda of adding a plain "ks" boot parameter to work out the location of the Kickstart file from a DHCP response is not yet supported by the Ubuntu installer.

To place a Kickstart file on a CD, you would need to remaster the ISO image to include your Kickstart file, and add ks=cdrom:/path/to/ks.cfg to the kernel boot parameters. See the manual page for mkisofs for details. Alternatively, put the Kickstart file on a floppy, and add ks=floppy:/path/to/ks.cfg to the kernel boot parameters.


The Ubuntu installer supports a few extensions to Kickstart that were needed to support automatic installations of Ubuntu:

  • The rootpw command now takes the --disabled option to disable the root password. If this is used, the initial user will be given root privileges via sudo.

  • A new user command has been added to control the creation of the initial user:

    user joe --fullname "Joe User" --password iamjoe

    The --disabled option prevents any non-root users from being created. The --fullname option specifies the user's full name, as opposed to the Unix username. The --password option supplies the user's password, by default in the clear (in which case make sure your Kickstart file is kept confidential!); the --iscrypted option may be used to state that the password is already MD5-hashed.

  • A new preseed command has been added to provide a convenient way to preseed additional items in the debconf database that are not directly accessible using the ordinary Kickstart syntax:

    preseed --owner gdm shared/default-x-display-manager select gdm

    The --owner option sets the name of the package that owns the question; if omitted, it defaults to d-i, which is generally appropriate for items affecting the first stage of the installer. The three mandatory arguments are the question name, question type, and answer, in that order, just as would be supplied as input to the debconf-set-selections command.

  • As of Ubuntu 6.10, the keyboard option takes X layout names. To use an X keyboard variant, set this option to layout_variant, with appropriate values of layout and variant. For example, in_guj selects the Gujarati variant of the Indian layout.

  • You may use the apt-install command to install packages in %post --nochroot scripts (although you might also choose to generate a %packages section in a %pre script and include it using %include). Note that this does not work if the post-installation script is run in the chroot environment.

Missing features

As yet, the Ubuntu installer only supports a subset of Kickstart's features. The following is a brief summary of features that are known to be missing:

  • LDAP, Kerberos 5, Hesiod, and Samba authentication.

  • The auth --enablecache command to enable nscd.

  • The bootloader --linear, --nolinear, and --lba32 options for detailed LILO configuration.

  • Upgrades. To upgrade from one Ubuntu release to another, use the facilities provided by apt and its frontends.

  • Partitioning of multiple drives. Due to current limitations in the partition manager, it is only possible to partition a single drive.

  • Using the device command to install extra kernel modules.

  • Driver disks.

  • Firewall configuration.

  • Installation from an archive on a local hard disk or from an NFS archive.

  • The lilocheck command to check for an existing LILO installation.

  • Logical Volume Management (LVM) configuration.

  • Restrictions of a partition to a particular disk or device, and specifications of the starting or ending cylinder for a partition.

  • Checking a partition for bad sectors.

  • RAID configuration.

  • The xconfig --monitor option to use a specified monitor name.

  • Most package groups. As special cases, the "Ubuntu Desktop" and "Kubuntu Desktop" groups install the standard Ubuntu or Kubuntu desktop systems respectively, and any group name not containing a space (for example, "ubuntu-desktop") causes packages with the corresponding Task: header in the Packages file to be installed.

  • Exclusions in %packages sections are no longer supported as of Ubuntu 6.10, as a casualty of other improvements. You may need to use a %post script instead to remove unnecessary packages.

  • Pre-installation scripts and non-chrooted post-installation scripts may only be shell scripts; other interpreters are not available at this point in the installation.