Rocky Linux 9.5/blue onyx & custom ISO

I am trying to create an ISO of a custom installed Rocky 9.5/blue onyx.
I tried image builder in cockpit which seems to work but doesn’t keep the installed software, users, details, 3rd party software, login gui etc.
What could i be doing wrongly please?

I tried “linux live kit” which created an iso but the bootinst.sh did not work; so the iso wasn’t bootable. I didn’t use any bootable creators (rufus-like tools) as that could make it worse.

Read through livemedia-creator but i am a bit confused on how to start.
Also if “/root/anaconda-ks.cfg” has all the basic installation; could i use that with a standard downloaded iso & let the installation pick up the cfg via webGUI?
The only problem is what if the new device isn’t online or on a network?

Would be grateful; if there was a simpler way to create the custom iso without selecting too many options - please? :slight_smile:

Cheers

I believe xorriso should be used, see this forum search: Search results for 'xorriso order:latest' - Rocky Linux Forum since a lot of people have had similar issues for building custom iso.

…but xorriso is only for extraction not customised iso; iwalker ? :thinking:

Thank you

See also this particular post from the results I listed: Getting checksum error while installing Rocky Linux 8 from generated ISO from original ISO - #6 by nazunalika

It lists the tools being used, not only extract, but for recreating after. Since plenty of people have experienced problems making custom ISO’s, and the issue has already been addressed on the forums, read the results to see if it helps :wink:

Here’s another: Custom Rocky ISO for Post Production - #2 by nazunalika using livemedia-creator with a link as well to how it’s being used for Rocky ISO’s.

If none of those results help, you’ll have to wait until someone else jumps in on the thread.

okay, got your point, thank you iwalker :slight_smile:

Dear All,

  1. Trying to use linux-live-kit to build a custom ISO
  2. I get a different problem every bloody time !
    Some times it work but the ISO fails, other times something else occurs.
  3. Now my current problem is; when i run ./build; i get the results below …
  4. Thus i checked the build path but i am not sure how to edit the “build file” to match the shell script.
  5. How do i edit “C” (export path) by looking at “A” ?
  6. Please help - unless someone has a better tool to build a custom ISO with Rocky 9.5 ?

(A) ->Path on ROCKY 9.5:
[root@LinuxCoder linux-live-2.12]# which genisoimage
/usr/bin/which: no genisoimage in (/root/.local/bin:/root/bin:/home/coder/.local/bin:/home/coder/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)

(B)->Error after running ./build from /tmp/…
#./build
Changing current directory to /tmp/linux-live-2.11
/usr/bin/which: no mkisofs in (.:./tools:../tools:/usr/sbin:/usr/bin:/sbin:/bin:/)
/usr/bin/which: no genisoimage in (.:./tools:../tools:/usr/sbin:/usr/bin:/sbin:/bin:/)

(C) → sample shell script for build file.
#!/bin/bash
export PATH=.:./tools:../tools:/usr/sbin:/usr/bin:/sbin:/bin:/

CHANGEDIR=$(dirname $(readlink -f $0))
echo “Changing current directory to $CHANGEDIR”
cd $CHANGEDIR
CWD=“$(pwd)”

Thank you

To preface, I do not know what “linux-live-kit” is. It sounds as though this tool is making assumptions while checking for (or using) deprecated tools. If the script that you’re running is looking for mkisofs, install xorriso. If it’s asking for genisoimage, you will need to install epel-release and then install genisoimage after.

With that said, kickstarts and livemedia-creator are what we support as that is how we create our live images. Our kickstarts repo contains quite a few kickstarts which you can modify and instructions on making live images using livemedia-creator. The live kickstarts are any of these:

  • Rocky-9-Workstation.ks
  • Rocky-9-Workstation-Lite.ks
  • Rocky-9-XFCE.ks
  • Rocky-9-KDE.ks
  • Rocky-9-MATE.ks
  • Rocky-9-Cinnamon.ks

