CentOS Stream 9
Sponsored Link

PXE Boot : Configure PXE Server2022/07/13

 
Configure PXE (Preboot eXecution Environment) Server. Your computer needs to have a NIC with PXE surpport.
[1] Install and Start TFTP.
[root@dlp ~]#
dnf -y install tftp-server
[root@dlp ~]#
systemctl enable --now tftp.socket

[2] If Firewalld is running, allow TFTP service.
[root@dlp ~]#
firewall-cmd --add-service=tftp

success
[root@dlp ~]#
firewall-cmd --runtime-to-permanent

success
[3] Configure DHCP Server.
First, Configure basic settings for DHCP Server, refer to here. In addition to the basic settings, add follows.
[root@dlp ~]#
vi /etc/dhcp/dhcpd.conf
option domain-name            "srv.world";
option domain-name-servers    dlp.srv.world;
default-lease-time 600;
max-lease-time 7200;
authoritative;
# add follows
option space pxelinux;
option pxelinux.magic code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
option architecture-type code 93 = unsigned integer 16;

subnet 10.0.0.0 netmask 255.255.255.0 {
    range dynamic-bootp 10.0.0.200 10.0.0.254;
    option broadcast-address 10.0.0.255;
    option routers 10.0.0.1;
    
    # add follows
    class "pxeclients" {
        match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
        # PXE servers hostname or IP address
        next-server dlp.srv.world;

        if option architecture-type = 00:07 {
            filename "BOOTX64.EFI";
        }
        else {
            filename "pxelinux.0";
        }
    }
}

[root@dlp ~]#
systemctl restart dhcpd

[4]
That's OK to configure basic PXE settings.

Matched Content