Install Ubuntu from CentOS-based Foreman server

Problem:
After installing the current Foreman version on a CentOS-based linux machine, I would like to install an Ubuntu host. There is no pre-defined OS for Ubuntu. Installation media is there. But how do I actually install an Ubuntu OS on a client?

Foreman and Proxy versions:
Foreman 2.5.2, Katello 4.1.2

Other relevant data:
“Ubuntu mirror” exists in Installation Media. So I created a new operating system. Ubuntu with Major version 20. Minor version 04. Family Debian. I picked a partition table and added “ubuntu mirror” for the install media. The templates tab only shows “Host initial configuration template”.

When I try to create a host, I set the operating system to Ubuntu 20.04, using ubuntu mirror, the Preseed default LVM partition table (though Kickstart default is also an option). Grub2 UEFI as the PXE loader.

When I try to save the host, I get a “No PXEGrub2 templates were found for this host, make sure you define at least one in your Ubuntu 20.04 settings or change PXE loader”. I’m not sure what that means. In the Ubuntu operating system page, I don’t see any pxe template options in the templates tab. There are lots of other options in CentOS, am I doing something wrong that they don’t show up for this new Operating System?

1 Like

Have a look at the deploying an internal application guide from the orcharhino documentation. It shows how to deploy hosts running Ubuntu 20.04 with Prosody (an XMPP server as an example application). You’ll see which templates are necessary and where to find them on your Foreman instance.

Also, you probably want to/have to set the major version to 20.04 and omit the minor version for the OS entry & Kickstart templates only works for EL systems (CentOS, Oracle Linux, RHEL and more). Ubuntu and Debian use Preseed templates.

1 Like

Thank you. That did help. The solution was to go to the preseed provision templates and assign them to the OS. Then go back to the OS (this was not covered in the link you provided) and select those templates. I am now able to pxe boot and install a basic ubuntu OS. Now I just need to learn about preseed to make any necessary modifications.

1 Like

Hi,

We are already using Foreman for a while in order to discover/provision hosts with CentOS7 and Rocky.

Now I’m also busy to apply the necessary configurations in order to provision hosts with Ubuntu 20.04.
I followed the documentation deploying an internal application guide provided by @maximilian.

Note: The legacy-images are depricated by Ubuntu, but as the live-image does not have the necessary netboot stuff I used the legacy-image for version 20.04.1 as described in the documentation.

But when I provision a discovered host with Ubuntu 20.04 it goes well untill it starts the “Install the system” where it fails with:

In the syslog file I can see the following error:

Even when I try it again selecting the “Type of installation” => “normal”:

It keeps complaining about the live-installer in the sysylog-file.

Here the mirror-config in the preseed provisioning template:

Mirror settings

d-i mirror/country string manual
d-i mirror/http/hostname string foreman-server:80
d-i mirror/http/directory string /pub/installation_media/ubuntu_20_04/
d-i mirror/http/proxy string
d-i mirror/codename string focal
d-i mirror/suite string focal
d-i mirror/udeb/suite string focal

I have no idea what is wrong in our case, so help would be welcome.

Thanks in advance

Setup Foreman-server:
Foreman 3.0.1
Katello 4.2.1
Pulp 3.1.0