You can add packages under %packages and run arbitrary commands/scripts in %post as you desire. Follow the instructions on the README on building the ISO and then you can test it.


As an example, let’s say I wanted to build a workstation live image, but I wanted to make sure I had a few extra packages available.

I install epel-release and mock

$ dnf install epel-release -y
$ dnf install mock -y

I need to add my user to the mock group so I can use mock. After adding myself to the group, I have to logout and back in.

$ sudo usermod -a -G mock user

Now I can run mock and create the build environment. Note that selinux has to be temporarily disabled for the live process to work properly.

$ mock -r rocky-9-x86_64 --init
$ mock -r rocky-9-x86_64 --install lorax-lmc-novirt vim-minimal pykickstart git
$ setenforce 0

Now I can enter the build environment.

$ mock -r rocky-9-x86_64 --shell --isolation=simple --enable-network

Once I’m in, I clone the git repo.

$ git clone https://github.com/rocky-linux/kickstarts -b r9

I’ll modify the kickstart using vi. I’ll add the packages I want to the end of the packages section, right before %end.

$ cd kickstarts

# Open the kickstart and look for %packages
$ vi Rocky-9-Workstation.ks

%packages
. . .
epel-release
thunderbird
tmux
zsh

%end

Now I can create the live image.

$ 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

The ISO can then be found in: /var/lib/mock/rocky-9-x86_64/root/var/lmc.

2 Likes

Stupendous reply, grateful for this - God bless you :slightly_smiling_face:
Going to try this tool. Cheers

Sir,
Appreciate your reply. Just have a few more question please?

Almost there: (failed)
2025-04-10 11:40:42,984: The installer will now terminate.
2025-04-10 11:43:44,198: Running anaconda failed: process ‘[‘unshare’, ‘–pid’, ‘–kill-child’, ‘–mount’, ‘–propagation’, ‘unchanged’, ‘anaconda’, ‘–kickstart’, ‘/builddir/kickstarts/Rocky-9-Workstation.ks’, ‘–cmdline’, ‘–dirinstall’, ‘–remotelog’, ‘127.0.0.1:46963’]’ exited with status 1
2025-04-10 11:43:44,198: Shutting down log processing
2025-04-10 11:43:44,221: Install failed: novirt_install failed
2025-04-10 11:43:44,221: Removing bad disk image
2025-04-10 11:43:44,222: ERROR: Image creation failed: novirt_install failed
2025-04-10 11:43:44,222: Image creation failed: novirt_install failed

