Installation d'un serveur PXE nomade

Bonjour,

Ce n’est pas à proprement parler « nomade » car il faut modifier les adresses IP dans le fichier de configuration de dnsmasq lors d’un déplacement, mais j’utilise ceci pour démarrer une installation en réseau. Depuis un serveur DHCP qui prend son adresse IP auprès d’un autre serveur DHCP et sans serveur TFTP :

dnsmasq.conf

# Disable DNS Server
port=0

# Respond to PXE requests for the specified network;
# run as DHCP proxy
dhcp-range=192.168.1.75,proxy

# Enable DHCP logging
#log-dhcp

# PXEClient must be here or 2nd stage won't work - we may reconfigure iPXE to change that
dhcp-pxe-vendor=PXEClient,HTTPClient
# for a strange reason, without the line below even the non-HTTP boot attempt will not be answered
# first argument must be a numeric value and comma is required
pxe-service=0,

# boot 1st stage
dhcp-vendorclass=set:x86-64_EFI-http,HTTPClient:Arch:00016
dhcp-boot=tag:x86-64_EFI-http,"http://192.168.1.75/iPXE/ipxe.efi"

# boot 2nd stage
dhcp-match=set:ipxe,175
dhcp-boot=tag:ipxe,"http://192.168.1.75/install.ipxe"

install.ipxe pour Bookworm

#!ipxe

echo
set mirror http://ftp.fr.debian.org
set base_path ${mirror}/debian/dists/bookworm/main/installer-amd64/current/images/netboot/debian-installer/amd64
kernel ${base_path}/linux
initrd ${base_path}/initrd.gz
initrd http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/bookworm/current/firmware.cpio.gz
sleep 2
imgargs linux initrd=initrd.magic
boot

Le fichier ipxe.efi provient du paquet ipxe ou d’une compilation depuis les sources d’iPXE.

C’est un exemple d’utilisation du mode appelé « DHCP proxy », qui permet un 2nd serveur DHCP sur le réseau ne s’occupant que de la partie boot.
L’ancien serveur DHCP de l’ISC ne permet pas ce mode de fonctionnement. Je n’ai pas essayé avec le nouveau, Kea.

–
AnonymousCoward