通过 PXE 的 Ubuntu 安装程序看不到网络适配器 => 无法下载 preseed

jkf*_*kff 2 ubuntu virtualbox boot preseed pxe-boot

我正在通过 PXE 从另一个 virtualbox VM(使用 cobbler)启动一个 virtualbox VM。两台机器都有 2 个适配器:1) 外部网络和 2) 仅主机网络。

“客户端”虚拟机通过 PXE(使用仅主机网络适配器)成功引导到安装程序,但随后安装程序甚至不会尝试下载预置文件(根据服务器日志)或获取 IP 地址(再次根据到服务器日志 -之前确实显示了 TFTP 请求)。

我掉进一个壳里,看到:

  • “ip a”仅显示环回适配器
  • 阅读 dmesg 显示显然没有找到适配器
  • lsmod 似乎也没有显示网络适配器模块的迹象
  • lspci确实显示了两个网络控制器。
  • /lib/modules/...../kernel/drivers/net 中基本上没有驱动程序(可能这就是原因?

我如何让安装程序看到我的网络适配器,或者至少我如何找到这个问题的原因?

这是 PXE 菜单项:

default linux
prompt 0
timeout 1
label linux
        kernel /images/ubuntu-10.04-server-x86_64/vmlinuz
        ipappend 2
        append initrd=/images/ubuntu-10.04-server-x86_64/initrd.gz  locale=  interface=auto text root=/dev/sda1 priority=critical  auto url=http://192.168.56.101/cblr/svc/op/ks/system/pierrot hostname=pierrot domain=local.lan suite=lucid
Run Code Online (Sandbox Code Playgroud)

jkf*_*kff 5

好的,我想通了。

事实证明,我使用的 Ubuntu ISO 中有两个 initrd 映像:

[jkff@localhost tmp]$ find /mnt/ubuntu-server/ -name 'initrd.gz'
/mnt/ubuntu-server/install/initrd.gz
/mnt/ubuntu-server/install/netboot/ubuntu-installer/amd64/initrd.gz
Run Code Online (Sandbox Code Playgroud)

其中第一个不包括网络驱动程序。第二个可以。Cobbler 选择了第一个(由于这个原因),所以当然没有网络驱动程序,它无法找到 NIC 并下载 preseed。

现在我必须想办法让 Cobbler 使用正确的 initrd ......