Question please:

  1. Could one use a downloaded ks file (Rocky-9-Workstation.ks), i couldn’t find a way to point to a manually edited file dir without using git?
  2. Also if i were to add a 3rd party software, such as those installed in /opt, would the ks be able to recognise those please? - Eg brave browser
  3. Where is this location please?: /builddir/kickstarts - wanted to manually dump ks without downloading via git.
  4. Deleted the generated dir: /var/lib/mock; rm -R -f mock* & enforced SElinux to start again - when i check your new reply :slight_smile:
  5. Changed the locale to UK (# System language lang en_GB.UTF-8), but it still showed US in the initial summary before it failed.

Cheers

I’m not sure I understand your question. You can use any kickstart that you either download, modify, or create. You would just need to copy it into the mock chroot via another terminal.

Yes, as long as they are packages. So for example with brave, I’d add a repo line, a line under %packages for the browser, and a %post command to add the repo file for future updates.

repo --name="Brave" --baseurl=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo

%packages
...
brave-browser

%post
...
dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo

It’s in the mock chroot. The full path is /var/lib/mock/rocky-9-x86_64/root/builddir/kickstarts.

Without a lot to go off of, I can’t tell you why you had a failure. It’s very limited in information on what lead up to the error. If you can provide more context, then we can determine where the issue is.

1 Like

Sir,
Thank you …issue seems to be the installation source.

  1. It keeps failing even with a ks file that has no modification - i only edited the lang & timezone (which is displayed in the summary) - could the timezone be the problem?
  2. Do you think the software sources have changed on the git-ks file please (which contains a lot packages)?
  3. Could i copy some of the /root/anaconda-ks.cfg settings into the ks please?

I shan’t bother you again :slight_smile:
Cheers

No, those would not be a problem. If they were, it would tell you those are issues that you need to fix.

No, the URL’s they point to are correct. It would be helpful to know what the full error you’re getting is. The log files will be there in /tmp, /builddir, or /builddir/kickstarts.

If that is what you want to do, then you can. The kickstarts we provide are for the images we make and can be customized by anyone.

1 Like

Sir,
Thank you so much, I say …managed to get it to work by using a different laptop (& pointing the ks to a downloaded file); however after i installed the ISO it seems to fail 100%. Thus I would be grateful; if you could please check why it always has the same error :slight_smile:
My apologies for bothering you again :folded_hands:

1. -> livemedia.log
025-04-13 21:27:18,517 DEBUG livemedia-creator: Namespace(make_iso=True, make_disk=False, make_fsimage=False, make_appliance=False, make_ami=False, make_tar=False, ma>
2025-04-13 21:27:18,517 INFO livemedia-creator: livemedia-creator v34.9.26-1
2025-04-13 21:27:18,517 INFO pylorax: selinux is Disabled
2025-04-13 21:27:18,659 INFO pylorax: disk_img = /var/lmc/lmc-disk-gxbq7xcw.img
2025-04-13 21:27:18,659 INFO pylorax: Using disk size of 8194MiB
2025-04-13 21:27:19,414 DEBUG pylorax.imgutils: make tmp mountdir /var/tmp/lorax.imgutils.o1c6qh60
2025-04-13 21:27:19,773 DEBUG pylorax.imgutils: remove tmp mountdir /var/tmp/lorax.imgutils.o1c6qh60
2025-04-13 21:27:19,913 INFO pylorax: Running anaconda.
2025-04-13 21:27:27,130 INFO livemedia-creator: Processing logs from ('127.0.0.1', 40072)
2025-04-13 21:27:27,436 INFO pylorax: Starting installer, one moment...
2025-04-13 21:27:27,436 INFO pylorax: terminal size detection failed, using default width
2025-04-13 21:27:27,437 INFO pylorax: anaconda 34.25.5.9-1.el9.rocky.0.3 for Rocky Linux 9 (pre-release) started.
2025-04-13 21:27:27,437 INFO pylorax:
2025-04-13 21:27:27,437 INFO pylorax: Some warnings occurred during reading the kickstart file:
2025-04-13 21:27:27,437 INFO pylorax: A partition with the mountpoint / has already been defined.
2025-04-13 21:27:27,437 INFO pylorax: 21:27:27 Not asking for VNC because of an automated install
2025-04-13 21:27:27,438 INFO pylorax: 21:27:27 Not asking for VNC because we don't have Xvnc
2025-04-13 21:27:31,944 INFO pylorax: Starting automated install....
2025-04-13 21:27:31,944 INFO pylorax: ================================================================================
2025-04-13 21:27:31,944 INFO pylorax: ================================================================================
2025-04-13 21:27:31,945 INFO pylorax: Installation
2025-04-13 21:27:31,945 INFO pylorax:
2025-04-13 21:27:31,945 INFO pylorax: 1) [x] Language settings                 2) [x] Time settings
2025-04-13 21:27:31,945 INFO pylorax:        (English (United Kingdom))               (Europe/London timezone)
2025-04-13 21:27:31,945 INFO pylorax: 3) [!] Installation source               4) [!] Software selection
2025-04-13 21:27:31,945 INFO pylorax:        (Error setting up software               (Error checking software
2025-04-13 21:27:31,945 INFO pylorax:        source)                                  selection)
2025-04-13 21:27:31,946 INFO pylorax:
2025-04-13 21:27:31,946 INFO pylorax:
2025-04-13 21:27:31,946 INFO pylorax: The installation was stopped due to an error which occurred while running in non-interactive cmdline mode. Since there cannot be >
2025-04-13 21:27:31,946 INFO pylorax: The exact error message is:
2025-04-13 21:27:31,946 INFO pylorax:
2. -> program.log
2025-04-13 21:27:19,112 INFO: Running... mkfs.ext4 -L Anaconda -b 4096 -m 0 /dev/loop0
2025-04-13 21:27:19,412 INFO: mke2fs 1.46.5 (30-Dec-2021)
2025-04-13 21:27:19,413 INFO: Discarding device blocks:       0/2097152^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H               ^H^H^H^H^H^H^H^H^H^H^H^H^H^H^Hdone
2025-04-13 21:27:19,413 INFO: Creating filesystem with 2097152 4k blocks and 525312 inodes
2025-04-13 21:27:19,413 INFO: Filesystem UUID: 628fbec9-8461-4244-a9c4-f6c3d6de08d0
2025-04-13 21:27:19,413 INFO: Superblock backups stored on blocks:
2025-04-13 21:27:19,413 INFO: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
2025-04-13 21:27:19,413 INFO: 
2025-04-13 21:27:19,413 INFO: Allocating group tables:  0/64^H^H^H^H^H     ^H^H^H^H^Hdone
2025-04-13 21:27:19,413 INFO: Writing inode tables:  0/64^H^H^H^H^H     ^H^H^H^H^Hdone
2025-04-13 21:27:19,413 INFO: Creating journal (16384 blocks): done
2025-04-13 21:27:19,413 INFO: Writing superblocks and filesystem accounting information:  0/64^H^H^H^H^H     ^H^H^H^H^Hdone
2025-04-13 21:27:19,414 INFO: 
2025-04-13 21:27:19,414 DEBUG: Return code: 0
2025-04-13 21:27:19,414 INFO: Running... mount /dev/loop0 /var/tmp/lorax.imgutils.o1c6qh60
2025-04-13 21:27:19,683 DEBUG: Return code: 0
2025-04-13 21:27:19,684 INFO: Running... df /var/tmp/lorax.imgutils.o1c6qh60
2025-04-13 21:27:19,701 INFO: Filesystem     1K-blocks  Used Available Use% Mounted on
2025-04-13 21:27:19,701 INFO: /dev/loop0       8154332    24   8137924   1% /var/tmp/lorax.imgutils.o1c6qh60
2025-04-13 21:27:19,701 DEBUG: Return code: 0
2025-04-13 21:27:19,701 INFO: Running... umount /var/tmp/lorax.imgutils.o1c6qh60
2025-04-13 21:27:19,772 DEBUG: Return code: 0
2025-04-13 21:27:19,773 INFO: Running... losetup --detach /dev/loop0
2025-04-13 21:27:19,789 DEBUG: Return code: 0
2025-04-13 21:27:19,789 INFO: Running... sync
2025-04-13 21:27:19,856 DEBUG: Return code: 0
2025-04-13 21:27:19,857 INFO: Running... mount -o loop /var/lmc/lmc-disk-gxbq7xcw.img /mnt/sysimage/
2025-04-13 21:27:19,910 DEBUG: Return code: 0
2025-04-13 21:27:19,913 INFO: Running... unshare --pid --kill-child --mount --propagation unchanged anaconda --kickstart /builddir/kickstarts/Rocky-9-Workstation.ks -->
2025-04-13 21:30:34,713 INFO: Running... umount /mnt/sysimage
2025-04-13 21:30:35,384 DEBUG: Return code: 0
  1. → ks file (shortened due to forum rules)
