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- host access to
pxe-lab:virbr1on192.168.50.254/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
server2with disk first and PXE second.
The sample Kickstart stores only a salted password hash for root, not a plaintext password.
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 now prefers calling kickstart.sh --nounraid --all after cloning the repos, while exporting the committed password hashes and preferred CODEX_PUBKEY, so the installed Alma host inherits the same reusable bootstrap flow as your normal host setup:
- committed SHA-512 password hashes for both
rootandvalherun - Docker Engine installation from Docker's official repository
valherunandcodexmembership in thedockergroupkickstart/bash_profiles.shdeployment forrootandvalherunwhen presenttools/bin/install_codex_access.shwith the preferredcodexpublic keytools/bin/update_sshd_config.sh- optional
tools/bin/configure_package_caches.shviakickstart.sh --package-cache-url
The Kickstart %packages list and %post bootstrap now also seed the same
practical host baseline used by the main kickstart repo:
- admin shell tools like
git,curl,wget,sudo,bash-completion,tmux - archive and file helpers like
rsync,tree,zip,unzip - search and editing tools like
vim,jq,ripgrep - network and storage helpers like DNS tools,
net-tools,parted, growpart/LVM utilities, andacl - light build/runtime tools like
gcc,make, andpython3-pip
The bootstrap script pulls kickstart and tools directly from Gitea over HTTPS, using the proxy on server1 for the isolated PXE subnet.
To enroll the installed host into apt-cacher-ng during %post, export:
PACKAGE_CACHE_URL=http://your-cache-host:3142
PACKAGE_CACHE_INSTALL_CRON=false
This now relies on the updated non-interactive kickstart.sh --nounraid --all path instead of duplicating the older interactive passwd behavior.
Current Validation Status
The current virtual lab has completed a full unattended install and reboot for server2.
Verified working:
- UEFI PXE with Secure Boot enabled
server2boot order set tohdfirst,networksecond- post-install clone/bootstrap of:
/usr/local/valherun/kickstart/usr/local/valherun/tools
- direct host access to
server2overpxe-lab - direct SSH as
codexwith passwordlesssudo - direct SSH as
valherun
Current caveats:
valherunsudo still prompts for a password- the installed hostname is still the generic
alma10-auto
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