Rockylinux 9.6 minimal with kickstart

Hi everyone

I’m working on creating a custom Rocky Linux 9.6 installation image for my project and could use some guidance.

Goal: Create a custom ISO that installs minimal Rocky Linux + XFCE + specific packages (SNMP, rsyslog, etc.) in a single offline installation.

Current Setup:

  • Starting with Rocky Linux 9.6 Minimal ISO
  • Downloaded required packages on a separate Rocky 9 VM
  • Copied packages to custom folders and integrated with ISO content
  • Already ran createrepo on all custom package directories
  • Using xorriso to rebuild the ISO
  • Created a kickstart file for automated installation

Issue: The kickstart works perfectly when I remove the custom repo lines, but fails when I include them:

repo --name="custom-packages" --baseurl=file:///minimal/Packages
repo --name="xfce-packages" --baseurl=file:///xfce

Error received: “Installation source setup failed: check the repository address and proxy parameters” (see attached screenshot showing the GUI installer recognizing my custom repositories but failing to configure them)

Questions:

  1. What’s the correct syntax/path for file-based repositories in kickstart?
  2. Are there any specific requirements for integrating additional packages into the ISO structure beyond running createrepo?
  3. Could the issue be with the file paths, repo metadata, or ISO structure?

I know I could install minimal and run a post-install script, but for this deployment, I need everything installed from the beginning without network access.

Any guidance on custom ISO creation with additional repositories would be greatly appreciated!

Thanks for your time! :blush:

The paths you are providing to the kickstart are actually incorrect. What I would suggest is to get to a shell when the installer is up and/or stopped at the kickstart error and look at where the ISO gets mounted. It will likely be in /run/media and that will be the path you will need to set your kickstart to.

1 Like

Hi nazulanika
Thanks for your reply , i checked and the iso is mounted in /mnt/install/repo
nothing in /run/media

Hello @Yass

i’ve got the same problem of you my kickstart won’t start i’ve got a message saying this

i have my kickstart working perfectly excepting for the repo, here is my kickstart

####################################################################

# Kickstart ROCKY 9

####################################################################

# Use text install

text

eula --agreed

firewall --disabled

bootloader --location=mbr

%packages

@^minimal-environment

%end

# Keyboard layouts

keyboard --xlayouts='fr (oss)'

lang fr_FR.UTF-8

# Network information

network --bootproto=static --device=ens192 --gateway=${build_vm_gateway} --ip=${build_vm_ipaddress} --nameserver=${build_vm_nameservers} --netmask=${build_vm_netmask} --onboot=true --noipv6

# Use network installation

url --url="https://dl.rockylinux.org/pub/rocky/9.6/BaseOS/x86_64/" --proxy="https://10.x.x.x:3128" --noverifyssl

# Run the Setup Agent on first boot

firstboot --enable

### Create primary system partitions.

part /boot --fstype xfs --size=1024 --label=BOOTFS --fsoptions="nodev,nosuid,noexec"

part /boot/efi --fstype vfat --size=1024 --label=EFIFS

part pv.01 --size=100 --grow

### Create a logical volume management (LVM) group.

volgroup vg_root --pesize=4096 pv.01

### Modify logical volume sizes for the virtual machine hardware.

### Create logical volumes.

logvol swap --fstype swap --name=lv_swap --vgname=vg_root --size=1024 --label=SWAPFS

logvol / --fstype ext4 --name=lv_root --vgname=vg_root --size=8192 --label=ROOTFS

logvol /opt --fstype ext4 --name=lv_opt --vgname=vg_root --size=8192 --label=OPTFS --fsoptions="nodev,nosuid"

logvol /tmp --fstype ext4 --name=lv_tmp --vgname=vg_root --size=4096 --label=TMPFS --fsoptions="nodev,noexec,nosuid"

logvol /var --fstype ext4 --name=lv_var --vgname=vg_root --size=8192 --label=VARFS --fsoptions="nodev,noexec,nosuid"

logvol /var/lib --fstype ext4 --name=lv_lib --vgname=vg_root --size=8192 --label=LIBFS --fsoptions="nodev,nosuid"

logvol /var/log --fstype ext4 --name=lv_log --vgname=vg_root --size=8192 --label=LOGFS --fsoptions="nodev,noexec,nosuid"

# Partition clearing information

ignoredisk --only-use=sda

clearpart --none --initlabel

# System timezone

timezone Europe/Paris --isUtc --ntpservers=${build_vm_ntp_server}

#Root password

rootpw --lock

user --groups=wheel --name=${build_builder_username} --password=${build_builder_password}

%post

sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/subscription-manager.conf

cat <<EOF > /etc/yum.repos.d/${build_os_name}.repo

[rpm.test]

name=${build_os_name}.repo

baseurl=${build_os_repo}

gpgkey=${build_os_repo}/RPM-GPG-KEY-Rocky-9.gpg

repo_gpgcheck=1

sslverify=0

gpgcheck=0

enabled=1

EOF

