Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Realtek PCIe GBE, can't start net.eth0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 9:20 pm    Post subject: [SOLVED] Realtek PCIe GBE, can't start net.eth0 Reply with quote

From few days i'm trying to start internet on new instalation of Gentoo.
I used Knoppix LiveDVD 7.2 and there was no bigger problems durring instalation
Code:
# lspci | grep Ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

Knoppix using r8169, so i found it and compile as module, by the way i compile two more modules from Realek 8139too and 8139cp
Code:
#ln -s net.lo net.eth0
#net.eth0 start
 *   ERROR: interface eth0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 *   ERROR: net.eth0 failed to start

I went over forum and couldn't find any working soultion, any ideas ?


Last edited by Miszczu on Wed Dec 25, 2013 10:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1362
Location: Montréal

PostPosted: Mon Dec 23, 2013 9:34 pm    Post subject: Reply with quote

When you execute the commands
Code:
ifconfig -a
ip link show

Do you see an interface named eth0? If not, your Realtek Ethernet device could have been named otherwise and have to use that name instead of eth0.
_________________
Paul
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 515
Location: The Maldives

PostPosted: Mon Dec 23, 2013 9:37 pm    Post subject: Re: Realtek PCIe GBE, can't start net.eth0 Reply with quote

Miszczu wrote:
From few days i'm trying to start internet on new instalation of Gentoo.
I used Knoppix LiveDVD 7.2 and there was no bigger problems durring instalation
Code:
# lspci | grep Ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

Knoppix using r8169, so i found it and compile as module, by the way i compile two more modules from Realek 8139too and 8139cp
Code:
#ln -s net.lo net.eth0
#net.eth0 start
 *   ERROR: interface eth0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 *   ERROR: net.eth0 failed to start

I went over forum and couldn't find any working soultion, any ideas ?


Can you use eth0 as a prefix now? I have enp2s0.
I would look how my networks alias would look like. (udev issue). I have no good solution to how to get to the right alias right now though.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Mon Dec 23, 2013 9:42 pm    Post subject: Reply with quote

I just installed a new system in the past few days, and find that my network card modules don't auto-load on this one. I can get them to show up with a modprobe command, at which point the ethernet devices will start. I've since added them to /etc/conf.d/modules, and they get autoloaded at boot time.

None of my other systems need this, they're all modular network drivers, and I'm not sure what's up. But at least I'm booting cleanly with a network.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 9:43 pm    Post subject: Reply with quote

