将以上内容保存为任意文件名(如:dhcp), 并执行chmod 755 dhcp加上执行属性, 再执行 ./dhcp
将停止dhcpd服务,将配置文件自动生成到合适的位置后再启动dhcpd服务.
TFTP服务的配置:
TFTP软件包安装后会在/etc/xinetd.d目录下生成tftp这个文件,vi tftp编辑这个文件:
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
把 server_args中的/tftpboot替换成自己的目录或使用默认目录.
将grldr和menu.lst放入tftp目录中.
由于tftp服务是xinetd类型的服务,用chkconfig xinetd --level 3 on启用xinetd服务.
重新开始xinetd服务:service xinetd restart
这样PXE客机就可以出现GRUB4DOS的启动菜单了