View previous topic :: View next topic |
Author |
Message |
creaker l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 14 Jul 2012 Posts: 651
|
Posted: Sat May 11, 2013 5:23 pm Post subject: [Solved] No networking on fresh install |
|
|
Hi!
I have installed very basic (kernel, grub, mc, syslog) system. On first boot I can not access network.
Code: |
# /etc/init.d/net.eth0 start
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 |
Networking configured properly (static IP 192.168.1.3, netmask 255.255.255.0, gateway 192.168.1.1, nameserver 8.8.8.8 ).
lsmod shows my card module is loaded (r8169), dmesg output contains these strings:
Code: |
[ 6.428388] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 6.428619] r8169 0000:04:00.0: irq 42 for MSI/MSI-X
[ 6.428735] r8169 0000:04:00.0 eth0: RTL8168e/8111e at 0xffffc9000067a000, 1c:6f:65:42:be:2a, XID 0c200000 IRQ 42
[ 6.428737] r8169 0000:04:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 6.432404] systemd-udevd[245]: renamed network interface eth0 to enp4s0 |
What the hell this systemd does here? Are we switched to systemd? What I have to do with this enp4s0?
Last edited by creaker on Sat May 11, 2013 11:01 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jaglover Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/179708169458f2999e44e26.gif)
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Sat May 11, 2013 5:40 pm Post subject: |
|
|
creaker,
Its udev, not systemd. udev has been sucked into the systemd sources but Gentoo is keeping it separate meanwhile.
The udev upstream devs thought it would be a good idea to change the network interface default naming scheme from one that suits about 95% of use cases to another that suits about 95% of use cases and makes a mess for the 95% of users who didn't know or care that eth0 was a part of the default network naming scheme.
Change eth0 everywhere to enp4s0 and everything will work until the good idea fairy visits the udev upstream devs again, or you can read around the net about how to stop udev renaming things like this. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jaglover Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/179708169458f2999e44e26.gif)
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat May 11, 2013 5:50 pm Post subject: |
|
|
Quote: | Change eth0 everywhere to enp4s0 and everything will work until the good idea fairy visits the udev upstream devs again, or you can read around the net about how to stop udev renaming things like this. |
Actually even without fairy your enp4s0 can change unpredictably if it is a removable device. Like an add-on PCI card or USB network device. Just plug it into another PCI slot or USB port and you will get a brand new (un)predictable name. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
creaker l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 14 Jul 2012 Posts: 651
|
Posted: Sat May 11, 2013 6:23 pm Post subject: |
|
|
Thanks guys!
Kernel option "net.ifnames=0" works fine.
Renaming all the "eth0" to "enp4s0" works only till reboot. After reboot I have to start network by hand, even with "rc-update add /etc/init.d/net.enp4s0 default"
I renamed eth0 to enp4s0 in /etc/conf.d/net and did "mv /etc/init.d/net.eth0 /etc/init.d/net.enp4s0"
Did I forgot something else? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Sat May 11, 2013 6:38 pm Post subject: |
|
|
creaker,
The content of /etc/conf.d/net maybe? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
creaker l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 14 Jul 2012 Posts: 651
|
Posted: Sat May 11, 2013 7:05 pm Post subject: |
|
|
NeddySeagoon wrote: | creaker,
The content of /etc/conf.d/net maybe? |
No.
/etc/conf.d/net:
Code: |
dns_domain_lo="homenetwork"
config_enp4s0="192.168.1.3 netmask 255.255.255.0 brd 192.168.1.255"
routes_enp4s0="default via 192.168.1.1" |
Code: | # ln -s /etc/init.d/net.lo /etc/init.d/net.enp4s0
ln: failed to create symbolic link '/etc/init.d/net.enp4s0' : File exists
# rc-update add net.enp4s0 default
* rc-update: net.enp4s0 already installed in runlevel `default`; skipping |
But still I have to start it yb hand after reboot. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
creaker l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 14 Jul 2012 Posts: 651
|
Posted: Sat May 11, 2013 7:15 pm Post subject: |
|
|
It looks like eth0 still presented in system: dmesg still shows that udev renames eth0 to enp4s0:
Code: |
[ 6.186572] systemd-udevd[244]: renamed network interface eth0 to enp4s0 |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23093
|
Posted: Sat May 11, 2013 9:31 pm Post subject: |
|
|
creaker wrote: | It looks like eth0 still presented in system: dmesg still shows that udev renames eth0 to enp4s0:
Code: |
[ 6.186572] systemd-udevd[244]: renamed network interface eth0 to enp4s0 |
| This is normal. The kernel knows the correct name for your device is ethN and names it as such when the system initializes. The message you showed is logged when udev starts and renames it to what the udev maintainers want to call it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
creaker l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 14 Jul 2012 Posts: 651
|
Posted: Sat May 11, 2013 10:57 pm Post subject: |
|
|
Hu wrote: | creaker wrote: | It looks like eth0 still presented in system: dmesg still shows that udev renames eth0 to enp4s0:
Code: |
[ 6.186572] systemd-udevd[244]: renamed network interface eth0 to enp4s0 |
| This is normal. The kernel knows the correct name for your device is ethN and names it as such when the system initializes. The message you showed is logged when udev starts and renames it to what the udev maintainers want to call it. |
Yes, it is. But I can't get networking started on system boot.
I just reinstalled the system, remembering that the new name should be enp4s0 and configured network initially as enp4s0.
Now all works fine. May be previous installation has something related to eth0 and I failed to rid it out.
Thanks guys! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MyKEcz n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 May 2013 Posts: 2 Location: CZ
|
Posted: Sun May 12, 2013 12:55 pm Post subject: |
|
|
Hi guys,
I'm new to gentoo and I have followed gentoo guide and everything works except eth0.
I have compiled build-in-kernel drivers for Intel PRO/1000MT Desktop (82540EM), it's for Virtualbox and still doesn't work.
Here is image: http://sdrv.ms/YOrCL9
Code: |
ERROR: interface eth0 does not exist
Ensure that you have loaded the correct kernel module for your hardware
ERROR: net.eth0 failed to start
ERROR: cannot start netmount as net.eth0 would not start
|
I followed http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=3
So I want to have DHCP enabled, I haven't configured any IP address, only domain name...
I have tried to search this problem and few topics which I found doesn't solved my problem
Thank you for ideas.
EDIT: i tried to run ls /sys/class/net and there are only two items - lo; enp0s3 but no eth0 - maybe this is reason why it doesn't work? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
SamuliSuominen Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
Posted: Sun May 12, 2013 1:43 pm Post subject: |
|
|
MyKEcz wrote: |
EDIT: i tried to run ls /sys/class/net and there are only two items - lo; enp0s3 but no eth0 - maybe this is reason why it doesn't work? |
Your interface is called enp0s3 instead of eth0, so simply use enp0s3 everywhere instead of eth0, like net.enp0s3 symlink in /etc/init.d
More information in the handbook, http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&chap=2#doc_chap4 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MyKEcz n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 May 2013 Posts: 2 Location: CZ
|
Posted: Sun May 12, 2013 2:42 pm Post subject: |
|
|
ssuominen wrote: | MyKEcz wrote: |
EDIT: i tried to run ls /sys/class/net and there are only two items - lo; enp0s3 but no eth0 - maybe this is reason why it doesn't work? |
Your interface is called enp0s3 instead of eth0, so simply use enp0s3 everywhere instead of eth0, like net.enp0s3 symlink in /etc/init.d
More information in the handbook, http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&chap=2#doc_chap4 |
Solved, thank you for help ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23093
|
Posted: Sun May 12, 2013 4:43 pm Post subject: |
|
|
MyKEcz wrote: | EDIT: i tried to run ls /sys/class/net and there are only two items - lo; enp0s3 but no eth0 - maybe this is reason why it doesn't work? | Correct. sys-apps/udev "helpfully" renamed your interface so that the instructions in the handbook did not work. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|