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 withdnsmasqserver2: target host that boots from the network and installs AlmaLinux automatically
This repo is the source of truth for:
dnsmasqconfiguration- 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/: samplednsmasqconfigboot/grub2/: UEFI GRUB menu exampleboot/pxelinux.cfg/: BIOS PXELINUX menu examplekickstarts/: AlmaLinux Kickstart templatesscripts/: helper scripts for ISO extraction and post-install bootstrapdocs/: replication and operating notes
Current Lab
Current virtual lab values:
server1management NIC: libvirtdefaultNAT networkserver1PXE 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
- Put the AlmaLinux ISO in this repo root or another local path.
- Use
scripts/sync_alma_tree.shto copy the ISO contents into an HTTP-served tree onserver1. - Copy
vmlinuzandinitrd.imgfrom the Alma tree into your TFTP directory. - Install the sample
dnsmasqconfig fromdnsmasq/dnsmasq.conf.exampleand adjust interface/IP/path values. - Use the sample PXE menu files from
boot/grub2/grub.cfgandboot/pxelinux.cfg/default. - Customize
kickstarts/alma10-auto.ks. - Boot
server2from 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:
- a local non-interactive
valherunaccount bootstrap that mirrors your current SSH keys/sudo setup kickstart/bash_profiles.sh --addusertools/bin/install_codex_access.shtools/bin/update_sshd_config.sh
This avoids relying on kickstart.sh --all for unattended installs and avoids the interactive passwd prompt in kickstart/bin/create_valherun.sh.
First Files To Edit
Before using this in production, update:
dnsmasq/dnsmasq.conf.exampleboot/grub2/grub.cfgboot/pxelinux.cfg/defaultkickstarts/alma10-auto.ksscripts/post-install-bootstrap.shif you want different bootstrap behavior
Documentation
- General rebuild guide:
docs/replication.md - Exact VM lab steps used on this host:
docs/virtual-lab.md