Serveur PXE via conteneurisation Docker (netboot.xyz)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Eliott Ude 3ca35fe111 Mise à jour de 'README.md' 5 months ago
README.md Mise à jour de 'README.md' 5 months ago
dhcpd.conf Mise à jour de 'dhcpd.conf' 7 months ago
docker-cli Ajouter 'docker-cli' 7 months ago
docker-compose.yml Ajout du docker-compose 7 months ago

README.md

PXE via Netboot avec un Raspberry PI 4 🏆

  • netboot.xyz permet le démarrage en réseau de différents systèmes d'exploitation via le même appareil. Le menu est déjà préconfiguré avec les systèmes les plus utilisées et plus… La version conteneurisée dispose d'une interface WEB afin d'ajouter des miroirs ou modifier le menu.

Composantes :

  • Nginx, TFTP-HPA, Syslog, Web Interface (netboot.xyz)

Installation Docker (Debian 12 Bookworm):
sudo apt update && apt upgrade -y
sudo apt install docker.io
Récupération de l'image:
docker pull ghcr.io/netbootxyz/netbootxyz
docker-cli (à modifier selon votre configuration):
  1. Cette commande permet de crée un conteneur Docker nommé "netbootxyz" en utilisant l'image Docker netbootxyz disponible sur ghcr.io
  2. Le conteneur sera automatiquement redémarré sauf arrêt manuel.
docker run -d \
  --name=netbootxyz \
  -e MENU_VERSION=2.0.76             `# optional` \
  -e NGINX_PORT=80                   `# optional` \
  -e WEB_APP_PORT=3000               `# optional` \
  -p 3000:3000                       `# sets web configuration interface port, destination should match ${WEB_APP_PORT} variable above.` \
  -p 69:69/udp                       `# sets tftp port` \
  -p 8080:80                         `# optional, destination should match ${NGINX_PORT} variable above.` \
  -v /local/path/to/config:/config   `# optional` \
  -v /local/path/to/assets:/assets   `# optional` \
  --restart unless-stopped \
  ghcr.io/netbootxyz/netbootxyz

Mise à jour netbootxyz :

  1. Afin d'installer la dernière version en date de netboot.xyz :

    docker-compose pull netbootxyz
    

Configuration DHCP :

Installation d'un serveur DHCP de votre choix, ici isc-dhcp-server :

sudo apt install isc-dhcp-server

Pensez à modifier votre interface si nécessaire dans : /etc/default/isc-dhcp-server

INTERFACESv4="eth0"

Toute la configuration du DHCP se passe dans /etc/dhcp/dhcpd.conf

option arch code 93 = unsigned integer 16;

subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.34 192.168.0.254;       # Change this range as appropriate for your network
  next-server 192.168.0.33;               # Change this to the address of your DHCP server
  option subnet-mask 255.255.255.0;
  option routers 192.168.0.1;             # Change this to the address of your router
  option broadcast-address 192.168.0.255;
  option domain-name "mynetwork.lan";     # This is optional
  option domain-name-servers 1.1.1.1;
  if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.netboot.xyz/menu.ipxe";
  } elsif option arch = encode-int ( 16, 16 ) {
    filename "http://boot.netboot.xyz/ipxe/netboot.xyz.efi";
    option vendor-class-identifier "HTTPClient";
  } elsif option arch = 00:07 {
    filename "netboot.xyz.efi";
  } else {
    filename "netboot.xyz.kpxe";
  }
}

N'oubliez pas d'adapter les adresses IP, plages d'adresses et les path selon vos configurations.
PS : Il faut spécifier un DNS publique comme (1.1.1.1/8.8.8.8) et non local comme (192.168.0.100).