我必须使用Ubuntu12.04完成一个完全无人值守的节点安装。我在预置文件中给出了以下选项
d-i netcfg/choose_interface select eth0
d-i netcfg/disable_dhcp boolean true
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Configure network manually
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/use_autoconfig boolean false
d-i netcfg/network-manager boolean false
d-i netcfg/no_default_route boolean true
d-i netcfg/enable boolean true
d-i netcfg/get_ipaddress string 192.168.1.103
d-i netcfg/get_netmask string 255.255.0.0
d-i netcfg/Confirm_static boolean true不过,我还是在问“继续,没有默认的路线?",我不得不说是的。在配置网络时,我如何预置这个?
即使在设置默认网关和名称服务器之后,服务器仍然是相同的。
发布于 2012-10-16 14:59:38
看起来您没有定义默认网关,您需要使用:
d-i netcfg/get_gateway string 192.168.1.1当然,上面命令中的ip地址只是一个客人,您应该将它调整到正确的网络网关。
我不能测试它,但是很可能你也需要这个:
d-i netcfg/get_nameservers string 192.168.1.1
d-i netcfg/confirm_static boolean true第一个将设置dns,我不知道为什么或是否需要第二个dns,但它出现在文档中,所以.
发布于 2019-12-29 21:05:49
遗憾的是,d-i netcfg/no_default_route boolean true不能工作,而且被忽略了。我找到的唯一解决方案是切换到不同的tty,然后运行以下命令
ip route add 172.31.1.1 dev ens3
ip route add default via 172.31.1.1发布于 2020-08-28 19:06:45
我也遇到了这个问题,但是我把这个设置添加到'pxelinux.cfg/default‘菜单中,并解决了这个问题。
menu label ^Ubuntu 16.04 (Automatic)
kernel Ubuntu16/linux
append auto=true priority=critical vga=788 initrd=Ubuntu16/initrd.gz netcfg/no_default_route=true preseed/url=http://192.168.1.10/preseed.seedhttps://askubuntu.com/questions/201748
复制相似问题