I’d like to do a similar thing on bare metal. I saw some discussion of developing the Foreman Discovery Image to allow discovered machines to be able to pull an ISO and write it to disk.
Is anyone doing this at the moment and if so what is the workflow.
There is somebody doing that, I can’t remember the name tho. However Anaconda from version 7.5+ can write images instead of RPM installation too. Advantage is that the process is the same, hardware supported or certificated too, this is going to be image based provisioning we want to support going forward.
Foreman ships with support for this for several versions, look for kickstart_liveimg parameter in templates. URL must point to a tarball with root filesystem or image that can be loopmounted. Anaconda then copies all files over to the target partition and creates /dev, /sys etc.
Get back to us with experience, maybe templates need some tuning. This was primarily written and tested for RHV (oVirt Node Hypervisor) provisioning, but RHEL (CentOS) should work too. Ask RH for supportability of these installs, I think as long as RPM database verifies whole system it should be fine.
So if I want to work with an ISO I’d still need an accessible kernel and ram disk available to the foreman so I can get to the stage where anaconda copies the image specifed in the kickstart_liveimg parameter?
So I made the tar with Lorax. Install works. Kickstart runs, registers red hat installs puppet sends success to foreman. When the machine reboots it fails to boot saying it can’t find a known EFI file.
I’ve had successful installs both to bare metal and VM with both bios and EFI before so this is a new one for me.
Does it matter if the machine that I build the image on is BIOS of UEFI? Any tips here would be greatly appreciated.
What’s the error exactly? Can you screenshot or shoot it?
When you configure to boot from HDD does it work?
Anaconda should have configured partitioning according to BIOS or EFI depending on the environment. Its just our EFI → network → chainload from HDD is clunky and we have experienced some issues with this already.
The bit I’m fuzzy on is the partitioning. So with the live image install via anaconda it copies the live image before it gets to the partitioning section of the kickstart.
My feeling is that I don’t have the following section write which is using The Foreman Kickstart defaults
Yeah I was confused as well. The image is mounted if that’s a mountable image, or this step is skipped if you provide a (compressed) tarball. Then it copy/extract all files onto the destination volume using standard tools like cp, tar, cpio etc.
We are not talking about bit-to-bit “virtualization” image, we are talking about OS installation “copy”. If this were enterprise boxed software, this would be called something like “Smart Imaging ™”