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
  • host access to pxe-lab: virbr1 on 192.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

  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 with 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 clones those repos onto the installed Alma host and then runs the reusable pieces directly:

  • a local non-interactive valherun account bootstrap that mirrors your current SSH keys/sudo setup and sets a committed salted password hash
  • kickstart/bash_profiles.sh --adduser
  • tools/bin/install_codex_access.sh with the preferred codex public key explicitly passed in
  • tools/bin/update_sshd_config.sh

The bootstrap script pulls kickstart and tools directly from Gitea over HTTPS, using the proxy on server1 for the isolated PXE subnet.

This avoids relying on kickstart.sh --all for unattended installs and avoids the interactive passwd prompt in kickstart/bin/create_valherun.sh.

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
  • server2 boot order set to hd first, network second
  • post-install clone/bootstrap of:
    • /usr/local/valherun/kickstart
    • /usr/local/valherun/tools
  • direct host access to server2 over pxe-lab
  • direct SSH as codex with passwordless sudo
  • direct SSH as valherun

Current caveats:

  • valherun sudo still prompts for a password
  • the installed hostname is still the generic alma10-auto

First Files To Edit

Before using this in production, update:

Documentation

S
Description
No description provided
Readme
550 MiB
0 Stars 1 Watchers 0 Forks
Languages
Shell 85.1%
Perl 13.7%
Python 0.5%
PLpgSQL 0.4%
HTML 0.2%