Déployer des images en bootant avec PXE
Dans ce précédent article, j’expliquais comment déployer des images. La solution utilisée était de booter sur le live CD System Rescue CD. Le gros inconvénient de celle-ci était d’avoir un LiveCD ou une clé usb sur chaque poste pour démarrer dessus.
C’était sans compter sur la simplicité des outils proposés par System Rescue CD. Au lieu d’installer un serveur PXE complet (dhcp, nfs, tftp, …), un service similaire est disponible sur le LiveCD.
La procédure (une fois que le LiveCd est lancé) :
¤ Paramétrez votre carte réseau à l’aide de la commande :
net-setup ethx(où x correspond à l’adresse de votre carte réseau)
¤ Editez le fichier de configuration en fonction de l’adresse que vous avez donné à votre carte :
vim /etc/conf.d/pxebootsrv
¤ Il faut généralement éditer la partie qui concerne l’adresse de votre réseau :
# ------------------------ CONFIGURATION ------------------------------- # By default the current systems acts as DHCP and TFTP and HTTP server # If you want another machine of you network to act as one of those # you will have to turn the appropriate option yo "no" # Set to "yes" if you want this machine to act as a DHCP server PXEBOOTSRV_DODHCPD="yes" # Set to "yes" if you want this machine to act as a TFTP server PXEBOOTSRV_DOTFTPD="yes" # Set to "yes" if you want this machine to act as an HTTP server PXEBOOTSRV_DOHTTPD="yes" # Here is a typical PXE-Boot configuration --> update with your settings PXEBOOTSRV_SUBNET="192.168.1.0" PXEBOOTSRV_NETMASK="255.255.255.0" PXEBOOTSRV_DEFROUTE="192.168.1.254" PXEBOOTSRV_DNS="192.168.1.254" PXEBOOTSRV_DHCPRANGE="192.168.1.100 192.168.1.150" PXEBOOTSRV_LOCALIP="192.168.1.5" # Keep these values to $PXEBOOTSRV_LOCALIP if the current computer # acts as TFTP server and HTTP server as well as DHCP server PXEBOOTSRV_TFTPSERVER="$PXEBOOTSRV_LOCALIP" # IP address of the TFTP server PXEBOOTSRV_HTTPSERVER="http://$PXEBOOTSRV_LOCALIP/sysrcd.dat" # download URL
¤ Démarrez ensuite le service à l’aide de la commande suivante :
/etc/init.d/pxebootsrv start
Vous n’avez plus qu’à allumer un poste client en bootant par le réseau. Comme par magie, vous avez un System Rescue CD qui se lance par le réseau.
Pour la suite, je vous laisse suivre mon précédent article. Bon courage



