PXE Boot – Linux服务器和OpenBSD客户端

前端之家收集整理的这篇文章主要介绍了PXE Boot – Linux服务器和OpenBSD客户端前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在这里有一台旧机器我正在尝试设置为运行OpenBSD的无盘客户机,从我的fedora 10机器启动.

我已经设置了tftp和dhcp,两者看起来都是正确的,但客户端只是试图加载pxeboot.

# /etc/xinetd.d/tftp 
service tftp
{
    disable = no
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot -vv
    per_source      = 11
    cps         = 100 2
    flags           = IPv4
}

[root@blueblock ~]# ls -la /tftpboot/
total 12100
drwxrwxrwx  2 root root    4096 2009-07-25 03:12 .
drwxr-xr-x 26 root root    4096 2009-07-25 02:41 ..
-rwxrwxrwx  1 root root 6696212 2009-02-28 22:41 bsd
-rw-r--r--  1 root root 5592688 2009-02-28 22:41 bsd.rd
-rwxrwxrwx  1 root root   53276 2009-02-28 22:41 pxeboot

# /etc/dhcpd.conf
host longshot {
  hardware ethernet 00:0b:db:07:83:35;
  fixed-address 10.0.2.21;
  next-server 10.0.2.5;
  option root-path "/tftpboot/";
  filename "pxeboot";
}

我可以从网络上的其他机器连接到tftp服务器,并成功获取pxeboot文件.

客户端正在获取正确的IP地址设置,我可以看到它连接到tftp服务器.

Jul 25 04:11:51 localhost dhcpd: DHCPDISCOVER from 00:0b:db:07:83:35 via eth0
Jul 25 04:11:51 localhost dhcpd: DHCPOFFER on 10.0.2.21 to 00:0b:db:07:83:35 via eth0
Jul 25 04:11:53 localhost dhcpd: DHCPREQUEST for 10.0.2.21 (10.0.2.5) from 00:0b:db:07:83:35 via eth0
Jul 25 04:11:53 localhost dhcpd: DHCPACK on 10.0.2.21 to 00:0b:db:07:83:35 via eth0
Jul 25 04:11:53 localhost in.tftpd[1457]: RRQ from 10.0.2.21 filename pxeboot
Jul 25 04:11:53 localhost in.tftpd[1457]: tftp: client does not accept options
Jul 25 04:11:53 localhost in.tftpd[1458]: RRQ from 10.0.2.21 filename pxeboot

我错过了一些简单的东西吗?或者我还能做些什么来尝试诊断问题.

编辑:我将pxeboot和bsd文件放在我的openbsd机器上,并将下一个服务器更改为此机器的ipaddress,启用它的tftp服务器,并且客户端第一次启动.

解决方法

我发现的第一件事是你在xinetd.conf中使用“-s / tftpboot”并添加了dhcpd.conf“root-path”选项.
为tftpd设置“-s”选项意味着它是tftp客户端所见的“/”目录.
所以你的dhcpd.conf应该只有“filname / pxeboot”,没有root-path选项.

来自“man tftpd”:

-s

Change root directory on startup. This means the remote host does not need 
to pass along the directory as part of the transfer,and may add security.
When -s is specified,exactly one directory should be specified on the command
line. The use of this option is recommended for security as well as compatibility
with some boot ROMs which cannot be easily made to include a directory name 
in its request.
原文链接:https://www.f2er.com/linux/397999.html

猜你在找的Linux相关文章