Cobbler/TFTP:没有指定文件名或根路径,但是为什么呢?

Cobbler/TFTP:没有指定文件名或根路径,但是为什么呢?

我安装了新的 Cobbler 服务器并将其配置为 DHCP /TFTP 服务器。我已将 /etc/dhcp/dhcpd.conf 配置如下:

[root@centolel ~]# cat /etc/dhcp/dhcpd.conf 
ddns-update-style interim;
allow booting;
allow bootp;

ignore client-updates;
set vendorclass = option vendor-class-identifier;
option boot-server code 66 = string;
option option-66 code 66 = text;
option pxe-system-type code 93 = unsigned integer 16;
authorative;
subnet 10.13.0.0 netmask 255.255.255.0 {
     option routers             10.13.0.138;
     option domain-name-servers 10.13.0.1;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        10.13.0.20 10.13.0.150;
     default-lease-time         3600;
     max-lease-time             3600;
     next-server                10.13.0.1;
     class "pxeclients" {
          match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
          if option pxe-system-type = 00:02 {
                  filename "ia64/elilo.efi";
          } else if option pxe-system-type = 00:06 {
                  filename "grub/grub-x86.efi";
          } else if option pxe-system-type = 00:07 {
                  filename "grub/grub-x86_64.efi";
          } else {
                  filename "pxelinux.0";
          }
     }

}

我创建了一个新的虚拟机并将其配置为从网络启动。

其理念是,cobbler(dhcp)将为新创建的虚拟机提供一个 IP 地址,并发布 CentOS 6 的安装。

当我重新启动新创建的虚拟机时,我看到以下几行:

gPXE 0.9.7 -- Open Source Boot Firmware....
net0: 52:54:00:41:a7:91 on PCI00:03.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]
Waiting for link-up on net0... ok
DHCP (net0 52:54:00:41:a7:91)... ok
net0: 10.13.0.19/255.255.255.0 gw 10.13.0.138
No filename or root path specified
No more network devices

Booting from Hard Disk...
Boot failed: not a bootable disk
.
.
.

正如您所看到的,它接收一个不包含在“动态 bootp”范围内的 IP... 10.13.0.19,而范围开始于 10.13.0.20。

/var/log/messages在重新启动虚拟机后立即查看 Cobbler 服务器时,我看到了以下内容:

Jun 29 18:52:07 localhost dhcpd: DHCPDISCOVER from 52:54:00:41:a7:91 via br0
Jun 29 18:52:08 localhost dhcpd: DHCPOFFER on 10.13.0.101 to 52:54:00:41:a7:91 via br0
Jun 29 18:52:08 localhost dhcpd: DHCPDISCOVER from 52:54:00:41:a7:91 via br0
Jun 29 18:52:08 localhost dhcpd: DHCPOFFER on 10.13.0.101 to 52:54:00:41:a7:91 via br0
Jun 29 18:52:10 localhost dhcpd: DHCPREQUEST for 10.13.0.19 (10.13.0.138) from 52:54:00:41:a7:91 via br0: unknown lease 10.13.0.19.
Jun 29 18:52:13 localhost kernel: br0: port 2(vnet0) entering forwarding state

内容/var/lib/tftpboot

[root@centolel ~]# ll /var/lib/tftpboot/
total 332
drwxr-xr-x  3 root root   4096 2015-06-29 18:38 boot
drwxr-xr-x  2 root root   4096 2015-06-22 21:08 etc
drwxr-xr-x  2 root root   4096 2015-06-29 18:38 grub
drwxr-xr-x  4 root root   4096 2015-06-29 18:38 images
drwxr-xr-x  2 root root   4096 2015-06-22 21:08 images2
-rw-r--r--. 2 root root  24988 2014-04-15 17:36 memdisk
-rw-r--r--  2 root root  54964 2015-06-14 14:25 menu.c32
drwxr-xr-x  2 root root   4096 2015-06-22 21:08 ppc
-rw-r--r--  2 root root  16794 2015-06-14 14:25 pxelinux.0
drwxr-xr-x  2 root root   4096 2015-06-29 18:43 pxelinux.cfg
drwxr-xr-x  2 root root   4096 2015-06-29 18:38 s390x
-rw-r--r--  2 root root 198236 2015-06-14 14:25 yaboot

运行命令cobbler sync完成后会提示“任务完成!!”。

所以我想知道为什么服务器专门请求这个不属于范围的地址,我也想知道为什么它找不到图像...有什么想法吗?

答案1

您的网络中可能存在其他竞争的 DHCP 服务器。使用 Wireshark 运行流量捕获可以帮助您查明此问题。

顺便提一句

range dynamic-bootp        10.13.0.20 10.13.0.150;
option routers             10.13.0.138;

路由器的IP在分配范围内;不好。

相关内容