repo --name="Brave" --baseurl=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
...
# Root password
rootpw --iscrypted $6$nVJ0TsdZDZKoioLD$8zyrTA/YLyEePo72M7uXEf9Tplp1W8dXkN5P7m3hUdeGoWtPVCh0DfZloMbluKlVO6cF5dM7oEP6qFEnf8P4b/
user --name=coder --password=$6$LaSmtB1z5wwR4uR3$f0YuEPZP/.irkto3KnIFgP4t8youBNYCA0N7vTQLwjYe6/88/3OGlk6BNP3DDrtALE9sxoXkZPu/nDtBZ64C00 --iscrypted --gecos="coder"

%packages
epel-release
gnome-tweaks
gnome-extensions-app
@anaconda-tools
@base-x
...
-shim-unsigned-*64
brave-browser
%end

%post
dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
%end

Change your repo line like so:

repo --name="Brave" --baseurl=https://brave-browser-rpm-release.s3.brave.com/$basearch

The software selection part of the installer is wanting a repo URL and not a repo file (which I provided on accident in my examples).

1 Like

Sir, Sorry :slight_smile:
Tried several times; deleted /var/lmc & remove all junk from /kickstarts & try again.
I can’t find anything wrong with the ks file & only added below with no accounts & passwd etc:

repo --name="Brave" --baseurl=https://brave-browser-rpm-release.s3.brave.com/$basearch

