How do I use a kickstart script from RedHat in Ubuntu without altering the ISO

I'm trying to automate the Ubuntu installation process as part of a migration from RedHat, and I have a working kickstart script that I would like to modify for Ubuntu.

I have read several answers here and official Ubuntu tutorials, so I did manage to use the graphical tool to generate the KS script. However, I don't want to alter the ISO image at this point; instead I want to load the KS script from the installation menu. In RedHat you need only press e and then indicate the path to the script (currently hosted in an HTTP server).

Is there a way to do this in Ubuntu? My plan is to test the script in Virtualbox until I get the desired result, and alter the ISO only then.


Solution 1:

In ubuntu, it is called a preseed file.

There are several ways to tell the installer to use a preseed file:

  • place it in the boot image as preeseed.cfg (which you don't want to do) or reference it on the kernel command line as preseed/file=/cdrom/preseed2.cfg
  • add the preseed to the installer's initrd (probably not what you want)
  • reference it in the kernel command line as preseed/url=http://host/path/to/preseed.cfg (This could be hand edited after booting the installer image to the menu.)
  • supply the path to the preseed file in dhcp using option vendor-class-identifier="d-i" and filename="url" (Note: it may be a good idea to scope this carefully.)
  • If you were network booting rather than booting an ISO image, you could also supply the preseed path in the kernel command line in the pxe boot config file