Rocky Linux 9.5/blue onyx & custom ISO

[label@sani kickstarts]$ mock -r rocky-9-x86_64 --init ; mock -r rocky-9-x86_64 --install lorax-lmc-novirt vim-minimal pykickstart git
. . .
[label@sani kickstarts]$ sudo setenforce 0
[sudo] password for label:
[label@sani kickstarts]$ mock -r rocky-9-x86_64 --shell --isolation=simple --enable-network
INFO: mock.py version 6.1 starting (python version = 3.13.2, NVR = mock-6.1-1.fc41), args: /usr/libexec/mock/mock -r rocky-9-x86_64 --shell --isolation=simple --enable-network
<mock-chroot> sh-5.1# git clone https://github.com/rocky-linux/kickstarts -b r9
Cloning into 'kickstarts'...
remote: Enumerating objects: 2376, done.
remote: Counting objects: 100% (1056/1056), done.
remote: Compressing objects: 100% (449/449), done.
remote: Total 2376 (delta 705), reused 904 (delta 555), pack-reused 1320 (from 1)
Receiving objects: 100% (2376/2376), 647.98 KiB | 2.24 MiB/s, done.
Resolving deltas: 100% (1646/1646), done.
<mock-chroot> sh-5.1# cd kickstarts/
<mock-chroot> sh-5.1# vi Rocky-9-Workstation.ks
# make my edits
<mock-chroot> sh-5.1# grep 'brave' Rocky-9-Workstation.ks
repo --name="Brave" --baseurl=https://brave-browser-rpm-release.s3.brave.com/$basearch
dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
brave-browser

# build the ISO
<mock-chroot> sh-5.1# livemedia-creator --ks Rocky-9-Workstation.ks \
>  --no-virt \
>   --resultdir /var/lmc \
>  --project="Rocky Linux" \
>  --make-iso \
>  --volid Rocky-Workstation-9 \
>  --iso-only \
>  --iso-name Rocky-Workstation-9-x86_64.iso \
>  --releasever=9 \
>  --nomacboot
2025-04-14 18:38:18,257: livemedia-creator v34.9.26-1
2025-04-14 18:38:18,257: selinux is Disabled
. . .
2025-04-14 18:38:32,931: Starting package installation process
2025-04-14 18:38:33,432: Downloading packages
2025-04-14 18:38:35,435: Downloading 1315 RPMs, 6.92 MiB / 1.94 GiB (0%) done.
2025-04-14 18:38:37,437: Downloading 1315 RPMs, 18.74 MiB / 1.94 GiB (0%) done.
2025-04-14 18:38:39,440: Downloading 1315 RPMs, 27.15 MiB / 1.94 GiB (1%) done.

It is building fine for me. In fact, it finishes:

2025-04-14 18:45:15,223: Shutting down log processing
2025-04-14 18:45:17,706: Disk Image install successful
2025-04-14 18:45:17,706: working dir is /var/tmp/lmc-work-42fa3mvx
2025-04-14 18:45:17,719: Using disk size of 8194MiB
2025-04-14 18:45:17,721: Creating a squashfs+ext4 runtime
2025-04-14 18:49:12,509: Rebuilding initrds
2025-04-14 18:49:12,509: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2025-04-14 18:49:12,518: rebuilding boot/initramfs-5.14.0-503.35.1.el9_5.x86_64.img
2025-04-14 18:49:41,787: Building boot.iso
2025-04-14 18:49:41,820: running x86.tmpl
2025-04-14 18:49:48,433: Disk image erased
2025-04-14 18:49:49,500: SUMMARY
2025-04-14 18:49:49,500: -------
2025-04-14 18:49:49,501: Logs are in /builddir/kickstarts
2025-04-14 18:49:49,501: Results are in /var/lmc

And it also boots.

The final kickstart that worked without any issues for me:

