Files
pxe_boot_alma/README.md
T

3.5 KiB

pxe_boot_alma

AlmaLinux 10 PXE boot and unattended Kickstart deployment for a two-server setup:

  • server1: PXE host that provides DHCP/TFTP/HTTP boot assets with dnsmasq
  • server2: target host that boots from the network and installs AlmaLinux automatically

This repo is the source of truth for:

  • dnsmasq configuration
  • PXE boot menus
  • AlmaLinux Kickstart files
  • helper scripts to build and sync boot assets
  • replication documentation

Goal

Boot server2 from the network, point it at an AlmaLinux 10 install tree hosted by server1, and complete installation with a Kickstart file that can also bootstrap your existing kickstart and tools repos in %post.

Repo Layout

  • dnsmasq/: sample dnsmasq config
  • boot/grub2/: UEFI GRUB menu example
  • boot/pxelinux.cfg/: BIOS PXELINUX menu example
  • kickstarts/: AlmaLinux Kickstart templates
  • scripts/: helper scripts for ISO extraction and post-install bootstrap
  • docs/: replication and operating notes

Current Lab

Current virtual lab values:

  • server1 management NIC: libvirt default NAT network
  • server1 PXE NIC: 192.168.50.1/24
  • PXE DHCP range: 192.168.50.100-192.168.50.150
  • TFTP root: /var/lib/tftpboot
  • HTTP root: /var/www/html

High-Level Flow

  1. Put the AlmaLinux ISO in this repo root or another local path.
  2. Use scripts/sync_alma_tree.sh to copy the ISO contents into an HTTP-served tree on server1.
  3. Copy vmlinuz and initrd.img from the Alma tree into your TFTP directory.
  4. Install the sample dnsmasq config from dnsmasq/dnsmasq.conf.example and adjust interface/IP/path values.
  5. Use the sample PXE menu files from boot/grub2/grub.cfg and boot/pxelinux.cfg/default.
  6. Customize kickstarts/alma10-auto.ks.
  7. Boot server2 from PXE.

Existing Repo Integration

The starter Kickstart includes a %post phase that can call your current repos:

  • /usr/local/valherun/kickstart
  • /usr/local/valherun/tools

The wrapper script is scripts/post-install-bootstrap.sh. It clones those repos onto the installed Alma host and then runs the reusable pieces directly:

  • kickstart/bin/create_valherun.sh
  • kickstart/bash_profiles.sh --adduser
  • tools/bin/install_codex_access.sh
  • tools/bin/update_sshd_config.sh

This avoids relying on kickstart.sh --all for unattended installs.

First Files To Edit

Before using this in production, update:

Documentation