Disable network boot while keeping host in build mode

Hey.

Is there perhaps an endpoint available that can be called from the provisioning host as part of the /unattended/provision or unattended/script template to disable the network boot (similiar to what cobbler has with 6. Cobbler Configuration — Cobbler 3.2.1 documentation) i.e set pxelinux entry to only local boot (pxe once) while still keeping the host in build mode/Pending installation status?

Essentially, what I’m trying to achieve is do a OS provisioning, and only call the /unattended/built endpoint as part of finish script which runs after the first reboot

I see there is already feature request for this type of use case

Hey, Foreman only supports build and non-build mode. From what I understand, you would like to see a third mode, something like “configuring” that would be active until initial configuration during firstboot is done.

This isn’t possible and it would be hard to implement, because Foreman supports so many different OSes, we would need to put the REST call somewhere in the boot process, but where? There are so many different scenarios. Puppet agent runs, Ansible is executed via SSH, Salt triggers etc.

I am not sure this is viable.

Well I think we partially improved this by reporting error if something goes south in the %post of kickstart.

Perhaps we could have additional call, that would be initiated as a first think in %post or in debian’s finish script that would tell Foreman, from now on don’t let the machine boot into the installer, if something fails now, it’s just post configuration failure, the host does not have to be reprovisioned from scratch. That means build mode would get another possible value.