No worries regarding the delay, I do also need some time!
Your Installation Media path is configured wrong. As described in the docs here: Provisioning Hosts, it says
Use http://foreman.example.com/pub/installation_media/ubuntu/22.04-x86_64/ to set up your installation media entry in Foreman.
Accordingly, you should have the iso image here http://<MYSERVER>/pub/installation_media/ubuntu/22.04-x86_64.iso (as you mentioned you already did this) and the extracted image right next to it here http://<MYSERVER>/pub/installation_media/ubuntu/22.04-x86_64/.
The Installation Media path must point to the extracted folder, not just it’s parent [...]/ubuntu as it is currently the case in your configuration.
I’m not sure about using PXE without a DHCP server - so, if you are confident that iPXE sould to the job here - go for it. Just keep in mind to set the autoinstall boot parameters in the iPXE template as well. You should be able to easily “migrate” them from the PXELinux Autoinstall template.
Regarding your proxy log file: The snippet you sent does not contain the API call which is important for the boot file download. Re-run the host deployment with the updated Installation Media path, as I mentioned earlier, check whether the boot files are now downloaded to /var/lib/tftpboot/boot/, and have a look at your Smart Proxy log for a POST request to tftp/fetch_boot_file. It could be interesting to see that.
Hi. We are using Foreman 2.3 on CentOS 7.9. All templates are already created. We are provisioning RHEL6,7,8, CentOS7, OracleLinux8 and Ubuntu 16.04, 18.04 and 20.04. Now I am preparing deployment of Ubuntu 22.04 but the problem is the UEFI boot. I don’t know exactly which boot template to use. I am trying Grub2 UEFI boot (because it works on Oracle Linux 8 with UEFI) with template Preseed default PXEGrub2. We use DHCP from other servers, tftp server on Foreman and apt-mirror created mirror as installation source. The vmlinuz and initrd files are from server image iso, just renamed to linux and compressed to initrd.gz. When I use Foreman provided grubx64.efi, I end in kernel panic, when I use grubx64.efi from iso, it ends in grub console.
Foreman 2.3 does not have the Autoinstall templates which are necessary for Ubuntu 22.04. Moreover, it does not detect the Installation Media correctly - I’m not sure whether you’re renaming is sufficient in this case. You can verify this by checking your /var/lib/tftpboot/boot/ folder and see whether the Ubuntu 22.04 files match the file size of the vmlinuz and initrd file of the image.
I have installed Foreman 3.5.1 and the template Preseed default PXEGrub2 Autoinstall was not there. I have created it according to the git but it still doesn’t work. Now when the autoinstall is starting I get the error /init: line 49: can’t open /dev/sr0: No medium found. I am using the unpacked iso published by http as installation source. I have absolutely no idea what templates to use or how to set it corretly to make it work. I didn’t find any how to for installing Ubuntu 22.04 from Foreman. I am using these templates - PXEGrub2 template (modified Preseed default PXEGrub2 Autoinstall), Finish template (modified Preseed default finish), Provisioning template (modified Preseed default) and newly i tried also User data template (modified Preseed Autoinstall cloud-init user data)
I just changed the hostnames because of privacy, it’s a company environment.
The user data template is generic, I just changed the URI to our local mirror of ubuntu repository. Till now we were using the Preseed provision template so all the configuration is there.
The error seems to be that your url parameter points to the (I guess) extracted image directory. But, it actually must be the iso image itself here. You can see at this line in the PXEGrub2 Autoinstall template, that it takes the installation media path but changes the folder (which is just used to retrieve the initrd/kernel files) to the .iso image - it is supposed to be placed right next to the extracted folder:
This duality of the extracted and un-extracted installation image is also described in the first link in the Foreman docs mentioned here:
When I used a path to iso file, I was getting errors from foreman tftp server, which is trying to download kernel and initramdisk at the moment I push the Build button, that it can’t find the file path_to_iso.iso/something. It was treating the iso as a directory. I can try it whole again with the user data template and let you know. But this was the reason I used a directory with extracted iso in the url.
Yep, that makes totally sense: the Installation Media must be a path to the extracted iso image folder such that Foreman can download the initrd/kernel from there. So, you should keep that path pointing to the directory.
But, since Ubuntu needs the iso itself for its new installation process, the PXEGrub2 template must point to the iso image and not the extracted folder. Therefore, the template changes the @preseed_path to @image_path by replacing the Installation Media path with an .iso (see the code mentioned before). Accordingly, the following:
@s3v3ran You’re btw absolutely right about how-to’s on this topic. Since questions are piling up about Ubuntu 22.04 deployment, @maximilian mentioned having a blog post on this topic might clarify most questions I might write one in near future
Hello. Thanks for all the hints. Now it works like a charm. Basically I had to do the following:
1 - use an extracted iso image as an Installation media
2 - use an iso image in PXEGrub2 template as url
3 - rewrite a provisioning template in preseed format to user-data template in cloud-config yaml format
4 - rewrite a partitioning template from preseed to cloud-config yaml format
I also had to do some adjustments in finish template, but it wasn’t essential.