Rocky linux 10 Kickstart fails, always boots into GUI?

Hi,

I’m trying to setup unattended install for Rocky Linux 10 with kickstart but can’t get it to work, it keeps booting into GUI, below is my kickstart configuration, not able to find any solution for this, can anyone advise what needs to be done ?

#version=RHEL10
# Use graphical install
text
# repo --name="Minimal" --baseurl=file:///run/install/sources/mount-0000-cdrom/Minimal
url --url="file:///run/install/sources/mount-0000-cdrom/Minimal"

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

# Keyboard layouts
keyboard --vckeymap=gb --xlayouts='gb'
# System language
lang en_GB.UTF-8

# Use CDROM installation media
cdrom

%packages
@^minimal-environment
%end

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

ignoredisk --only-use=nvme0n1
autopart
# Partition clearing information
clearpart --none --initlabel

# System timezone
timezone Europe/London --utc

# Network Interface
network --activate

# CD-ROM
reboot --eject

# Enable SSH server
services --enabled="sshd,chronyd"

Grub configuration in Boot folder

set default="1"

function load_video {
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
insmod chain

set timeout=1
### END /etc/grub.d/00_header ###

search --no-floppy --set=root -l 'RockyLinux10.2'

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install Rocky Linux Minimal 10.2' --class fedora --class gnu-linux --class gnu --class os {
linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RockyLinux10 inst.repo=hd:LABEL=RockyLinux10:/
inst.ks=hd:LABEL=RockyLinux10:/kickstart.cfg quiet
initrd /images/pxeboot/initrd.img
}

Grub configuration in EFI/Boot folder

set default="1"

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=1
### END /etc/grub.d/00_header ###

search --no-floppy --set=root -l 'RockyLinux10.2'

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install Rocky Linux Minimal 10.2' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RockyLinux10 inst.repo=hd:LABEL=RockyLinux10:/
inst.ks=hd:LABEL=RockyLinux10:/kickstart.cfg quiet
initrdefi /images/pxeboot/initrd.img
}

I checked logs in /var/log/anaconda/anaconda.log after manually installing and can see the below, might be relevant..

18:29:39,991 DBG network: Initialization started.
18:29:39,995 DBG network: Devices found: ['ens160']
18:29:39,997 DBG network: Running task Apply kickstart
18:29:40,103 DBG network: Apply kickstart result: []
18:29:40,111 DBG network: Running task Dump missing config files
18:29:40,218 DBG network: Dump missing config files result: ['ens160']
...
...
18:29:40,227 INF display: The session bus address is set to unix:path=/run/user/0/bus.
18:29:40,227 DBG anaconda: changing display mode from GUI to GUI <---
...
18:29:40,239 INF anaconda: Display mode is set to 'interactive graphical mode' <---

After some trial and error..

Seems the issue were a couple of things (highlighted below), fixed, and tested in a fresh VM, and works fine..

Below is the final working configuration..

Grub from Boot Directory, in this file changed search --no-floppy --set=root -l 'RockyLinux10' to match the Label

set default="1"

function load_video {
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
insmod chain

set timeout=1
### END /etc/grub.d/00_header ###

search --no-floppy --set=root -l 'RockyLinux10' <--- Changed from RockyLinux10.2 to RockyLinux10 to match the Label

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install Rocky Linux Minimal 10.2' --class fedora --class gnu-linux --class gnu --class os {
linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RockyLinux10 inst.repo=hd:LABEL=RockyLinux10:/ inst.ks=hd:LABEL=RockyLinux10:/kickstart.cfg quiet
initrd /images/pxeboot/initrd.img
}

Grub from EFI directory, in this file made 2 changes

  1. changed search --no-floppy --set=root -l 'RockyLinux10' to match the Label

  2. Changed all =hd to =cdrom in the line

linuxefi /images/pxeboot/vmlinuz inst.stage2=cdrom:LABEL=RockyLinux10 inst.repo=cdrom:LABEL=RockyLinux10:/ inst.ks=cdrom:LABEL=RockyLinux10:/kickstart.cfg quiet

Final version

set default="1"

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=1
### END /etc/grub.d/00_header ###

search --no-floppy --set=root -l 'RockyLinux10' <--- Changed from RockyLinux10.2 to RockyLinux10 to match the Label

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install Rocky Linux Minimal 10.2' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=cdrom:LABEL=RockyLinux10 inst.repo=cdrom:LABEL=RockyLinux10:/ inst.ks=cdrom:LABEL=RockyLinux10:/kickstart.cfg quiet <--- Changes made on this line
initrdefi /images/pxeboot/initrd.img
}

Kickstart file, in this file added

text --non-interactive
skipx
cdrom
eula --agreed
repo --name="Minimal" --baseurl=file:///run/install/sources/mount-0000-cdrom/Minimal

Final version

#version=RHEL10
# Use graphical install
text --non-interactive
skipx
cdrom
eula --agreed
repo --name="Minimal" --baseurl=file:///run/install/sources/mount-0000-cdrom/Minimal
# url --url="file:///run/install/sources/mount-0000-cdrom/Minimal"

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

# Keyboard layouts
keyboard --vckeymap=gb --xlayouts='gb'
# System language
lang en_GB.UTF-8

%packages
@^minimal-environment
%end

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

autopart
# Partition clearing information
clearpart --none --initlabel

# ignoredisk --only-use=nvme0n1
# autopart
# Partition clearing information
# clearpart --none --initlabel

# System timezone
timezone Europe/London --utc

# Network Interface
network --activate

# CD-ROM
reboot --eject

# Enable SSH server
services --enabled="sshd,chronyd"