Custom unattended kickstart installation - Error setting up base repository

Hey,

I am trying to create a custom installation of Rocky Linux using kickstart. The two goals of this are

  • To more quickly deploy it on a large number of systems (unattend)
  • To be able to include custom settings and packages in the installer, such as networking and domain join

However, I keep running into issues, the latest of which I haven’t managed to solve yet.
To make it short, I manage to boot off the ISO I generated that contains a custom kickstart.cfg as well as modified grub.cfg, and get into the graphical installer. The installer successfully skips the language and keyboard selection steps, which tells me that fundamentally the kickstart file works.

The installer then shows the installation summary, and unfortunately this is where things don`t work anymore. Under the section “Installation Source” I get the error message “Error setting up base repository”.

Now I know for a fact that the Image does in fact contain the repository, because when I boot the same image without using the custom kickstart.cfg, everything works just fine without the error message.

My best guess is that something in the kickstart.cfg is not working with the way that the installation medium is mounted during the installation and is therefore not finding the repositories in the path it expects them to be.

This is my kickstart cfg: (It is based off of a clean manual installation of Rocky Linux on the same hardware)

Generated by Anaconda 34.25.5.17

Generated by pykickstart v3.32

#version=RHEL9

Use graphical install

graphical
repo --name=“AppStream” --baseurl=file:///run/install/sources/mount-0000-hdd-device/AppStream

%addon com_redhat_kdump --enable --reserve-mb=‘auto’

%end

Keyboard layouts

keyboard --xlayouts=‘us’

System language

lang en_US.UTF-8

Use hard drive installation media

harddrive --dir= --partition=/dev/sda2

%packages
@^workstation-product-environment

%end

Run the Setup Agent on first boot

firstboot --enable

Generated using Blivet version 3.6.0

ignoredisk --only-use=sdb
autopart

Partition clearing information

clearpart --none --initlabel

System timezone

timezone Europe/Berlin

Root password
---redacted---

I think you also need a url line in your kickstart, to define the “base” repo. Kinda like this (pulled randomly from one of the “official” Rocky kickstarts for creating images): kickstarts/Rocky-9-KDE.ks at r9 - sig_core/kickstarts - Rocky Enterprise Software Foundation Git Service

In your case, I imagine it would look like:

url --url="file:///run/install/sources/mount-0000-hdd-device/BaseOS"

It doesn’t have to be BaseOS necessarily (it’s arbitrary), but kickstart for whatever reason does require a url line. You can have multiple repo lines of course, but I don’t think your installation will work without a BaseOS defined somewhere.

Hopefully it’s just that easy to fix :crossed_fingers:

I will check it out and see if a change there improves things. It’s just a little odd since this file is exactly what the anaconda installer supposedly used for the first time installation of the system.

Hi @skip77 ,

Rocky 10, could you maybe clarify whats different booting kickstart and required repos “url” for
– BOOT.iso
– DVD1.iso

When using same kickstart file on DVD1 , final iso is ~10GB(boots as expected, too big ISO).

When using same kickstart file on BOOT, final iso is ~6GB(does not boot, compact ISO).

Thanks

@0x0 : The DVD iso contains basically a full copy of the BaseOS and AppStream repositories, allowing you to access them directly from your local media (aka file:///run/install/sources/mount-0000-hdd-device/BaseOS ).

The BOOT iso contains no repositories, and requires some kind of network access to pull packages for the installation. So you’d have to point to somewhere on the network where the repositories are available. Either a local mirror or just use a public URL: https://dl.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/

The network option works for kickstarting from DVD as well, no reason why you are required to use the local repos present on the media.

In my past experience in a corporate environment, most folks will use the boot iso and get all packages over the network. Often from a local cloned mirror that the organization controls.

1 Like

Hello @skip77 ,

thanks for clarification on difference about BOOT and DVD iso !

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