Code:
#ifconfig -a
enp3s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether d4:3d:7e:38:30:97  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 52  bytes 3432 (3.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 52  bytes 3432 (3.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Then ofc i'm making symbolic link from net.lo to net.etho0
Code:
#ln -s net.lo net.eth0
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 9:45 pm    Post subject: Reply with quote

depontius
I checked lsmod, it's loading it automaticly
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 515
Location: The Maldives

PostPosted: Mon Dec 23, 2013 9:47 pm    Post subject: Reply with quote

Miszczu wrote:

Then ofc i'm making symbolic link from net.lo to net.etho0
Code:
#ln -s net.lo net.eth0


Why not net.enp3s0?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Mon Dec 23, 2013 10:08 pm    Post subject: Reply with quote

You either need to link to net.enp3s0 as patrix_neo suggests, or "touch /etc/udev/rules.d/80-net-name-slot.rules" to create a blank file there. If there's a blank file there will be no interface renaming from eth0 to enp3s0, and net.eth0 will work.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 10:27 pm    Post subject: Reply with quote

Code:
#dhcpcd enp3s0

Solved problem, but I couldn't find it and link to net.eth0,
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 515
Location: The Maldives

PostPosted: Mon Dec 23, 2013 10:33 pm    Post subject: Reply with quote

Miszczu wrote:
Code:
#dhcpcd enp3s0

Solved problem, but I couldn't find it and link to net.eth0,


Check the documentation. There is a way to get enpXsN to be assigned to eth0
[edit] depontius is on to something...


Last edited by patrix_neo on Mon Dec 23, 2013 10:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Mon Dec 23, 2013 10:33 pm    Post subject: Reply with quote

Code:
cd /etc/init.d
ln -s net.lo net.enp3s0

By the way, all of your eth0 occurrances have to be changed to nep3s0 in "/etc/conf.d/net", also.

Or just touch the udev file as previously suggested, and eth0 will work properly.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 10:38 pm    Post subject: Reply with quote

Code:
#dhcpcd enp3s0

Solved problem, but I couldn't find it and link to net.eth0,
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 10:40 pm    Post subject: Reply with quote

Code:
#dhcpcd enp3s0

Solved problem, but I couldn't find it and link to net.eth0,
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Mon Dec 23, 2013 10:46 pm    Post subject: Reply with quote

Code:
#dhcpcd enp3s0

Solved problem, but I couldn't find it and link to net.eth0,
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Mon Dec 23, 2013 10:57 pm    Post subject: Reply with quote

It might be called "loopback" instead of "net.lo" - it took me a bit to realize what you couldn't find. This change from net.lo to loopback is something new, and hasn't really been incorporated into any of my systems yet. It also depends on the USE flags when you emerge OpenRC.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1362
Location: Montréal

PostPosted: Tue Dec 24, 2013 12:01 am    Post subject: Reply with quote

Miszczu, the name only really matter for you. Both names will work as well.

If your really want ot rename enp3s0 to eth0 prefer the use the /etc/udev/rules.d/ directory. It's there for administration purposes. Create or edit the file /etc/udev/rules.d/70-persistent-net.rules and change or add the line with the MAC address of your card D4:3D:7E:38:30:97. Be sure there is only one line in the file with this MAC address and eth0.
Code:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="D4:3D:7E:38:30:97", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

_________________
Paul
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Tue Dec 24, 2013 2:01 am    Post subject: Reply with quote

I thought that this method had potential race conditions. My impression was that the kernel had the native names, eth0, eth1, wifi0, etc, and that the udev powers-that-be decided we needed these new names. If there is no "/etc/udev/rules.d/80-net-name-slot.rules" then the old-style kernel names persist.

You can instead substitute your own 70-* renaming rule, but in that case you should really use something other than the normal kernel names. There is a race between when devices are actually discovered and when udev is first run. Ever notice that extra message, something like "re-trigger udev for missed events" highlights this. Renaming to a kernel name might work, might not.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13607

PostPosted: Tue Dec 24, 2013 3:03 am    Post subject: Reply with quote

depontius wrote:
If there is no "/etc/udev/rules.d/80-net-name-slot.rules" then the old-style kernel names persist.
Not quite. If there is no /etc/udev/rules.d/80-net-name-slot.rules, then the corresponding 80-net-name-slot.rules shipped by udev will be in effect and will mangle the device names. If /etc/udev/rules.d/80-net-name-slot.rules exists and is empty, it will shadow out the shipped rules and cause udev not to mangle device names, in which case the kernel-assigned names will be left as-is.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Tue Dec 24, 2013 3:14 am    Post subject: Reply with quote

Hu wrote:
depontius wrote:
If there is no "/etc/udev/rules.d/80-net-name-slot.rules" then the old-style kernel names persist.
Not quite. If there is no /etc/udev/rules.d/80-net-name-slot.rules, then the corresponding 80-net-name-slot.rules shipped by udev will be in effect and will mangle the device names. If /etc/udev/rules.d/80-net-name-slot.rules exists and is empty, it will shadow out the shipped rules and cause udev not to mangle device names, in which case the kernel-assigned names will be left as-is.


Oops, I got that backwards. I meant to say what you just did. After mis-answering that question I went looking a bit for the default rules, and didn't find them. I woud have expected to find something like "/usr/share/udev*" and didn't. Do you know where the base rules are stored?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13607

PostPosted: Tue Dec 24, 2013 4:48 am    Post subject: Reply with quote

equery files udev says most of the content is installed in /lib/udev/rules.d (despite being on an amd64, so it ought to be /lib64!). Since shadowing is done by base name, /lib/udev/rules.d/80-net-name-slot.rules seems to be what you want.
Back to top
View user's profile Send private message
Miszczu
Apprentice
Apprentice


Joined: 12 Apr 2005
Posts: 177

PostPosted: Wed Dec 25, 2013 10:28 pm    Post subject: Reply with quote

depontius had right
Code:
#ln -s loopback net.eth0

I don't know if it's the best solution, but it solved my problem and for know i'll leave it like this
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum