You are not logged in.

#1 2012-11-09 23:05:59

chord
Member
Registered: 2012-11-07
Posts: 121

Cannot find device "eth0" on startup

Hello!
Can't automatically connect to network on system startup.
Initially I used dhcpcd. Sometimes networking automatically started on system boot, sometimes I had to start networking manually with

'systemctl start dhcpcd@eth0.service'

So I decided to try static IP addresses and reconfigured my network settings. Service was enabled with

'systemctl enable network'

Currently my networking not starting at boot automatically at all. I checked 'systemctl status network' output and found this error message : 'Cannot find device "eth0"'

After that I can start it manually with

'systemctl start network'

and networking starts and works fine. No more errors from 'systemctl status network'.
Why systemd can't found eth0 device at system startup? And how to fix it? It's so boring to start it manually on every boot...

Thanks in advance.

Last edited by chord (2012-11-09 23:07:10)

Offline

#2 2012-11-10 00:26:51

jimbeam
Member
From: philly
Registered: 2004-02-25
Posts: 16

Re: Cannot find device "eth0" on startup

I had a similar problem over at https://bbs.archlinux.org/viewtopic.php?id=152612

I was using netcfg.  I made sure I had done a systemctl enable netcfg and systemctl start netcfg.  Then did a ifconfig to see what really happened.  Turns out systemd had renamed my interfaces which messed up my firewall a little.

So maybe poke around more in how systemd actually did set up your network.

HTH

Offline

#3 2012-11-10 03:44:02

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,318

Re: Cannot find device "eth0" on startup

Its a bug and is currently being addressed
https://bbs.archlinux.org/viewtopic.php?id=151662 has links to a proposed patch

Offline

#4 2012-11-10 09:14:53

chord
Member
Registered: 2012-11-07
Posts: 121

Re: Cannot find device "eth0" on startup

Thanks for replies!

I tried this patch, but it doesn't helped.
Currently I added a small script to autostart:

 
# /bin/bash
sudo systemctl start network

Launched at start of KDE.

Offline

#5 2012-11-17 05:06:17

kaz
Member
Registered: 2012-11-17
Posts: 1

Re: Cannot find device "eth0" on startup

I started using systemd today, and experienced the same trouble.

journalctl -b shows:

Nov 17 13:32:15 fujitsu-arch ip[109]: Cannot find device "eth0"
Nov 17 13:32:15 fujitsu-arch systemd[1]: network.service: main process  exited, code=exited, status=1/FAILURE
Nov 17 13:32:15 fujitsu-arch systemd[1]: Failed to start Network Connectivity.
Nov 17 13:32:15 fujitsu-arch systemd[1]: Unit network.service entered failed state
Nov 17 13:32:15 fujitsu-arch systemd[1]: Starting Network.
Nov 17 13:32:15 fujitsu-arch systemd[1]: Reached target Network.
...
Nov 17 13:32:17 fujitsu-arch kernel: e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
Nov 17 13:32:17 fujitsu-arch kernel: e100: Copyright(c) 1999-2006 Intel Corporation

I am afraid systemd starts network before the interface is ready.

So my workaround is adding a sleep in the unit.file /etc/systemd/system/network.service.

[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target

[Service]   
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network
# I hope the interface will be ready in 10 seconds
ExecStart=/usr/bin/sleep 10
ExecStart=/sbin/ip link set dev ${interface} up
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
ExecStart=/sbin/ip route add default via ${gateway}
[Install]
WantedBy=multi-user.target

Offline

#6 2012-11-17 15:52:59

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Cannot find device "eth0" on startup

chord wrote:

Thanks for replies!

I tried this patch, but it doesn't helped.
Currently I added a small script to autostart:

 
# /bin/bash
sudo systemctl start network

Launched at start of KDE.

You don't need that. It probably won't run either, unless you set it not to ask for a password with visudo. To start it at bootup, use this instead:

# systemctl enable network

https://wiki.archlinux.org/index.php/Sy … sing_units


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-11-18 01:31:47

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot find device "eth0" on startup

@DSpider,
Maybe you should read the OP's original post?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB