You are not logged in.

#1 2012-10-20 07:30:44

PLANTROON
Member
From: Slovakia
Registered: 2012-08-08
Posts: 61

[SOLVED] Network autostart

Yesterday I installed ArchLinux and I really hate systemd. When I start my computer, I have no network connection and have to run dhcpcd to connect. I found this on wiki:

# systemctl enable dhcpcd@eth0.service

It does not work. I have to run dhcpcd manually every time I start my computer.

Last edited by PLANTROON (2012-10-24 05:21:38)

Offline

#2 2012-10-20 11:07:16

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

Re: [SOLVED] Network autostart

Did you run it with root privileges (sudo) ? Did it say anything?


Try typing it manually instead of copy pasting it. Someone had issues with special characters copy-pasted from the wiki a few months ago, like "%". Maybe it's because of "@".

So type the command manually, exactly like you see it:

$ sudo systemctl start dhcpcd@eth0.service
$ sudo systemctl enable dhcpcd@eth0.service

https://wiki.archlinux.org/index.php/Co … CP_at_boot

Last edited by DSpider (2012-10-22 15:46:04)


"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

#3 2012-10-20 16:45:01

PLANTROON
Member
From: Slovakia
Registered: 2012-08-08
Posts: 61

Re: [SOLVED] Network autostart

[root@plantroon-pc /]# systemctl start dhcpcd@eth0.service
Job for dhcpcd@eth0.service failed. See 'systemctl status dhcpcd@eth0.service' and 'journalctl' for details.
[root@plantroon-pc /]# systemctl status dhcpcd@eth0.service
dhcpcd@eth0.service - dhcpcd on eth0
          Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
          Active: failed (Result: resources) since Sat, 20 Oct 2012 20:42:37 +0200; 14s ago
         Process: 2209 ExecStart=/sbin/dhcpcd -A -q -w %I (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/dhcpcd@.service/eth0

Oct 20 20:42:37 plantroon-pc systemd[1]: Starting dhcpcd on eth0...
Oct 20 20:42:37 plantroon-pc dhcpcd[2209]: sending commands to master dhcpcd process
Oct 20 20:42:37 plantroon-pc systemd[1]: Failed to start dhcpcd on eth0.

I don't know what's wrong with that. Using just dhcpcd command it starts without any problems and also when I use initscripts instead of systemd

(What is happening now?? I love Archlinux, the way it works. Now I have some problems with time sync in KDE, dhcpcd always worked, now it does not. I have to use the old Xorg repo and hd234k repo if I want to play games. Before some time I only had the basic repos and they had everything inside. Now it's getting harder ...  oh and I hate systemd)

Last edited by PLANTROON (2012-10-20 16:53:58)

Offline

#4 2012-10-22 15:12:22

PLANTROON
Member
From: Slovakia
Registered: 2012-08-08
Posts: 61

Re: [SOLVED] Network autostart

anyone? I think that there is a dependency on some network daemon which has to be run before dhcp@eth0. It's randomly loading the module. So sometimes I have it working and after 2-3 reboots it fails. Also, when it fails I cannot start it using systemctl start as you can see in the above post.

Offline

#5 2012-10-22 15:43:14

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Network autostart

If you hate systemd, don't use it. The initscripts package is still maintained and available.

For any further ranting, I would strongly recommend that you get a blog.

Offline

#6 2012-10-22 15:48:31

PLANTROON
Member
From: Slovakia
Registered: 2012-08-08
Posts: 61

Re: [SOLVED] Network autostart

After 2 days of using Systemd I started to like it but I have this yet not solved problem with the dhcp module.

Offline

#7 2012-10-22 18:13:24

kukibird1
Member
Registered: 2010-04-06
Posts: 11

Re: [SOLVED] Network autostart

PLANTROON wrote:

After 2 days of using Systemd I started to like it but I have this yet not solved problem with the dhcp module.

Try 

 sudo systemctl enable dhcpcd@.service

https://wiki.archlinux.org/index.php/Be … de#Wired_2

Last edited by kukibird1 (2012-10-22 18:15:34)

Offline

#8 2012-10-22 18:55:24

PLANTROON
Member
From: Slovakia
Registered: 2012-08-08
Posts: 61

Re: [SOLVED] Network autostart

@kukibird1 it does the same thing. Thanks for reply

Offline

#9 2012-10-22 18:59:17

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

Re: [SOLVED] Network autostart


"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

#10 2012-10-22 21:32:56

mcduling
Member
Registered: 2011-12-16
Posts: 67

Re: [SOLVED] Network autostart

I have also just installed Arch with systemd on my laptop, with Gnome, and I have to say, I am impressed. Love it, in fact. But I am experiencing the same problems with my wifi network and local time not being remembered each time I boot up. I have to resent the time and enable the network. I have read the wiki extensively and even searched for You Tube videos that my point me in the right direction. I am very wary of resorting to this forum for fear of asking stupid questions without first exhausting all avenues, so here I am. I will continue to experiment (follow the arch way) and watch this thread, but I will get there.

Thanks for a great OS.

Offline

#11 2012-10-23 08:11:29

bleomycin
Member
Registered: 2012-10-23
Posts: 20

Re: [SOLVED] Network autostart

I'm also a brand new arch user, having just installed today. I'm experiencing the exact same issue, none of the solutions posted here or in the wiki are solving this. This must be a bug?

Offline

#12 2012-10-23 08:35:10

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

Re: [SOLVED] Network autostart

If the dhcpd service starts before your network card module (FS#30235), manually add your network card to /etc/modules-load.d/*.conf. For example, blablabla...

And how to find out which kernel module (or "kernel driver") you use? See: https://wiki.archlinux.org/index.php/Ne … ice_Driver


On my machine:

$ lspci -v
...

00:07.0 Bridge: NVIDIA Corporation MCP61 Ethernet (rev a2)
	Subsystem: ASUSTeK Computer Inc. M4N68T series motherboard
	Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 43
	Memory at dfff9000 (32-bit, non-prefetchable) [size=4K]
	I/O ports at e480 [size=8]
	Capabilities: <access denied>
	Kernel driver in use: forcedeth

...

So, for me, I guess it would be:

# tee /etc/modules-load.d/somefile.conf <<< "forcedeth"
# reboot

So try it (with your module, of course).


It could also be because:

https://wiki.archlinux.org/index.php/Co … vice_names

... Many configuration issues are caused by users incorrectly configuring the network settings for eth0, when in fact, they have their Ethernet cable plugged into eth1.

Udev is responsible for which device gets which name. With udev and modular network drivers, the network interface numbering is not persistent across reboots by default, because the drivers are loaded in parallel and, thus, in random order. Configuring your network connection is hard if you do not know if your card will be called eth0 or eth1.


"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

#13 2012-10-23 18:58:21

drobole
Member
From: Norway
Registered: 2012-07-23
Posts: 125

Re: [SOLVED] Network autostart

I installed arch yesterday using the latest iso and here is the commands I ran in order to set the clock and configure networking:

Set hardware and system clock

# hwclock --set --date="2012-10-23 01:24:30"
# hwclock --hctosys

Get rid of error message before the GRUB menu

# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Install and configure wired and wireless networking

# pacman -S netcfg ifplugd
# cd /etc/network.d
# ln -s examples/ethernet-dhcp .

Make sure the WIRED_INTERFACE and WIRELESS_INTERFACE lines is uncommented
# nano /etc/conf.d/netcfg

# systemctl enable net-auto-wired.service
# pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
# systemctl enable net-auto-wireless.service


Maybe that will help...

edit:
My /etc/adjtime is set to UTC by the way, and I haven't tried the wireless card yet, but the wired card works now without running dhcpcd

Last edited by drobole (2012-10-23 19:01:19)

Offline

#14 2012-10-23 19:03:46

PLANTROON
Member
From: Slovakia
Registered: 2012-08-08
Posts: 61

Re: [SOLVED] Network autostart

Thank you, DSpider. The problem was I've never had to do anything with the network card module so I just skipped those lines in wiki. Now it seems to work. On my friend's notebook I tried drobole's "Networking setup guide" and it worked as well. Thanks. Sorry for my bad English I don't speak / write well.

Last edited by PLANTROON (2012-10-23 19:05:24)

Offline

#15 2012-10-23 21:13:45

bleomycin
Member
Registered: 2012-10-23
Posts: 20

Re: [SOLVED] Network autostart

drobole wrote:

Install and configure wired and wireless networking

# pacman -S netcfg ifplugd
# cd /etc/network.d
# ln -s examples/ethernet-dhcp .

Make sure the WIRED_INTERFACE and WIRELESS_INTERFACE lines is uncommented
# nano /etc/conf.d/netcfg

# systemctl enable net-auto-wired.service
# pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
# systemctl enable net-auto-wireless.service


Maybe that will help...

edit:
My /etc/adjtime is set to UTC by the way, and I haven't tried the wireless card yet, but the wired card works now without running dhcpcd

Please correct me if i'm wrong, but shouldn't this be unnecessary if you're just trying to launch dhcpcd with systemd? Shouldn't systemctl enable dhcpcd@.service suffice, or is the wiki incorrect?

Offline

#16 2012-10-23 21:43:27

mcduling
Member
Registered: 2011-12-16
Posts: 67

Re: [SOLVED] Network autostart

I now have my wifi set up running correctly. All I needed to do was insert the relevant details into wicd-curses, install NetworkManager and reboot. That seems to have done the trick, Regardijng getting the correct localtime to work, I installed ntp and that pretty much did it. Boy, how I love the Arch approach to learning.
Great stuff.

Offline

#17 2012-10-23 22:27:23

drobole
Member
From: Norway
Registered: 2012-07-23
Posts: 125

Re: [SOLVED] Network autostart

bleomycin wrote:
drobole wrote:

...

Please correct me if i'm wrong, but shouldn't this be unnecessary if you're just trying to launch dhcpcd with systemd? Shouldn't systemctl enable dhcpcd@.service suffice, or is the wiki incorrect?

What wiki? I was probably following this article about netcfg: https://wiki.archlinux.org/index.php/Ne … Auto-Wired
I haven't tried anything else

Last edited by drobole (2012-10-23 22:28:40)

Offline

#18 2012-10-23 22:37:35

bleomycin
Member
Registered: 2012-10-23
Posts: 20

Re: [SOLVED] Network autostart

drobole wrote:

What wiki? I was probably following this article about netcfg: https://wiki.archlinux.org/index.php/Ne … Auto-Wired
I haven't tried anything else

The Beginners' Guide, https://wiki.archlinux.org/index.php/Be … he_network

Offline

#19 2012-10-23 23:16:51

drobole
Member
From: Norway
Registered: 2012-07-23
Posts: 125

Re: [SOLVED] Network autostart

bleomycin wrote:
drobole wrote:

What wiki? I was probably following this article about netcfg: https://wiki.archlinux.org/index.php/Ne … Auto-Wired
I haven't tried anything else

The Beginners' Guide, https://wiki.archlinux.org/index.php/Be … he_network

Yea I just looked at that now and it does say something about the difference between net-auto-wired.service and dhcpcd@.service.

I haven't read a lot about it yet but it seems that net-auto-wired.service with ifplugd is able to dynamically switch between network interfaces as they are plugged/unplugged
https://wiki.archlinux.org/index.php/Co … or_laptops

Offline

#20 2021-06-28 23:50:53

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Network autostart

DSpider wrote:

If the dhcpd service starts before your network card module (FS#30235), manually add your network card to /etc/modules-load.d/*.conf. For example, blablabla...

And how to find out which kernel module (or "kernel driver") you use? See: https://wiki.archlinux.org/index.php/Ne … ice_Driver


On my machine:

$ lspci -v
...

00:07.0 Bridge: NVIDIA Corporation MCP61 Ethernet (rev a2)
	Subsystem: ASUSTeK Computer Inc. M4N68T series motherboard
	Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 43
	Memory at dfff9000 (32-bit, non-prefetchable) [size=4K]
	I/O ports at e480 [size=8]
	Capabilities: <access denied>
	Kernel driver in use: forcedeth

...

So, for me, I guess it would be:

# tee /etc/modules-load.d/somefile.conf <<< "forcedeth"
# reboot

So try it (with your module, of course).


It could also be because:

https://wiki.archlinux.org/index.php/Co … vice_names

... Many configuration issues are caused by users incorrectly configuring the network settings for eth0, when in fact, they have their Ethernet cable plugged into eth1.

Udev is responsible for which device gets which name. With udev and modular network drivers, the network interface numbering is not persistent across reboots by default, because the drivers are loaded in parallel and, thus, in random order. Configuring your network connection is hard if you do not know if your card will be called eth0 or eth1.

Great! I had the same problem, after enabling the dhcpcd daemon service and rebooting, my new installed system wouldn't start and it was frozen forever
So I did the steps you provided and it started working. Thanks!

Offline

#21 2021-06-29 00:48:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: [SOLVED] Network autostart

Glad to hear, however please don't necrobump 9 year old threads

Closing.

Offline

Board footer

Powered by FluxBB