Adding custom RPM


I’ve been looking for answers on adding custom rpms to Rocky ISO lately, but seem to have none that match my need. What I’m trying to do is to build custom Rocky Linux ISO based on minimal Rocky Linux 8.6 version, with adding supplementary packages. Since I’ll be installing it in a closed environment with zero access to internet, I wanted to add pre-downloaded RPMs like Loki, Grafana, and Nginx.

The advice on use of adding kickstart to a Rocky ISO given by @nazunalika here works just fine Create custom rocky ISO

I was able to install Rocky with pre-defined features like extra users, root password set, etc, but failed to pass the path for packages, that I store locally and wish could be added during installation purposes. Any assistance in this regard would be much appreciated!

The kickstart I’m using is as follows:

# Kickstart file for a basic Rocky Linux 8 ISO

# Language settings
lang en_US.UTF-8
keyboard us

# Timezone
timezone UTC --utc

# Root password
rootpw --plaintext qwerty12345

# Partitioning
autopart --type=lvm

# Installation method
url --url=

# Local repo path
repo --name="localrepo" --baseurl=file:"///home/isobuilder/custom-iso/localrepo"

# Reboot after installation

# Disable SELinux
selinux --disabled

# Firewall configuration
firewall --disabled

# Disable NetworkManager
network --device=eth0 --onboot=yes --bootproto=dhcp

# System services
services --enabled=chronyd

# Initial user 
user --name=starter --password=qwerty12345



Good day, for those who are stuck just as me, I’ve tried to use a anaconda-ks.cfg file to build the ISO. First I’ve installed a VM just as I used to and then copied ks contents from /root/anaconda-ks.cfg

This speeds up installation process by just requiring to choose the installation partition, which is also great, as it would require less actions from the end user.

I’ve also tried installing nginx just for testing purposes by defining it in %packages section, which worked well even without internet access, but the version is somewhat outdated.

I’m going to attempt adding locally mounted repo to see if it is going to install the packages I need and keep this thread updated upon the results