%packages
epel-release
gnome-tweaks
gnome-extensions-app
brave-browser
...
-shim-unsigned-*64
%end

%post
dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
%end

2. Output
/usr/lib/python3.9/site-packages/pykickstart/commands/partition.py:448: KickstartParseWarning: A partition with the mountpoint / has already been defined.
  warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint, KickstartParseWarning)
2025-04-14 16:32:06,877: disk_img = /var/lmc/lmc-disk-6_2bfpyj.img
2025-04-14 16:32:06,877: Using disk size of 8194MiB
2025-04-14 16:32:07,009: Running anaconda.
2025-04-14 16:32:10,725: Processing logs from ('127.0.0.1', 56635)
2025-04-14 16:32:11,017: Starting installer, one moment...
2025-04-14 16:32:11,017: terminal size detection failed, using default width
2025-04-14 16:32:11,017: anaconda 34.25.5.9-1.el9.rocky.0.3 for Rocky Linux 9 (pre-release) started.
2025-04-14 16:32:11,017: 
2025-04-14 16:32:11,017: Some warnings occurred during reading the kickstart file:
2025-04-14 16:32:11,018: A partition with the mountpoint / has already been defined.
2025-04-14 16:32:11,018: 16:32:10 Not asking for VNC because of an automated install
2025-04-14 16:32:11,018: 16:32:10 Not asking for VNC because we don't have Xvnc
2025-04-14 16:32:13,521: Starting automated install..
2025-04-14 16:32:13,521: ================================================================================
2025-04-14 16:32:13,521: ================================================================================
2025-04-14 16:32:13,521: Installation
2025-04-14 16:32:13,521: 
2025-04-14 16:32:13,521: 1) [x] Language settings                 2) [x] Time settings
2025-04-14 16:32:13,522:        (English (United Kingdom))               (Europe/London timezone)
2025-04-14 16:32:13,522: 3) [!] Installation source               4) [!] Software selection
2025-04-14 16:32:13,522:        (Error setting up software               (Error checking software
2025-04-14 16:32:13,522:        source)                                  selection)
2025-04-14 16:32:13,522: 5) [ ] User creation
2025-04-14 16:32:13,522:        (No user will be created)
2025-04-14 16:32:13,522: 
2025-04-14 16:32:13,522: 
2025-04-14 16:32:13,522: The installation was stopped due to an error which occurred while running in non-interactive cmdline mode. Since there cannot be any questions in cmdline mode, edit your kickstart file and retry installation. 
2025-04-14 16:32:13,522: The exact error message is: 
2025-04-14 16:32:13,522: 
2025-04-14 16:32:13,522: The following mandatory spokes are not completed:
2025-04-14 16:32:13,522: Installation source
2025-04-14 16:32:13,522: Software selection. 
2025-04-14 16:32:13,522: 
2025-04-14 16:32:13,522: The installer will now terminate.
[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

This forum is too good…, going to use this kickstart file; you are awesome - God bless. :folded_hands:

Cheers