You are not logged in.

#1 2013-02-02 08:08:28

rabarrett
Member
Registered: 2012-07-05
Posts: 99

[Solved] ethernet device not starting on boot, related bug, guidance..

Hi,

I believe I have this bug:  https://bugs.freedesktop.org/show_bug.cgi?id=53954#c2

My ethernet doesn't work at startup. 

ip appr

just shows

lo: <LOOPBACK

and nothing else.

********** I have used **********

systemctl enable dhcpcd

and that outputs

ln -s '/usr/lib/systemd/system/dhcpcd.service' '/etc/system/system/multi-user.target.wants/dhcpcd.service'

but I still have the same story after reboot.

If I check my ethernet card with

ip link

shows

dev enp0s20

I see that it is "DOWN"

So I can run

ip link set dev enp0s20 up

followed by

dhcpcd enp0s20

and I get full connectivity.

My ethernet card (from using

lspci -v

) is an

NVIDIA Corporation MCP51 Ethernet Controller (rev a3)

It uses

Kernal driver in use: forcedeth

However, I'm having trouble fully understanding the "solutions" I've read about.  (I'm only a week into my first arch linux install.  I've only used openSUSE and Ubuntoo in the past.)

ATTEMPT #1
Based on the bug fix, I went in as root, and changed /usr/lib/systemd/system/dhcpcd@.service
altering (under [Install]) the line 

Alias=multi-user.target.wants/dhcpcd@eth0.service

to

WantedBy=multi-user.target.wants/dhcpcd@eth0.service

But that didn't help.

ATTEMPT #2
Based on what I read here:  https://bbs.archlinux.org/viewtopic.php?id=138319
I saw there were two ethernet devices that seemed to be having problems and the one using my Kernel drive is one of them.  So I tried to put that one into the modprobe.d
I added a file called "nvidia-ethernet" into "/etc/modprobe.d/" with the content

install forcedeth msi=0 msix=0

  That didn't work.  I also tried it without those option (just no options); that also didn't work.

ATTEMPT #3
But I saw this and it looked a little promising:  https://bbs.archlinux.org/viewtopic.php?pid=1223608
But I had done something similar in ATTEMPT #1
However, adding this part

 
ExecStart=/sbin/ip link set dev %i up
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/sbin/ip route add default via ${gateway}

ExecStop=/sbin/ip addr flush dev %i
ExecStop=/sbin/ip link set dev %i down

of that suggestion to the dhcpcd@.service file seem like just having the system do what I had been doing manually.

So I thought, what the heck?

