Create Rocky 8 minimal ISO with a customized RPMs set

Hello community,

I would like to migrate all my environment from CentOS 7 to Rock 8 by using an automated installation.
I have smart devices with a small storage which require to remove unused RPMs (like WiFi firmware and some services) to decrease the required installation space. Besides that to support the devices functionality several custom built RPMs should be added to the installation repo.

Currently I have an ISO with the automated installation based on the CentOS 7 Minimal.

For a complete picture of the RPMs customization process here is the procedure flow:

1. Install CentOS 7 Minimal (with the defaults).
2. Update installed RPMs.
3. Remove unused RPMs with dependencies by YUM.
4. Install custom built RPMs.
5. Create installed RPMs list except the old kernel and “gpg-pubkey”.
6. Populate “cdimage/Packages” directory (initially empty) with the RPMs according to the RPMs list.
7. Copy boot and install images from the original ISO to the “cdimage/” directory.
8. Create repository with the “comps.xml” to support groups.
9. Copy kickstart file to the “cdimage/” directory.
10. Generate ISO image.

Before I started customizing the Rocky 8 minimal, I found two directories “BaseOS” and “Minimal” with the RPMs metadata, and this is not the same as in CentOS 7. So I would like to consult you. :slightly_smiling_face: How to correctly replace the original RPMs repository with the customized RPMs repository in Rocky 8 minimal?

Thanks for help