ArticlesRocky Linux

PXE Install Fails on Rocky Linux When Kickstart and Repo Share NFS Export

Introduction

When provisioning Rocky Linux via PXE using NFS, you can't host both the installer source and your kickstart file on the same NFS share. This article explains how to work around this limitation by creating two separate exports, one for the kickstart file and one for the installation media.

Problem

Attempting to point both inst.ks and inst.repo to the same NFS share results in a conflict. The installer fails to locate one of the resources, causing the automated installation to fail. For example, hosting your kickstart in nfs:10.1.0.15:/mnt/repo/ks.cfg and your source at nfs:10.1.0.15:/mnt/repo/ doesn't work. As a result, you may encounter access denied or failed to mount errors.

Resolution

Prerequisites

sudo privileges are required.

NFS configuration

On your NFS server, create two directories:

  • /mnt/ks: for the kickstart file
  • /mnt/repo: for the Rocky Linux ISO or repository

Configure exports in /etc/exports:

/mnt/ks    10.1.0.0/24(ro,sync,no_root_squash)
/mnt/repo   10.1.0.0/24(ro,sync,no_root_squash)

Apply with:

exportfs -r

Place your kickstart file at /mnt/ks/ks.cfg and your ISO or repo under /mnt/repo.

PXE configuration

Update your PXE menu (GRUB/iPXE) entry:

menuentry 'Install Rocky Linux' --class fedora --class gnu-linux --class gnu --class os {
   linuxefi /pxeboot/vmlinuz inst.ks=nfs:10.1.0.15:/mnt/ks/ks.cfg inst.repo=nfs:10.1.0.15:/mnt/repo/ ip=dhcp
   initrdefi /pxeboot/initrd.img
}

Notes

The steps listed in this article apply equally to Rocky Linux 8, 9, and 10

References & related articles

Rocky Linux NFS Server Guide
How to Setup a PXE Server on Rocky Linux 9.x