Problem:
I tried changing the Operating system configuration for a server to a different OS so I can upgrade the server. (Hosts → All Hosts → edit the server → Change OS + installation media) However, the old image seems to boot and because no answer file is available for that OS, I’m booted into the default live environment. Installations for this new OS have worked last month so that should still work.
I tried changing the OS back to the older option, unmanage/manage, changing content source but to no avail…
Is this some cache I should be clearing? Did I use a wrong procedure?
Expected outcome:
Changing OS in Host overview should instantly available.
I’ll be documenting my own troubleshooting progress here. Hopefully someone (if not myself) might find this usefull in the future.
So, I carefully removed the server entry from the DHCP lease file (/var/lib/dhcpd/dhcpd.leases). Don’t forget to stop dhcpd.service when interfering with this service. Now when booting, I see some relevant entries in /var/log/messages
The grub configuration that is being loaded is configured in /var/lib/tftpboot/grub2. There is a unique entry for my server and here I find it has the wrong image configured. This is a file that Foreman should have altered, I think?
The answer file doesn’t seem to load, no matter what I do. I tried adjusting the grub file, changing the provision connection under interfaces and I find that the grubfile changes. But not in a way that makes it work correctly…
The TFTP files (at /var/lib/tftpboot) are indeed managed by Foreman, but these usually only are updated/created when a host enters build mode. Most errors in this are can be easily fixed by hitting “cancel build” and then “build” via the WebUI. For a “mass-applicable” solution, you can also select multiple hosts on the hosts page and then click “Select Action → Rebuild Config”, which essentially does the same.
Nor sure if this will solve your problem, especially after all the tinkering you did, but maybe it helps.
Thanks! I was also able to find a misconfiguration in the problematic host. Not sure how that got there. It seems that my issue is fixed.
After changing the relevant grub file, I was able to “restore” it by indeed clicking the cancel build / build buttons. Thanks for the actions options. I did not know that one yet.