[Solved] install Gentoo in VBox: network interface eth0 does not exist

ERROR:interface eth0 does not exist; ensure that you have loaded the correct kernel moudle for your hardware

error sshd needs service(s) net: http://www.gossamer-threads.com/lists/gentoo/user/264060,为此重新编译了设备驱动的内核模块

Check dependice: /lib/rc/bin/rc-depend -u http://www.linuxsir.org/bbs/thread384672.html
The help: http://forums-web1.gentoo.org/viewtopic-t-856714-postdays-0-postorder-asc-start-0.html?sid=0f344075132f4b3c9a2f180cb5615731

I install gentoo-20121221 in VirtualBox on my host XUbuntu, when the kenel was copiled and after reboot, run
localhost /ect/init.d/ # ./sshd start
localhost /ect/init.d/ # network interface eth0 does not exist
localhost /ect/init.d/ # dmesg | grep -i net
localhost /ect/init.d/ # [    8.415192] systemd-udevd[969]: renamed network interface eth0 to enp0s3 

So, 
localhost /ect/init.d/ # ln -s net.lo net.enp0s3
localhost /ect/init.d/ # rc-update delete net.eth0 default
localhost /ect/init.d/ # rc-update delete net.enp0s3 default
localhost /ect/init.d/ # ./sshd start
localhost /ect/init.d/ # * Starting sshd ...

Before above, I have set port foward for my VBox guest:
Gentoo -> Setting -> Network ->
    Attached to: NAT
   Port Forwarding: 
        Name Protocol    Host IP    Host Port    Guest IP    Guest Port
        Rule1                127.0.0.1 2222           10.0.2.15   22

And then, command in host XUbuntu:
$ ssh -p 2222 root@127.0.0.1

Now it's ok to use SSH.
localhost # startx
localhost # xterm: command not found
localhost # emerge --deep --newuse xinit
localhost # startx
localhost # twm:command not found
localhost # 
localhost # startx
localhost # startx

If you startx successly, but the mouse or keyboard don't work, please install some relative drivers for your input devices, search them as follow:

localhost # emerge -s xf86-input
localhost# emerge foo1 foo2 ...
localhost# pa aux|grep xterm
localhost# kill xterm_pid
localhost# startx

Now it works!

emerge --deep --newuse xinit

 

About net.sit0 and dhcpcd: http://forums.gentoo.org/viewtopic-t-914434-start-0.html
       Your shouldn't foget "emerge dhcp" when you're install Gentoo by Livecd Shell, or there is some problem for you net.sit0, haha.

posted @ 2013-07-28 18:41  micfan  阅读(1529)  评论(0编辑  收藏  举报