Temporarily booting a different OS

We use a special OS image for updating firmware on certain kinds of
hardware. It basically just boots, updates the firmware, then reboots.

What would be the proper procedure for doing something like that without
having Foreman kick off a re-provision of the host (which would be bad)?
Do I just set a host to 'build' using this one-time-boot OS and then
change it back to the original OS after the upgrade is complete or do I
have to do something special? Are there any special considerations?

Ideally I would like to be able to add a script to our firmware-updating
image that restores the host's original configuration in Foreman
automatically. The plan being to add a button to Foreman that sets a host
to boot using the temporary image and have the temporary image
automatically set things back to what they were after the upgrade is
complete. Such a mechanism would also be useful for booting into temporary
troubleshooting/repair images.

I know how to add a button to Foreman's GUI that changes a host's info in
the database. What I don't know is what processes/calls I need to kick off
in the background when it's pressed to ensure this kind of thing gets
handled correctly/safely.

Any help or suggestions with this is appreciated, thanks!