PXE and preseed with new Ubuntu installer

As a cloud provider we offer our customers manual installation and cloud-init installation. The manual installation has advantages of being able to setup full-disk-encryption and such. Since the mini.iso was completely dropped with Groovy, we’re trying to migrate to the new installer, but we’re running into some issues.

The PXE configuration proposed by @mwhudson seems to work, although because of the RAM disk size we have to drop Ubuntu support for the smaller VM sizes. Also the preseed we used with d-i to set defaults like the package mirror and timezone doesn’t appear to be respected in the new installer. To be clear, we don’t want complete automation of the installation, just a couple of defaults. It would be nice if there was some backwards compatibility here.

Also, how exactly is the default installation disk picked? In d-i it would respect the order of the kernel names of the disks (e.g. vda first, vdb second), and select the first one as default. The new installer seems to randomly select one of the largest disks, which run on slow and detachable storage.

1 Like

I discovered that the disks are actually ordered by label, which given its arbitrary nature is an odd way to sort. I created a bug report for this.

Regarding the package mirror, I found there does appear to be some kind of answer file support. However after playing around with the cloudinit config for a bit, I’m not sure how I’m supposed to provide it to subiquity with the PXE method.

I can’t say I had any problem setting an apt mirror, but I did try to figure out how to use an answer file. It did not work for me, but this is what I found.

The #cloud-config/user-data file is really just a cloud-init config. In addition to providing the autoinstall data, it can be used to create an answers file at /subiquity_config/answers.yaml. I found out that was the default path

However, I did not see the answers being used when I tried this. Going through the subiquity source, I got the impression that the answers file would be used to set the default GUI selections.

I attempted a user-data config like so

  # attempt to also use an answers file by providing a file at the default path.  It did not seem to have any effect
  - path: /subiquity_config/answers.yaml
    content: |
        reboot: no
    owner: root:root
    permissions: "0644"