Thursday, May 23, 2013

netctl, another systemd disaster

I have been installing Arch from the its installation medium, not archbang because I needed an efi compatible version of Arch. It was no problem to install it although I find not very useful nor educational to go through some tedious and boring routine. Some Archers seem to think of themselves as very clever when they are able to come up with the right cli input ant the right moment. Which proves how smug they are. I find it as oppressing as ballroom dancing. Any way that is not the reason of my post. After I had set up my openbox environment and had updated etcetera and rebooted, my wired internet connection was gone. Still used to ntcfg  it took me some time to discover the 'advantages' of netctl with spontaneous device renaming and other 'features'   which I rather would call bugs.
This is where Linux is at its worst: nothing goes the way it should,; everything has to get configured and the documentation is spread around although the arch wiki still is the best place to start. Network configuration and the netctl topic have to learned by heart.
Most of the solutions come from there.

I will give the fault messages from journalctl -xn later.
Useful steps:
1. Use ip link to check your actual device name
Useful to get  a hunch about the device renaming by udev
2. If the command:   $ping -c 3 www.google.com
complains about unknown hosts
try this:  $ ping -c 3 8.8.8.8

3. If the dhcpd service starts before your network card module, manually add your network card to /etc/modules-load.d/*.conf. For example, if your Realtek card needs r8169 to be loaded, create:

/etc/modules-load.d/realtek.conf

r8169
Tip: To find out which modules are used by your network card, uselspci -k
All three subjects were relevant, I used some trial and error method for solving the device renaming:
#systemctl enable dhcpcd@enp0s3
#systemctl start dhcpcd@enp0s
and other names had to be used
Maybe I should have used this:
 Device names
For motherboards that have integrated NICs, it is important to have fixed device name. Many configuration problems are caused by interface name changing.
Udev is responsible for which device gets which name. Systemd v197 introduced Predictable Network Interface Names, which automatically assigns static names to network devices. Interfaces are now prefixed with en (ethernet), wl (WLAN), or ww (WWAN) followed by an automatically generated identifier, creating an entry such as enp0s25.
This behavior may be disabled by adding a symlink:
# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
Users upgrading from an earlier systemd version will have a blank rules file created automatically. So if you want to use persistent device names, just delete the file.


Furthermore:  Configuration of netctl

netctl may be used to introspect and control the state of the systemd services for the network profile manager. Example configuration files are provided for the user to assist them in configuring their network connection. I had to use

    ethernet-dhcp
 
To use this example profile, simply copy one of them from /etc/netctl/examples/ to /etc/netctl/ and configure it to your needs:

# cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/

Once you have created your profile, make an attempt to establish a connection using the newly created profile by running:

# netctl start ethernet-dhcp
and
# netctl enable ethernet-dhcp

I find it really back to the eighties that you have to go into so much trouble to get a simple ethernet connection. It is a proof that Arch devs are out of control and at the mercy of some guy called, sorry forgot his name; no, it wasn't Harry Potter...

2 comments:

Pieter Hogendoorn said...

Hi Pablo, since you don't like SystemD and you are not afraid of tinkering, did you look at Gentoo? I am looking hard at it, at Funtoo specifically. I think it offers some extra stability, over Debian (Sid).

Btw, I do like the systemd performance in Arch, although my Siduction install is just as fast, maybe except for booting and shutting down.

pablo said...

Hi, hgndrn, I have installed sabayon, but hardly use it. I find updating a big more hassle in gentoo than in Arch because you have to compile a lot.
But I find gentoo the most sympathetic of Linux distro's.

Blog Archive