Ubuntu – Where does the preseed file go for Ubuntu server iso install

automated-installpreseedUbuntu

I'm installing a bunch of Ubuntu Server VMs from ISO, and would like to edit the ISO to include a custom preseed.

I have all the docs here: https://help.ubuntu.com/lts/installation-guide/i386/preseed-using.html#preseed-loading

However I'm a bit confused as to where to put the preseed file. I don't need HTTP/FTP – I just want to unzip the ISO, include the preseed file/settings and then zip it up again.

EDIT: I scanned through the unzipped ISO and found the following in /isolinux/txt.cfg

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

I've tried the following steps, but while the ISO boots, it doesn't seem to pick up my new settings:

  1. Unzip Ubuntu install ISO into a directory
  2. Edit /preseed/ubuntu-server.seed, append the following at the end of the file:

    d-i debian-installer/locale string en_US
    d-i console-setup/ask_detect boolean false
    d-i keyboard-configuration/modelcode string pc105
    d-i keyboard-configuration/layoutcode string us
    d-i netcfg/get_hostname string myhost
    
  3. Use ImgBurn to create a new ISO with the contents of the directory

  4. Set ISO to be a bootable ISO and select boot image to be /isolinux/isolinux.bin

New ISO boots fine, but when I go through the install, it just gives me the original steps (asking for locale/keyboard etc).

Best Answer

According to that documentation it looks like anywhere on the ISO you want as long as you point the path to it correctly in the preseed/url parameter. The example documentation puts it in the root of the ISO filesystem.

That being said an ISO is a not a zip file and extracting and recreating one is not as simple as a similar operation for a zip file (though there are plenty of tools that should allow you to recreate the ISO as needed). It might be simpler, if you have an http/ftp server to stick the file on briefly, to just use that for this.