Difference between revisions of "Init/Replacing udev"

From ArchWiki
Jump to navigation Jump to search
(simplification of wikilinks, fixing whitespace (https://github.com/lahwaacz/wiki-scripts/blob/master/link-checker.py))
Line 6: Line 6:
 
== Installation ==
 
== Installation ==
  
Install {{AUR|eudev}} from the [[Arch User Repository]]. Alternatively, {{AUR|eudev-git}} and {{AUR|eudev-openrc}} are available, each with differing dependencies.
+
Install {{AUR|eudev}} from the [[Arch User Repository]]. Alternatively, {{AUR|eudev-git}} is also available.
  
{{Note|One may not be able to install the eudev packages directly from the AUR due to conflicts when installing; to circumvent it, {{AUR|eudev}} (along with {{AUR|eudev-openrc}}) can be built and added  to a [[Pacman tips#Custom_local_repository|local repository]], and then {{AUR|eudev-systemdcompat}} can be built and installed  from the AUR with {{ic|makepkg -di}} ('''-d''' to ignore build dependencies), which pulls in eudev as package dependency. After that {{AUR|eudev-openrc}} can be installed from the local repo created earlier.}}
+
{{Note|One may not be able to install the eudev packages directly from the AUR due to conflicts when installing; to circumvent it, {{AUR|eudev}} can be built and added  to a [[Pacman tips#Custom_local_repository|local repository]], and then {{AUR|eudev-systemdcompat}} can be built and installed  from the AUR with {{ic|makepkg -di}} ('''-d''' to ignore build dependencies), which pulls in eudev as package dependency.}}
  
 
=== libsystemd ===
 
=== libsystemd ===

Revision as of 08:24, 12 June 2015

Warning: This package will remove systemd as it replaces udev. Therefore, you should install an alternative init system and have it boot successfully under that init system prior to installing eudev.

eudev is a fork of udev started by the Gentoo project, with the goal of isolation from the init system. It is primarily designed and tested with OpenRC, but is agnostic to any other init systems.

Installation

Install eudevAUR from the Arch User Repository. Alternatively, eudev-gitAUR is also available.

Note: One may not be able to install the eudev packages directly from the AUR due to conflicts when installing; to circumvent it, eudevAUR can be built and added to a local repository, and then eudev-systemdcompatAUR can be built and installed from the AUR with makepkg -di (-d to ignore build dependencies), which pulls in eudev as package dependency.

libsystemd

This package will also remove libsystemd as it replaces a part of it. The missing libraries are available from:

  • libsystemd-standaloneAUR — a package group with libraries separated into a package each.
  • eudev-systemdcompatAUR — a package that guts the official libsystemd package and installs the missing libraries.

You also probably want systemd-dummyAUR to satisfy the missing systemd dependency.

Alternatively, you may rebuild packages linked to libsystemd using ABS, or install nosystemd variants from the AUR.

Replacing the systemd package

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Find a statisfactory solution for tmpfiles, cf. openrc-systemdcompatAUR and tmpfiles-configAUR (Discuss in Talk:Init/Replacing udev#)

The systemd packages include several components besides the init system and systemd-udev:

  • systemd libraries linked against software such as Xorg. See #libsystemd.
  • systemd-tmpfiles to create temporary files on system startup
  • systemd-sysusers to allocate system users and groups in pacman .install files

If you have removed systemd without booting to the new init, a reboot is not possible in regular ways. Enable SysRq keys:

# sysctl kernel.sysrq=1

and press Alt-SysRq-S, Alt-SysRq-U and Alt-SysRq-B in succession. This syncs all mounted file systems, remounts all disk as read-only, and reboots the system, respectively. If latter is not possible, press Alt-SysRq-O to poweroff). In case the system is a remote box, you must sync and remount read-only its filesystems before triggering an immediate reboot (edit your filesystems accordingly):

# sync; mount -f /home -o remount,ro ; sync; mount -f / -o remount,ro
# echo b >| /proc/sysrq-trigger

Troubleshooting

Fails to start

Check the init script for eudev (aliased to udev, so /etc/openrc/init.d/udev on an OpenRC setup for example) and ensure the command points to /usr/bin/udev.

netctl

netctl is not compatible due to dependency on systemd libs, instead, use netcfgAUR, avaliable in the AUR.

Device naming

Your net devices will follow the pre-systemd pattern: from example wlp1s0 should be renamed to wlan0. You have to set your net configuration properly.

sysctl

Your files in /etc/sysctl.d/ might disappear after removing systemd. OpenRC reads /etc/sysctl.conf.

See also