Etape Optionnelle : Configurer un serveur DHCP Windows/Linux pour le boot PXE Medulla (BIOS & UEFI)
Enable
S'applique UEFIà boot: withMedulla Imaging / PXE
Version
:
ToutesEnvironnement : On-Premise
Catégorie : DHCP
DHCP server needs special option to enable/ PXE boot,/ Imaging
Objectif
Cette FAQ explique comment configurer un serveur DHCP afin de permettre le démarrage PXE des machines avec Medulla, en mode BIOS et en mode UEFI x64.
TheLe serveur DHCP optionsdoit areêtre capable d’envoyer le bon fichier de démarrage selon le type de machine qui démarre en PXE.
Principe de fonctionnement
Lorsqu’une machine démarre en PXE, elle contacte le serveur DHCP pour obtenir :
- Une
Optionadresse66IP - L’adresse
serveur PXE MedullaOptiondu67
Windows
Les deux options DHCP serverprincipales configurationsont :
Fichiers de démarrage Medulla
bootloader/undionly.kpxe
UEFI
x64
bootloader-uefi64/ipxe.efi
FirstImportant of:
Le all,fichier thede démarrage n’est pas le même pour les machines BIOS et les machines UEFI. Une mauvaise valeur dans l’option 67 empêche le démarrage PXE.
Configuration d’un serveur DHCP serverWindows
1. toOuvrir findla outconsole whichDHCP
2. Créer les classes Vendor
Les classes Vendor permettent au serveur DHCP de reconnaître si la machine demande un démarrage PXE serveren andBIOS theou righten file to boot.UEFI.
To
Créer sortla computerclasse vendorUEFI x64
Vendor Classes
Vendor Classes as Detection Method is used to determine how devices are requesting a boot image from the DHCP server.
Open the DHCP Console and expand the IPv4 Node
Right-Clicksur on ‘IPv4 Node’ and select ‘Define Vendor Classes’
Clickles ‘Add’
Create
Enter the following information for the respective fields:
DisplayName:
PXEClient (UEFI x64)
Description
PXEClient:Arch:00007
ASCII
PXEClient:Arch:00007
Cliquer sur OK.
Créer la classe BIOS x86/x64
Description:les PXEClient:Arch:00007
ASCII:
Click
Clickd’affichage
DisplayName:
PXEClient (BIOS x86 & x64)
Description
PXEClient:Arch:00000
ASCII
PXEClient:Arch:00000
Cliquer sur OK.
3. Créer la stratégie DHCP pour les machines BIOS
sur Description:Nouvelle stratégie PXEClient:Arch:00000
ASCII:un PXEClient:Arch:00000
Click
Creating
BIOSde 32-Bitla &stratégie
Right-Click ‘Policies’ and click ‘New Policy’
Give the policy a friendly name that coincides with the your vendor class naming scheme:
PolicyName:
PXEClient (BIOS x86 & x64)
Description
Fichier de démarrage PXE pour les machines BIOS
les conditions, cliquer sur DescriptionAjouter: Delivers the correct bootfile for BIOS machines
Clickla ‘Next’
On the ‘Configure Conditions for the policy’ page click ‘add’
Select the ‘Value’ drop-down box and select theVendor PXEClient (BIOS x86 & x64) vendor class that you created in previous steps
EnsureAjouter thatun youcaractère checkgénérique the box ‘Append wildcard((*)’
Selectpuis ‘Add’
IP_DU_SERVEUR_MEDULLA
067
bootloader/undionly.kpxe
SelectTerminer ‘Ok’l’assistant en cliquant sur Suivant, puis Terminer.
4. Créer la stratégie DHCP pour les machines UEFI
Clicksur ‘Next’
Ifun younom wantclair theà policyla tostratégie.
PXEClient ‘next’(UEFI x64)
Description
Fichier de démarrage PXE pour les machines UEFI x64
Onles theconditions, Configurecliquer settingssur for the policy page ensure that ‘DHCP Standard Options’ is selected from the drop down box
IP_DU_SERVEUR_MEDULLA
067
bootloader-uefi64/ipxe.efi
ConfigureTerminer thel’assistant followingen scopecliquant options:sur Suivant, puis Terminer.
5. Supprimer les options PXE globales
Pour éviter les conflits, les options PXE ne doivent pas être définies à la fois au niveau global de l’étendue et dans les stratégies DHCP.
Vérifier que les options suivantes ne sont pas configurées dans les options générales de l’étendue :
066:IP Address of Medulla060066
067: bootloader/undionly.kpxe
Important :
Si
Cickles ‘Next’options 66 et 67 sont définies globalement, elles peuvent entrer en conflit avec les stratégies BIOS/UEFI et empêcher le bon fichier de démarrage d’être envoyé.
Configuration
Ond’un the Summary page click ‘Finish’
UEFIserveur DHCP Policy
Right-ClickSur ‘Policies’un and click ‘New Policy’
Give the policy a friendly name that coincides with the your vendor class naming scheme:
PolicyName: PXEClient (UEFI)
Description: Delivers the correct bootfile for (UEFI)
Click ‘Next’
On the ‘Configure Conditions for the policy’ page click ‘add’
Select the ‘Value’ drop-down box and select the PXEClient (UEFI) vendor class that you created in previous steps
Ensure that you check the box ‘Append wildcard(*)’
Select ‘Add’
Select ‘Ok’
Click ‘Next’
If you want the policy to affect only a specific range within your scope configure it, otherwise select no and click ‘next’
On the Configure settings for the policy page ensure that ‘DHCP Standard Options’ is selected from the drop down box
Configure the following scope options:
066: IP Address of Medulla
067: bootloader-uefi64/ipxe.efi
Cick ‘Next’
On the Summary page click ‘Finish’
Remove Default PXE Options
Ensure that you have removed the 067, 066, 060 options from the default scope options to ensure that the Policies take precedence otherwise you will end up with conflict. As long as you have configured everything correctly you should now have the ability to boot machines from BIOS or UEFI.
Linuxserveur DHCP Server
Linux, le principe est de détecter l’architecture de la machine grâce à l’option DHCP 93.
0000
BIOS
bootloader/undionly.kpxe
0007
UEFI x64
bootloader-uefi64/ipxe.efi
Exemple de configuration ISC DHCP
Adapter les valeurs entre ##...## à votre environnement.
# PXE definitions
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
# Architecture PXE
option arch code 93 = unsigned integer 16;
# In initial DHCP DISCOVER packet, PXE client sets option 93 to its arch.
# 0000 == IA x86 PC (BIOS boot)
# 0006 == x86 EFI boot
# 0007 == UEFI x64 EFI boot
# PXE boot following the PXE specs
class "PXE" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
if option arch = 00:07 {
filename "bootloader-uefi64/ipxe.efi";
} else {
filename "/bootloader/undionly.kpxe";
}
}
# Etherboot boot
class "Etherboot" {
match if substring (substring(option vendor-class-identifier, 0, 11) = "Etherboot-5";
option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
option vendor-class-identifier "Etherboot-5.0";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
}
subnet ##MEDULLA_NETWORK## netmask ##MEDULLA_NETMASK## {
option broadcast-address ##MEDULLA_BCAST##;
# broadcast address
option domain-name ##MEDULLA_DOMAIN##; # domain name
option domain-name-servers ##MEDULLA_DNS##;
# dns servers
option routers ##MEDULLA_GW##;
# default gateway
pool { # Only defined pool
# uncomment the two following lines for PXE-only boot
#allow members of "PXE"; # PXE-only
#allow members of "Etherboot"; # PXE-only
range ##MEDULLA_START## ##MEDULLA_END##;
next-server ##MEDULLA_IP##;
}
}
Exemple de valeurs à remplacer
##MEDULLA_NETWORK##
Réseau DHCP
192.168.1.0
##MEDULLA_NETMASK##
Masque réseau
255.255.255.0
##MEDULLA_BCAST##
Adresse broadcast
192.168.1.255
##MEDULLA_DOMAIN##
Nom de domaine
domaine.lan
##MEDULLA_DNS##
Serveur DNS
192.168.1.1
##MEDULLA_GW##
Passerelle
192.168.1.254
##MEDULLA_START##
Début de plage DHCP
192.168.1.100
##MEDULLA_END##
Fin de plage DHCP
192.168.1.200
##MEDULLA_IP##
Adresse IP du serveur Medulla PXE
192.168.1.10
Vérifications après configuration
Redémarrage du service DHCP Linux
systemctl restart isc-dhcp-server
Vérification du statut
systemctl status isc-dhcp-server
Erreurs fréquentes
La machine BIOS ne démarre pas en PXE
bootloader/undionly.kpxe.
Vérifier que la machine démarre bien en mode Legacy/BIOS.
Vérifier que le serveur Medulla est joignable depuis le réseau client.
La machine UEFI ne démarre pas en PXE
bootloader-uefi64/ipxe.efi.
Vérifier que la machine démarre bien en mode UEFI.
Vérifier que Secure Boot est désactivé si nécessaire.
Le mauvais fichier de boot est envoyé
Le client PXE obtient une IP mais ne télécharge pas le bootloader
next-server.
Vérifier la connectivité entre le poste client et le serveur Medulla.
Vérifier les flux réseau nécessaires au PXE.
Valeurs de référence
PXEClient:Arch:00000
PXEClient:Arch:00007
Option 66
IP_DU_SERVEUR_MEDULLA
IP_DU_SERVEUR_MEDULLA
Option 67
bootloader/undionly.kpxe
bootloader-uefi64/ipxe.efi