Don’t think the image is getting downloaded because I get the error in 20 seconds when the device is booted from network.
I can see log “Started Get “/userdata/” for foreman-ip” however it ends with error “ActionController::RoutingError”
yes, it gives me the option to choose n/w static or dhcp, then few network setting & URL to download image which is starting with “archive.ubuntu.com”. As per my understanding this means the endpoint is not able to pick the image from my hosted ISO.
So I don’t need to extract the ISO image on my apache server?
At present my ISO is extracted and I have removed the ‘.iso’ from the template as I was not getting the extracted ISO structure in the browser while checking.
Since you want to deploy an Ubuntu 20.04 host with Autoinstall (so, an Ubuntu 20.04.3+ host), you just follow the 22.04 setup as described in the docs (for Ubuntu 20.04.0/1/2, it’s been different):
Thereby, Foreman needs the extracted iso image in order to download the boot files and the Ubuntu host needs the unextracted iso image for its installation.
We’re working on automating this process such that you only need to provide the iso image in the future and Foreman extracts the boot files on its own.
Tried with the above suggestion. The good news is Ubuntu ISO is now getting downloaded & starting the installation however now while installing it gets into GUI Desktop mode.
The last log I see on the screen before going into GUI is " Started session 1 of user ubuntu", at this stage non of the files like /etc/hosts or /etc/resolv.conf is update when I am checking on the terminal.
Sharing the below info if it helps:
The initrd & vmlinuz are still not getting downloaded, I have to manually download them.
The ISO file I am using is of Ubuntu Desktop.
hi , thanks for this article
im not sure regarding <hostname.short >
as i dont know the name prior to provisioning ,
and it implies that i should edit it per provisioning
(or i dindt get it right )
can you share example ?
also regarding the templates , i use Satellite 6.12 , and i can locate the mentioned preseed templates , but im not sure under what section i should associate them :
ie :
under “host initial configuration template " : ???
under " user data template” : ???
and so on for the rest of the template types
Yeh, they switched the desktop installer to the same subiquity (server) installer in 23.04.
Best to just skip to 23.10.1 now though.
The templates should work the same for desktop autoinstall, however, I think currently they only support ‘semi-automated’ install for the desktop installer. You will have to include at least 1 interactive-section in your user-data template.
Although you can try fully automated and see what happens.
P.S if you really need LTS desktop install right now, you could try doing just a standard automated server installation, then just install ubuntu-desktop package on top.
After using the ubuntu server 20.04.6 ISO, I was able to install the OS.
However there are still few issues:
The initrd & vmlinuz are still not getting downloaded.
The machine reboots after installation but still gets into PXE boot again for installation which is unlike Red Hat/Cent OS provisioning. I have to manually change the boot sequence.
It seems the root password is not getting properly updated as I am not able to login via root after the installations.
Sorry, I missed this when you said which Foreman version you are on: Foreman 3.3 cannot detect the boot files automatically since it doesn’t know the adjusted directory path. Foreman 3.4 can actually find the boot files in /casper.
So, I think you would have to upgrade Foreman to solve this issue.
This sounds like your finish template is not executed successfully. Do you see in your Foreman log that the client downloads the template? Or in your Ubuntu installation log, can you see that something similar to “curtin wget <template URL>” (you can see the actual URL when you look at the rendered userdata template) is executed?
“2.” and “3.” could occur due to issues in the userdata template. At the time of the 3.3 release, Ubuntu Autoinstall has been in an early stage for us.
I think in Foreman 3.3, there has been an issue with the finish template not being downloaded and you couldn’t create a root user. Both was fixed with this commit:
The commit is part of Foreman 3.4.
Even though you might be able to fix 2. & 3. by using the latest version of the template, I’d recommend you upgrading your Foreman in order to get the latest changes & fixes.
Hey together I’ve been reading through this and a lot of other posts the past days. I’m trying to implement Foreman at my company and installed Foreman with a running Discovery Image for UEFI and Legacy clients so far. My Testclients can boot into the Discovery Image and get recognised by Foreman. Im stuck at the part of starting the provisioning of discovered Hosts atm. I’m a beginner with Foreman and I’m overwhelmed by all the different posts.
My goal is to get Ubuntu 20.04 and Ubuntu 22.04 Provisioning to work after Hosts have been discovered.
Foreman 3.7.0 is installed on Ubuntu 20.04
Active Features:
Discovery
HTTPBoot
Logs
Puppet
Puppet CA
TFTP
Following this thread I’m not sure which steps are still needed and which are not. Is there a cleaner description for the needed steps 2024? It seems for me as some steps the creator of this Thread did are not needed anymore as they have been implemented in Default Templates by Foreman Devs themselves?
Which Templates are needed minimum to get provisioning with autoinstall to work? Do I need Linux host_init_config default or Preseed Default? Pretty sure I saw both versions in different posts till now.
I also struggled with which templates were needed, but ended up using Preseed default finish, Preseed default PXEGrub2 Autoinstall, and Preseed Autoinstall cloud-init user data.
I am using dhcp for the host IP so I do not know the host IP in advance when I provision the host, I am getting 404 on the user-data when I try to provision a host with the following PXELinux line for userdata: ds=nocloud;s=http://<%= foreman_request_addr %>/userdata/.
I can get the provisioning working if I do specify the IP address in the interface menu on Foreman, but cannot get it working with just the MAC address - I am confused if Foreman still does not have the feature to source user-data file with just the MAC address?
I can although get it working if I use - ds=nocloud;s=http://<%= foreman_request_addr %>/userdata/<%= @host.mac %>/ - Is it ok to use the @host.mac in the APPEND line in this case???
Preseed and user-data both use REMOTE_IP to detect the host which is calling home. It is designed this way, therefore, you must allocate the IP in advance. I do not think there is any workaround as far as I am aware.
For some workflows, REMOTE_IP might be just a fallback mechanism, I am not sure if tokens are used for any of these.
As I stumbled over some minutes ago, can someone confirm that the following changes are required with 22.04.3 in the template “Preseed Autoinstall cloud-init user data”.
changing hashed_password to password
removing the else with the empty array for ssh_authorized_keys
Until I changed this I got some schema errors and with the changes 22.04.2 and 22.04.3 work fine for me. But I want someone to confirm this as I want to be 100% sure before make a PR to change the template.