Of course, what I was doing was a little different (dhcpcd instead of static and I don't know how to "stop" dhcpcd properly, so I just commented out the previous "ExecStart" and "ExecStop" lines and added what seemed like reasonable new ones:

[Service]
Type=forking
PIDFile=/run/dhcpcd-%I.pid
#ExecStart=/usr/sbin/dhcpcd -q -w %I
#ExecStop=/usr/sbin/dhcpcd -x %I
ExecStart=/usr/sbin/ip link set dev %i up
ExecStart=/usr/sbin/dhcpcd %i

ExecStop=/usr/sbin/ip link set dev %i down

I realize there should probably be a corresponding "ExecStop" line for dhcpcd, but I don't know what it would be.  I'm also a little concerned that I didn't use any switches for dhcpcd like the old (now commented out) lines had.  However, I can report... it appeared to work... I think.  (At least on my first reboot.)  Whether I've caused any other problems I don't know.  But I'm dealing with pretty limited knowledge of linux.  I've been reading the arch wikis for days, but they don't solve everything and often people talk of "just doing" something and I find myself thinking "Yeah! ...how?  what's the command or the text or what file do I do that to??"  Sometimes I can read around more, find some other references to the same file (on a different issue) and that person will have posted precise commands, etc..

So what I'm wondering is, is this the best solution?  Can I improve it?  Should I add switches to the dhcpcd lines?  (Is that how I do the stop line, with -x ??)

Any dangers I should know that I've opened myself up to?

If it's ok for now.  Is there a good way to know when the bug is fixed and I can revert to the old line?

Also, is there any more data I can give?
(If so, can you tell me a good way to get it for you?  I only have xwindows installed, but no manager yet, so I can't seem to cut and paste from my terminal windows into my browser.  I'll get whatever info you might need, but I'll need to know how to get it to you in my (so far) limited install.  I've attempted to be accurate above and follow forum rules using the code tag, but I had to type everything, so there is a chance I made a typo in one of the code sections.)

Thank you for any help.

Last edited by rabarrett (2013-02-03 21:31:14)

Offline

#2 2013-02-02 08:09:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

systemctl enable dhcpcd

/thread

Offline

#3 2013-02-02 08:20:17

rabarrett
Member
Registered: 2012-07-05
Posts: 99

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

Thanks, but I tried that.  It was in the beginner wiki so it was part of my initial attempt.  I tried it again later during troubleshooting, but didn't think to put it in the post above.  Thank you for calling that to my attention.  I've edited the post to include that.

Scimmia wrote:

systemctl enable dhcpcd

/thread

Offline

#4 2013-02-02 08:40:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

rabarrett wrote:

So I tried to put that one into the modprobe.d
I added a file called "nvidia-ethernet" into "/etc/modprobe.d/" with the content

install forcedeth msi=0 msix=0

  That didn't work.  I also tried it without those option (just no options); that also didn't work.

The file needs to end in .conf and the correct syntax is

option forecdeath blah blah blah

See: https://wiki.archlinux.org/index.php/Mo … probe.d.2F

But if you can bring the device up manually, I doubt this is the issue. Manually remove any network related links in /etc/systemd/system/* and start from scratch.
Enable the service as per Scimmia's suggetstion, then start the service and see what, if any, errors are printed to the journal.

What is in journalctl after a failed attempt to load/connect at boot?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-02-02 08:56:30

aiBo
Member
Registered: 2010-11-10
Posts: 50

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

Have you tried to enable it specifically yet?

systemctl enable dhcpcd@enp0s20.service

Offline

#6 2013-02-02 09:00:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

aiBo, that does not work right now. Anything that gets enabled with dhcpcd@.service always goes to eth0, no matter what you pass it. That's a very common problem and the reason my first post said to use dhcpcd.service.

rabarrett, what does systemctl status dhcpcd give you?

Offline

#7 2013-02-02 12:41:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

rabarrett wrote:
Alias=multi-user.target.wants/dhcpcd@eth0.service

to

WantedBy=multi-user.target.wants/dhcpcd@eth0.service

You changed the wrong part.   Make it either of the following

Alias=multi-user.target.wants/dhcpcd@%i.service
Alias=multi-user.target.wants/dhcpcd@enp0s20.service

The second version will 'hard code' the service file for your interface and will make it least likely for typos or mistakes in other parts of the process to have any negative impact.  The only downside is that if your hardware ever changes, you'll have to remember you did this, and adjust accordingly.

The first version is probably what the service file should be changed to upstream and will provided the intended functionality.  Just make sure, if you use this form, to use the right command: `systemctl enable dhcpcd@enp02s20`.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2013-02-03 21:30:34

rabarrett
Member
Registered: 2012-07-05
Posts: 99

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

I think that did it (multiple reboots without a problem now).  Thank you very much Tribly (and others).

Interestingly, I ran into the *same* problem when I did a fresh arch install on my laptop last night (the install I posted about was my desktop computer).
The same fix worked for me, but the arch "Beginners' Guide" has failed me twice on this.  So I think I should suggest someone edit it.  (Do you know who I should email?)

Specifically here:  https://wiki.archlinux.org/index.php/Be … he_network

Beginners' Guide - ArchWiki #Configure_the_network wrote:

Warning: systemd now renames network interfaces. Moreover, dhcpcd@.service always creates symlink named dhcpcd@eth0.service, no matter what you supply for <interface>. to fix this, copy dhcpcd@.service to /etc/systemd/system/ and either edit the Alias= line to have the correct <interface> or remove the line and change it to WantedBy=multi-user.target

I don't know why the "warning" says to copy a file to /etc/systemd... or edit the Alias line to "WantedBy", but neither of those worked for me (on desktop or laptop), but your solution, Trilby, did work!

Thank you!
(Loving Arch so far!)

Offline

#9 2013-02-07 16:40:08

rsramirez
Member
Registered: 2012-11-29
Posts: 3

Re: [Solved] ethernet device not starting on boot, related bug, guidance..

Good lord, thank you for this thread, I was running into the same problem!

Offline

Board footer

Powered by FluxBB