配置 DHCP 服务同时支持 legacy 和 UEFI 的 PXE 启动

配置 DHCP 服务同时支持两种启动方式

安装 DHCP 服务

dnf -y install dhcp-server

准备 DHCP 服务配置文件

复制如下内容到 /etc/dhcp/dhcpd.conf。(IP 根据实际情况修改)

具体为什么这么写找机会在总结一下,现在就是照着 RedHat 官方文档抄的。

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

option rfc3442-classless-static-routes code 121 = array of integer 8;
option ms-classless-static-routes code 249 = array of integer 8;
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;

# A slightly different configuration for an internal subnet.
subnet 192.168.255.0 netmask 255.255.255.0 {
  range 192.168.255.100 192.168.255.200;
  option domain-name-servers pxe.example.com;
  option domain-name "example.com";
  option broadcast-address 192.168.255.255;
  default-lease-time 600;
  max-lease-time 7200;

  class "pxeclients" {
     match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
     next-server 192.168.255.254;
     if option architecture-type = 00:07 {
        filename "uefi/BOOTX64.EFI";
        } else {
        filename "legacy/pxelinux.0";
     }
   }

  # UEFI clients
  #if substring(option architecture, 0, 9) = "PXEClient" {
  #filename "uefi/BOOTX64.EFI";
  #}

  # Legacy BIOS clients
  #if substring(option architecture, 0, 6) = "GRUB 2" {
 # filename "legacy/pxelinux.0";
  #}

}
配置 DHCP 服务同时支持 legacy 和 UEFI 的 PXE 启动
https://www.linuxstudynotes.com/2024/07/02/linux/%e9%85%8d%e7%bd%ae-dhcp-%e6%9c%8d%e5%8a%a1%e5%90%8c%e6%97%b6%e6%94%af%e6%8c%81-legacy-%e5%92%8c-uefi-%e7%9a%84-pxe-%e5%90%af%e5%8a%a8/
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