Adding custom RPM

Greetings,

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
cdrom
url --url=https://dl.rockylinux.org/vault/rocky/8.6/BaseOS/x86_64/os/

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

# Reboot after installation
reboot

# 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

%packages
nginx-1.25.0-2.el8.ngx.x86_64
@base
@core


%end

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

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.