I have synced the Oracle Linux 8 Repos

I have synced the oracle linux 8 repos through offical mirror link even after syncing and publishing to Content view creating the Activation key When I am creating a new host the media selection for synced media is greyed out
Expected outcome:
How to make synced media available
Foreman and Proxy versions:
Foreman 3.2
Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:
I want to distribute Oracle Linux 8 on the hosts using pxe Provisioning
Please check the Image

You must first select the content view and lifecycle environment that contains the kickstart repos. Then synced media should become available.

We are using composite content view so I have published my Oracle linux repos version and its available In Server-CCV and I am using the same content view to create host when I select the OL 8 the synced content host
Earlier we were using CentOS 7 as our Operating System

So is it working now? Whether the content view is composite or not, shouldn’t matter.

No it is not it is still greyed out

On the “Host” tab, the content view and lifecycle environment needs to be selected. Then go back here and synced content should be enabled.

Those are selected already
For CentOS 7 its getting displayed but when we select OL 8 it greys out

For CentOS 7

I just noticed you’re on Foreman 3.2 which is Katello 4.0 I believe. A lot of improvement have been made in this area since then. You may try upgrading to a supported release and see if that helps.

otherwise, I think it may be some metadata in the repository itself that’s needed to mark it as a kickstart repository?

Can you guide me if possible I’m new to foreman the expertise person are no longer with our Org.

Can’t we do with existing setup ?

I found the answer in our code. Seems ‘Synced Content’ will only work with Red Hat operating systems:

if host.operatingsystem.is_a?(Redhat)
   view_options = host.operatingsystem.kickstart_repos(host).map { |repo| OpenStruct.new(repo) }

For Oracle you’ll have to use install media, I suppose.

@Tech19 as Jeremy already pointed out, you need to do some manual setup. As far as I know, Oracle does not provide a dedicated kickstart repo like RHEL does, so you will have to use the ISO in some way.
What we did is the following:

  • Download the OL installation ISO to our Foreman server
  • mount the ISO to somewhere in /var/www/html/pub (we created a dedicated iso folder in there)
  • In the Foreman UI, under “Hosts” → “Installation Media”, create a new medium and have it point to http://foreman.example.com/pub/isos/OL-<Version>

Then you should be able to use that with the All Media option. Since OL is a RedHat family OS, maybe there is another way to get this to work, but this is what we found working and have used for quite a while now.
Be aware though that Oracle has had a tendency to break their install ISOs in create ways, which we had to fix ourselfs in several ways in the past. Though afaik, the current ISOs all work fine.

1 Like

Hello ,

Sorry for the following question

After Using the Installation media Do I need to make changes In Kickstart Provisioning template or it will be same as we had for CentOS 7

Most of the things will probably work just fine, I would expect you will probably need to make at least some adjustments. The first thing that comes to my mind is that Oracle is really keen on not using subscription-manager, so if you want to use subscription-manager for product/CV assignment instead of just writing repo files through other means, you will need to jump through some hoops to get subscription-manager working on OL. The OL packages for rhn tools have an obsoletes on subscription-manager, so you will need to exclude the rhn-* packages both in the install section and in the dnf/yum config as well as get subscription-manager from somewhere else. Subscription-manager / katello support - OEL has some pointers that might help you. It was mainly about OL7, but the general idea still applies to OL8.
Also, you will need to add the AppStream Repo during installation via a repo statement in the kickstart, I suggest you take a look at the default kickstart template how that is handled there.

That’s all I can think of right now that definitely needs to be changed, but you might find additional blockers depending on what your kickstart template does exactly.

We have been using the custom provisioning template for our provisioning and the expertise is no longer with our organization . me being a newbie to foreman completely

So I’ll start my approach first with uploading the OL 8 Iso in the foreman .

please assist me as I move along we are really relying lot on community

After Following the above steps the host just reboots the server and come up with the existing CentOS 7

That sounds like a problem with the PXE files not being updated. Just to be sure:

  • Is this a new host or one that has already existed with CentOS7?
  • If it already existed, does it boot into the installer or into the already installed CentOS7?
  • If it boots to an existing OS: Does the host try to netboot at all or is it directly booting from the disk?

If this is an existing host and it boots into the existing CentOS installation, is it in “build mode”? (means: Did you click “Build” on the host page?) :
In case you did, the “Build” button above should show as “Cancle Build”. If it is in build mode, you could try to cancle the build and then click build again. That should regenerate the PXE files in case something went wrong there. If it is not, hit the “Build” button and try again.
In general, a host needs to be in build mode the install anything. If it is not, it will get a different PXE template when trying to netboot that tells it to boot from localdisk.

Yes The host is on the build mode showing pending installation and when the server is booting up it contacts the foreman but the content view which it takes is for the CentOS 7 even though I have added the OL 8 repos which were mirror synced and I have added it to to our CCV
Do i need to create another lifecycle environment here

You should not need to create a new lifecycle environment for this. You might consider new CVs/CCV, but that should also not be strictly necessary.
Just to be sure, does it pick up the CentOS7 install image or does it pick the OL install image but then tries to use the CentOS repos in there? I assume it’s the first.
You might want to check:

  • Do you see oraclelinux vmlinuz and initrd files in /var/lib/tftpboot/boot/ on the Foreman server
  • What is the content of /var/lib/tftpboot/pxelinux.cfg/01-<MAC of the host>

What might also help is:

  • Go the the “All Hosts Page”
  • Select the checkbox on that host
  • from the “Select Action” dropdown, click “Rebuild Configuration”

That should regenerate all the PXE files associated with that host.