我在 Virtualbox 中安装了 Gentoo,几周前它运行正常。然后突然开始抱怨。
* Bringing up interface eth0
* ERROR: interface eth0 does not exist
* Ensure that you have loaded the correct kernel module for your hardware
* ERROR: net.eth0 failed to start
我以为是 MAC 地址冲突,所以我在 Virtual Box 中更改了 MAC。但现在看起来无关紧要。我已从intel PRO/1000 MT Desktop (NAT)
VBox 中选择。然后我通过删除来修复它/etc/udev/rules.d/70-persistent-net.rules
我现在看到的是eth0
界面存在。但没有互联网。我无法通过 ssh 连接到 gentoo box。
$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:78:72:c8
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe78:72c8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:846 (846.0 B)
$ sudo rc-update -v show | grep net
net.eth0 | default
net.lo | boot
netmount | default
network |
$ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0="192.168.0.10 netmask 255.255.255.0 brd 192.168.0.255"
routes_eth0="default via 192.168.0.1"
我甚至无法 ping 位于192.168.0.1
答案1
检查您是否正在使用 Vbox Bridged Adapter。