# Getting started with Kickstart and TFTP

**URL:** <https://forums.rockylinux.org/t/getting-started-with-kickstart-and-tftp/13563>\
**Category:** Rocky Linux Help & Support\
**Created:** [April 12, 2024, 5:41am UTC](https://forums.rockylinux.org/t/getting-started-with-kickstart-and-tftp/13563 "2024-04-12T05:41:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![microlinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/microlinux/32/1244_2.png) [@microlinux](https://forums.rockylinux.org/u/microlinux)\
**Post date:** [April 12, 2024, 5:41am UTC](https://forums.rockylinux.org/t/getting-started-with-kickstart-and-tftp/13563/1 "2024-04-12T05:41:06Z")

</div>

Hi,

I never worked with Kickstart, and I’d like to use it for automating some installations.

I wonder how I would get my local machines to actually use their Kickstart files. As far as I understand, you have to use a local TFTP server to distribute them over the local network. (I never used TFTP and don’t even know what it is.)

I have a local Dnsmasq server running Rocky Linux 8, and as far as I can tell, Dnsmasq is able to use TFTP.

Here’s what I’m vaguely planning to do (correct me if I’m wrong).

1. Install Rocky Linux on a local sandbox PC.

2. Grab the `/root/anaconda-ks.cfg` file that has been created.

3. Configure a local TFTP server on my Dnsmasq installation.

4. Rename the Kickstart file to something like `sandbox-ks.cfg` and put it on my TFTP server.

5. Boot the sandbox PC on the Rocky Linux installer and then use some magic option to retrieve the Kickstart file over the network.

Has someone here actually used this kind of scenario? Can you point me to some relevant documentation?

Cheers,

Niki

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [April 12, 2024, 12:06pm UTC](https://forums.rockylinux.org/t/getting-started-with-kickstart-and-tftp/13563/2 "2024-04-12T12:06:13Z")

</div>

RH docs: [Chapter&nbsp;2.&nbsp;Preparing for your RHEL installation Red Hat Enterprise Linux 9 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/performing_a_standard_rhel_9_installation/assembly_preparing-for-your-installation_installing-rhel#preparing-for-a-network-install_assembly_preparing-for-your-installation)

1-2: yes  
If you load packages from USB on step 1, then edit (or comment/remove) the installation source from the file. If the kickstart file does not contain decisions for all choices, then the GUI will ask for them and you get “better” `/root/anaconda-ks.cfg` for next round.

4: To HTTP/HTTPS, NFS, or FTP server. Not to TFTP.

3:  
`dnf install syslinux-tftpboot`  
as that provides `/tftpboot/pxelinux.0`

Copy `.../rockylinux.org/9.3/BaseOS/x86_64/os/EFI/` into `/tftpboot/EFI/`  
Copy `.../rockylinux.org/9.3/BaseOS/x86_64/os/images/pxeboot/` into `/tftpboot/rocky9/`

The dnsmasq config needs something like:

```auto
dhcp-match=set:bios,option:client-arch,0
dhcp-boot=tag:bios,pxelinux.0
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,EFI/BOOT/grubx64.efi
enable-tftp
tftp-root=/tftpboot

```

For legacy mode boot a menu:

```auto
$ cat /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
ALLOWOPTIONS 0
NOESCAPE 1

timeout 300
ONTIMEOUT local

MENU TITLE BIOS PXE Menu

LABEL local
        MENU LABEL Boot local hard drive
        LOCALBOOT 0

LABEL rocky9
         MENU LABEL Rocky 9 installer
         KERNEL rocky9/vmlinuz
         APPEND initrd=rocky9/initrd.img ip=dhcp inst.ks=http:/10.20.30.40/kickstarts/sandbok-ks.cfg

```

For UEFI mode boot:

```auto
set timeout=60
menuentry 'RHEL 9' {
  linuxefi rocky9/vmlinuz ip=dhcp 
  initrdefi rocky9/initrd.img inst.ks=http:/10.20.30.40/kickstarts/sandbok-ks.cfg
}

```

The location and name of that file … `journalctl` / `/var/log/messages` will show some of the candidates after boot attempt. For example:

```auto
... dnsmasq-tftp[78379]: file /tftpboot/grub.cfg-0A2 not found
... dnsmasq-tftp[78379]: file /tftpboot/grub.cfg-0A not found
... dnsmasq-tftp[78379]: file /tftpboot/grub.cfg-0 not found
... dnsmasq-tftp[78379]: file /tftpboot/grub.cfg not found

```

1. On BIOS/UEFI of the test system there should be the PXE-boot option / way to enable it and then boot with IPv4 NIC (or IPv6 NIC), rather than local HDD, USB, etc.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [June 11, 2024, 12:06pm UTC](https://forums.rockylinux.org/t/getting-started-with-kickstart-and-tftp/13563/3 "2024-06-11T12:06:28Z")

</div>

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