是否可以configurationdhcpd.conf ,使特定的主机组使用传递给内核加载的附加内核启动参数?
谢谢!
谁可以做到这一点,不是DHCP,而是PXE。
一个例子(不一定对你有用) dhcpd.conf文件:
allow booting; allow bootp; authoritative; default-lease-time 600; max-lease-time 7200; option domain-name "domain.com"; ddns-update-style none; log-facility local7; deny unknown-clients; subnet 192.168.124.0 netmask 255.255.255.0 { option routers 192.168.124.1; option subnet-mask 255.255.255.0; option domain-name-servers 199.245.70.156; filename "pxelinux.0"; next-server 192.168.124.81; host foo { hardware ethernet f4:xx:46:xx:xx:67; fixed-address 192.168.124.25; option host-name "foo"; } }
我已经使用规则来匹配特定的MAC地址,根据需要进行修改以匹配组。 next-server和filename参数告诉主机请求一个IP(并且匹配要求)使用pxelinux.0文件启动,可以在192.168.124.81find。
该IP地址的TFTP服务器通常具有下列行中的默认configuration:
default menu.c32 prompt 0 menu title PXE Boot Menu menu include pxelinux.cfg/graphics.conf menu autoboot Starting Local System in # seconds label rhel6 menu label Install - ^RHEL6 64 kernel rhel/6/x86_64/vmlinuz initrd rhel/6/x86_64/initrd.img append ks=http://10.0.0.2/rhel6/ks/rhel6.cfg ksdevice=eth0
您可以在这里使用append参数将任何有效的自定义值添加到内核。