# Generated by pykickstart v3.48
#version=DEVEL
# Firewall configuration
firewall --enabled --service=mdns
# Keyboard layouts
keyboard 'us'
# System language
lang en_US.UTF-8
# Network information
network  --bootproto=dhcp --device=link --activate
# Shutdown after installation
shutdown
repo --name="BaseOS" --baseurl=http://dl.rockylinux.org/pub/rocky/9/BaseOS/$basearch/os/ --cost=200
repo --name="AppStream" --baseurl=http://dl.rockylinux.org/pub/rocky/9/AppStream/$basearch/os/ --cost=200
repo --name="CRB" --baseurl=http://dl.rockylinux.org/pub/rocky/9/CRB/$basearch/os/ --cost=200
repo --name="extras" --baseurl=http://dl.rockylinux.org/pub/rocky/9/extras/$basearch/os --cost=200
repo --name="Brave" --baseurl=https://brave-browser-rpm-release.s3.brave.com/$basearch

# Root password
rootpw --iscrypted --lock locked
# SELinux configuration
selinux --enforcing
# System services
services --disabled="sshd" --enabled="NetworkManager,ModemManager"
# System timezone
timezone US/Eastern
# Use network installation
url --url="http://dl.rockylinux.org/pub/rocky/9/BaseOS/$basearch/os/"
# X Window System configuration information
xconfig  --startxonboot
# System bootloader configuration
bootloader --location=none
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part / --fstype="ext4" --size=5120
part / --size=8192

%post
dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
systemctl enable livesys.service
systemctl enable livesys-late.service
# Enable tmpfs for /tmp - this is a good idea
systemctl enable tmp.mount

# make it so that we don't do writing to the overlay for things which
# are just tmpdirs/caches
# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475
cat >> /etc/fstab << EOF
vartmp   /var/tmp    tmpfs   defaults   0  0
EOF

# PackageKit likes to play games. Let's fix that.
rm -f /var/lib/rpm/__db*
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
basearch=$(uname -i)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
echo "Packages within this LiveCD"
rpm -qa
# Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db*

# go ahead and pre-make the man -k cache (#455968)
/usr/bin/mandb

# make sure there aren't core files lying around
rm -f /core*

# remove random seed, the newly installed instance should make it's own
rm -f /var/lib/systemd/random-seed

# convince readahead not to collect
# FIXME: for systemd

echo 'File created by kickstart. See systemd-update-done.service(8).' \
    | tee /etc/.updated >/var/.updated

# Drop the rescue kernel and initramfs, we don't need them on the live media itself.
# See bug 1317709
rm -f /boot/*-rescue*

# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794 - the error is expected
systemctl disable network

# Remove machine-id on generated images
rm -f /etc/machine-id
touch /etc/machine-id

# relabel
#/usr/sbin/restorecon -RF /
/usr/sbin/fixfiles -R -a restore

%end

%post --nochroot
# only works on x86_64
if [ "unknown" = "i386" -o "unknown" = "x86_64" ]; then
    # For livecd-creator builds. livemedia-creator is fine.
    if [ ! -d /LiveOS ]; then mkdir -p /LiveOS ; fi
    cp /usr/bin/livecd-iso-to-disk /LiveOS
fi

%end

%post

sed -i 's/^livesys_session=.*/livesys_session="gnome"/' /etc/sysconfig/livesys

%end

%packages
@anaconda-tools
@base-x
@core
@fonts
@gnome-desktop
@guest-desktop-agents
@hardware-support
@internet-browser
@multimedia
@networkmanager-submodules
@workstation-product
aajohan-comfortaa-fonts
anaconda
anaconda-install-env-deps
anaconda-live
chkconfig
dracut-live
efi-filesystem
efibootmgr
efivar-libs
glibc-all-langpacks
grub2-common
grub2-efi-*64
grub2-efi-*64-cdboot
grub2-pc-modules
grub2-tools
grub2-tools-efi
grub2-tools-extra
grub2-tools-minimal
grubby
initscripts
kernel
kernel-modules
kernel-modules-extra
libreoffice-calc
libreoffice-emailmerge
libreoffice-graphicfilter
libreoffice-impress
libreoffice-writer
livesys-scripts
memtest86+
shim-*64
syslinux
-@dial-up
-@input-methods
-@standard
-gfs2-utils
-reiserfs-utils
-shim-unsigned-*64
brave-browser

%end
2 Likes