Ubuntu Server and Alternate ISO

After importing an Ubuntu Server/Alternate ISO, a default/sample preseed is used. This preseed is found at:


When using this preseed file to deploy Ubuntu, questions will be asked and the administrator will have to interact with the installation and respond accordingly. However, it is possible to use an alternative preseed file so to install Ubuntu automatically, no questions asked.

Ubuntu Mini ISO

When importing Ubuntu Mini ISO image, no preseed file is set given that the mini ISO image does not contain any information about the image itself. For this reason, it will be necessary to add a preseed file right after importing an Ubuntu Mini ISO image.

No Questions Asked preseed

Creating the preseed

The No Questions Asked preseed, will install Ubuntu without having to ask questions to the administrator. The first thing we need to do is to create a new file on which to copy the preseed:

sudo vim /var/lib/cobbler/kickstarts/ubuntu-nqa.seed

And we copy the following:

# Ubuntu Server Quick Install
# by Dustin Kirkland <kirkland@ubuntu.com>
#  * Documentation: http://bit.ly/uquick-doc

d-i     debian-installer/locale string en_US.UTF-8
d-i     debian-installer/splash boolean false
d-i     console-setup/ask_detect        boolean false
d-i     console-setup/layoutcode        string us
d-i     console-setup/variantcode       string
d-i     netcfg/get_nameservers  string
d-i     netcfg/get_ipaddress    string
d-i     netcfg/get_netmask      string
d-i     netcfg/get_gateway      string
d-i     netcfg/confirm_static   boolean true
d-i     clock-setup/utc boolean true
d-i     partman-auto/method string regular
d-i     partman-lvm/device_remove_lvm boolean true
d-i     partman-lvm/confirm boolean true
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_nooverwrite boolean true
d-i     partman/default_filesystem string ext3
d-i     clock-setup/utc boolean true
d-i     clock-setup/ntp boolean true
d-i     clock-setup/ntp-server  string ntp.ubuntu.com
d-i     base-installer/kernel/image     string linux-server
d-i     passwd/root-login       boolean false
d-i     passwd/make-user        boolean true
d-i     passwd/user-fullname    string ubuntu
d-i     passwd/username string ubuntu
d-i     passwd/user-password-crypted    password $6$.1eHH0iY$ArGzKX2YeQ3G6U.mlOO3A.NaL22Ewgz8Fi4qqz.Ns7EMKjEJRIW2Pm/TikDptZpuu7I92frytmk5YeL.9fRY4.
d-i     passwd/user-uid string
d-i     user-setup/allow-password-weak  boolean false
d-i     user-setup/encrypt-home boolean false
d-i     passwd/user-default-groups      string adm cdrom dialout lpadmin plugdev sambashare
d-i     apt-setup/services-select       multiselect security
d-i     apt-setup/security_host string security.ubuntu.com
d-i     apt-setup/security_path string /ubuntu
d-i     debian-installer/allow_unauthenticated  string false
d-i     pkgsel/upgrade  select safe-upgrade
d-i     pkgsel/language-packs   multiselect
d-i     pkgsel/update-policy    select none
d-i     pkgsel/updatedb boolean true
d-i     grub-installer/skip     boolean false
d-i     lilo-installer/skip     boolean false
d-i     grub-installer/only_debian      boolean true
d-i     grub-installer/with_other_os    boolean true
d-i     finish-install/keep-consoles    boolean false
d-i     finish-install/reboot_in_progress       note
d-i     cdrom-detect/eject      boolean true
d-i     debian-installer/exit/halt      boolean false
d-i     debian-installer/exit/poweroff  boolean false
d-i     pkgsel/include string byobu vim openssh-server
byobu   byobu/launch-by-default boolean true

The above example sets the password to be ubuntu, in the following line:

d-i passwd/user-password-crypted    password $6$.1eHH0iY$ArGzKX2YeQ3G6U.mlOO3A.NaL22Ewgz8Fi4qqz.Ns7EMKjEJRIW2Pm/TikDptZpuu7I92frytmk5YeL.9fRY4.

We can generate a different password hash using the mkpasswd program, which is found in the whois package. Here is an example of how to generate a password hash:

mkpasswd -m sha-512

You will be prompted for your password.

Do NOT use

printf "password-goes-here" | mkpasswd -s -m sha-512

as it will leave the password in your shells history in clear text.

Changing a Profile's preseed

Now, after importing an ISO, we can easily change the preseed to be used by a profile, or in the case of a Mini ISO, we need to set it. To do this, we make use of the following command:

sudo cobbler profile edit

However, we need to consider the following parameters:

  • --name: Name of the profile for which to change the preseed.

  • --kickstart: Location of the new preseed to use.

  • --kopts: Additional kernel options

To change the preseed of a profile, we do as follows:

sudo cobbler profile edit --name=natty-i386 --kickstart=/var/lib/cobbler/kickstarts/ubuntu-nqa.seed --kopts="priority=critical locale=en_US"

Cobbler/Preseed (last edited 2015-01-19 07:54:05 by dirk-heinrichs)