/bin/dnf install -y sudo open-vm-tools perl python3-pip

echo "${build_builder_username} ALL=(ALL) EXEC:NOPASSWD: ALL" >> /etc/sudoers.d/${build_builder_username}

%end

reboot --eject

can you help me with this please ?

thank you :slight_smile:

Hello Jerio45

I’m guessing the issue is with the proxy test it on another rocky machine and also it’s recommanded to test using http instead of https to avoid ssl just in case :smiley:

hello @Yass

yeah i did it avoid ssl i put http instead of https but nothing changes

can you send me your kickstart please ?

i must put url --url or repo --baseurl ? it’s a bit confusing

you said you cheked the iso is mounted in /mnt/install/repo
nothing in /run/media but what did you do exactly to do that ?

thank you

have a good day

Hello @Jerio45
Sure i can send you my kickstart but my repo is local for an offline installation so i do not use any proxy
Here is the kickstart :

# Installation method
cdrom

# System language
lang en_US.UTF-8

# Keyboard layouts
keyboard --xlayouts='us'

# Network information
network --bootproto=dhcp --onboot=off --ipv6=auto --hostname=Test

# Repository configuration
repo --name="xfce-packages" --baseurl=file:///mnt/install/repo/xfce
repo --name="industrial-packages" --baseurl=file:///mnt/install/repo/yass

# Use graphical install
graphical

# Run the Setup Agent on first boot
firstboot --disable

# System timezone
timezone UTC --isUtc

# Root password
rootpw --plaintext test123

# System bootloader configuration
bootloader --location=mbr

# Use automatic partitioning
autopart

# Clear partitions
clearpart --all --initlabel

# Package selection - Minimal XFCE test
%packages
# Essential system packages
bash
kernel
systemd
glibc
dnf

# X11 components
xorg-x11-server-Xorg
xorg-x11-xinit

# Minimal XFCE packages
xfce4-session
xfce4-panel
xfce4-settings
xfwm4
xfce4-terminal
xfdesktop

# Display Manager
lightdm
lightdm-gtk

# Industrial packages - adding SNMP and rsyslog
openssh-server
net-snmp
rsyslog
mariadb-server  

# Remove problematic packages
-kexec-tools
-dracut-network
-plymouth*
-wireless-tools
-NetworkManager*
-bluez*
-pulseaudio*
-kdump
%end

# Create simple user
user --groups=wheel --name=test --password=test123 --plaintext --gecos="Test User"

# Post-installation script
%post --log=/root/xfce-test.log
#!/bin/bash

echo "XFCE Test Installation - $(date)" >> /root/xfce-test.log

# Enable graphical login
systemctl set-default graphical.target
systemctl enable lightdm

# Test if XFCE components are installed
echo "=== XFCE Installation Check ===" >> /root/xfce-test.log
command -v startxfce4 && echo "XFCE: INSTALLED" >> /root/xfce-test.log || echo "XFCE: MISSING" >> /root/xfce-test.log
command -v lightdm && echo "LightDM: INSTALLED" >> /root/xfce-test.log || echo "LightDM: MISSING" >> /root/xfce-test.log

# Set up user for auto-login to test XFCE quickly
echo "test ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/test

echo "XFCE test setup completed" >> /root/xfce-test.log

%end

# Reboot after installation
reboot --eject

I’m still testing and working on it for now :smiley:

Thank you for your response

in my attached file in /mnt/install/repo what am i suppose to put in there ?

i saw you have a xfce and a yass directory, i need to put baseOS and Appstream in there ? How am i supposed to get the repo properly from the official repository dl.linux ?

sorry i’m a bit lost for this one, i did a kickstart for rhel9 with subscription manager and had no issues at all

Hey @Jerio45,
No worries—I’ll guide you through it:

  1. Install Rocky Linux 9.6 (or any version you prefer) on a VM.
  2. Update the system, then download the RPM packages you need.
  3. Put all the packages into a folder and copy them to your Windows or Linux machine.
  4. Place the Rocky ISO in a new folder (e.g., Rocky-dev).
  5. Inside that, create a subfolder (e.g., xfce, yass, etc.) and put the RPMs there.
  6. Create a local repo in that folder.
  7. Use xorriso to build the ISO (I use WSL for this step :slightly_smiling_face:).

Hope that helps!

hey thank you Yass for your help

my goal actually is to create a template from an rocky linux boot iso and configure it with kickstart except that only repo won’t be able to install (error cited above)

Hello everyone and @Yass .

I’ve managed to troubleshoot my repo issue but now here it is another issue i found about dependencies

there is conflicting requests among some packages

so in my %post i did installed libeselinux and the other lib that went missing but nothing changed

module or group minimal-environment is not available

anyone has the same problem than me ?

Hello @Jerio45

I do have the same issues for now im trying to find a solution by adding the rest of packages to my repo manually

I cannot add my repo and the minimal one at the same time i even renamed it but still having the conflict issue.

Hope we can resolve this :smiley:

1 Like