Unlike most packages that successfully run after being installed in a chrooted environment while preparing Ubuntu 22.04 autoinstall images, nfs-kernel-server seems to be an exception. The package itself installs normally both manually and using CUBIC. However, after deploying the resulting ISO in an air-gapped environment, the service fails to start.Regular cloud-init on an Internet-connected instance works like a charm.
Tried various tricks & workarounds. Started with explicitly listing and installing dependencies - makes no difference as apt seems to be handling it correctly. Followed by various ways to cache the packages. Currently ended up using apt-install --download-only then triggering the installation from a bash script or cloud-init. There was a combination I got sort of working but broke again once I started tidying up so it's kind of brittle.