Kickstart: Error setting up base repository

I am setting up a special image of Rocky Linux 9.2 with a kickstart script, to do automated installation of servers that we are shipping at $DAYJOB. I am updating from scripting written for CentOS 7.9/RHEL 7.9 that worked well.

I am creating dual-booting USB/CD-ROM images, but I am running into problems when running the USB image on the server, it is unable to find the packages (“Installation Source: Error setting up base repository”). It works fine when I run the USB image in a local VirtualBox instance with direct USB access.

The build process is like this:

  • Download the Rocky 9.2 minimal image (checksums are verified).
  • Clear minimal/Packages.
  • Download all packages needed with dependencies (adding some local packages that we maintain).
  • Add kickstart script.
  • Modify grub and isolinux menus to point to the kickstart scripts.
  • Update .treeinfo checksums for the modified grub image.
  • Generate ISO file using genisoimage and isohybrid.
  • Copy image to USB device and reboot.

If I instead of USB use a DVD-ROM image (virtual over KVM, as the server does not have an actual optical drive) it works fine.

The kickstart uses the cdrom tag to indicate the package location. I tried changing it to url --url file:///mnt/install/repo/minimal/Packages/ without any success.

Any ideas?

I finally (I have been debugging this the last two weeks) found the relevant error message entries in the journal in the installer environment, which led me to [ Red Hat Bug 1914955 - Regression: Cannot install system using DVD on USB when ignoredisk is specified in kickstart: The ignoredisk entry in the kickstart file hid the USB drive from the installer.

Replacing cdrom with harddrive --partition=sdX --dir=/ in the kickstart file when booting in USB mode fixes the issue and lets the installer finish.

2 Likes