Manjaro Difference between revisions of "OpenRC, an alternative to systemd"

Difference between revisions of "OpenRC, an alternative to systemd"

From Manjaro
imported>Aaditya
(removed old text - kept some references)
Tag: Replaced
 
(191 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[http://www.gentoo.org/proj/en/base/openrc/ OpenRC] is an init system maintained by the Gentoo developers.  
{{Out of date|OpenRC is no longer supported --Frede H. 08:41, 25 September 2020 (CEST)}}
OpenRC is a dependency based init system that works with the system provided init program, normally sysvinit. It is not a replacement for sysvinit.


It can be used as an alternative to [http://www.freedesktop.org/wiki/Software/systemd/ systemd], for users that like more control over their system and do not want all the features that systemd provides and automatically activates.
__TOC__


== Installation ==
==Unsupported on Manjaro==
{{Important|Manjaro does no longer support OpenRC}}
==Replacement==
{{Important|If you are looking for OpenRC capable Arch have a look at [https://artixlinux.org Artix Linux]}}


OpenRC is currently available from the [https://aur.archlinux.org/packages/?O=0&K=openrc AUR], and from a binary repository curtsy Archbang and artoo.
==What is OpenRC==
[https://wiki.gentoo.org/wiki/OpenRC OpenRC] is a dependency based [https://en.wikipedia.org/wiki/Init init] system maintained by the Gentoo developers, that works with the system provided init program, normally [http://savannah.nongnu.org/projects/sysvinit sysvinit]. It is not a replacement for sysvinit.


To use the binary repos, add the following near the end of the ''/etc/pacman.conf'' file:
It is an alternative to [http://www.freedesktop.org/wiki/Software/systemd/ systemd] for users that like more control over their system, and do not want all the features that systemd provides and automatically activates.


[openrc]
SigLevel = Optional TrustAll
Server = http://archbang.org/repos/$repo/$arch
[aur-nosystemd]
SigLevel = Optional TrustAll
Server = http://archbang.org/repos/$repo/$arch
And then do '''sudo pacman -Syu''' to synchronise the reposotories.
The main package to install is ''openrc-base''. It installs a binary init sysvinit (sysvinit), and the OpenRC base scripts and configuration.
To install the ''openrc-base'' package, use:
sudo pacman -S openrc-base
This package conflicts with ''systemd-sysvcompat'', which will be removed. The output looks like:
sudo pacman -S openrc-base
resolving dependencies...
looking for inter-conflicts...
:: openrc-base and systemd-sysvcompat are in conflict. Remove systemd-sysvcompat? [y/N] y
Packages (3): systemd-sysvcompat-212-3 [removal]  sysvinit-2.88-15
              openrc-base-0.12.4-12
Total Download Size:    0.24 MiB
Total Installed Size:  0.96 MiB
Net Upgrade Size:      0.95 MiB
:: Proceed with installation? [Y/n]
After installing the ''openrc-base'' package, OpenRC should boot by default instead of systemd. Note that it will boot to a command line, as the service for a graphical display manager has not yet been installed.
On installing the ''openrc-base'' package, you may get messages like:
run 'rc-update add cronie default'
run 'rc-update add dhcpcd default'
Running these commands adds the services to the specified runlevels. For example if you run:
sudo rc-update add cronie default
Then the cronie service would be added to the default runelevel and would automatically be started at boot.
=== Additional packages ===
==== Display Manager ====
To boot to a graphical display manager, install the '''openrc-displaymanager''' package, and edit the ''/etc/conf.d/xdm'' file to specify your display manager. For example, to use '''lightdm''', I changed the line
DISPLAYMANAGER="xdm"
to
DISPLAYMANAGER="lightdm"
''Note:''
''lightdm'' and a ''lightdm-greeter'' should be installed and configured to use lightdm as display manager.
An alternative to ''lightdm'' that I find simpler is [https://wiki.archlinux.org/index.php/LXDM LXDM]. However the version in the repos does not automatically start a ck-session on login; alternative [https://aur.archlinux.org/packages/lxdm-consolekit/ lxdm-consolekit] from the [[AUR]] can be used.
==== Audio (ALSA) ====
The '''alsa-utils-openrc''' package can be installed. After installing it run:
sudo rc-update add alsasound default
to automatically start Alsa at boot.
==== Network Manager ====
By default ''dhcpcd'' is installed. However if you use Wifi to connect, or need a graphical network applet, then '''networkmanager-openrc''' can be installed.
The ''networkmanager-openrc'' replaces the normal networkmanager package in the repos. Also, it requires ''consolekit'' and ''polkit-consolekit'', which replaces the normal polkit from the repos.
==== Consolekit ====
You may also wish to install '''consolekit-openrc''', which supports multi-user setups, mounting of partitions by unauthorised users, etc. See the [https://wiki.gentoo.org/wiki/ConsoleKit Gentoo-Wiki] for more details.
Only caveat of installing consolekit is that it requires ''polkit-consolekit'', which conflicts with the normal polkit; so if you boot to systemd you wont be able to mount partitions if you are not in the storage group.
However using the command line, or as root user, one can mount any partition or perform most functions that are made available to the normal user via polkit. See the [https://wiki.archlinux.org/index.php/Polkit Arch-wiki] for more details.
==== Others ====
For acpi support '''acpid-openrc''' can be installed and enabled.
For running the ''ps'' command, the '''procps-ng-nosystemd''' package can be installed.
To suspend and hibernate via the command line, '''pm-utils''' can be installed. You may also need the '''upower-nosystemd-pm-utils''' package if suspend and hibernate does not work. Also see the [[Using_OpenRC,_an_alternative_to_systemd#Troubleshooting | troubleshooting]] section for enabling swap.
== Troubleshooting ==
When booting, you may get errors like:
tmpfiles: ignoring invalid entry on line 32 of `/usr/lib/tmpfiles.d//legacy.conf'
tmpfiles: ignoring invalid entry on line 33 of `/usr/lib/tmpfiles.d//legacy.conf'
tmpfiles: ignoring invalid entry on line 34 of `/usr/lib/tmpfiles.d//legacy.conf'
tmpfiles: ignoring invalid entry on line 11 of `/usr/lib/tmpfiles.d//systemd-nologin.conf'
tmpfiles: ignoring invalid entry on line 18 of `/usr/lib/tmpfiles.d//x11.conf'
To correct, I removed the lines referenced in the above files. These errors have been fixed by the developers on [https://github.com/OpenRC/openrc/issues/17 github], and should be available in the next release.
The boot logs for OpenRC are stored in ''/var/log/rc.log''
If you were using systemd on a '''GPT''' partitioned hard disk, then you may need to enable swap via ''/etc/fstab''. This is so because systemd handled swap automatically on GPT partitions, and gave error if it was mounted via fstab.
I added the following entry to my ''/etc/fstab''
# /dev/sda10
UUID=0c3e9434-bc5c-461c-a5e4-4e9fe5f9a149 swap swap sw 0 0
Also, systemd used to set a ''tmpfs'' by default; to set it manually via ''/etc/fstab'', I added the following lines:
tmpfs /tmp tmpfs  nodev,nosuid          0  0
See the [https://wiki.archlinux.org/index.php/Fstab#tmpfs Arch Wiki] for more details.


== Further Reading ==
== Further Reading ==


[https://wiki.archlinux.org/index.php/Openrc The Arch Wiki]
* [https://wiki.archlinux.org/index.php/Openrc The Arch Wiki]
 
* [http://blog.notfoss.com/posts/openrc-on-arch-linux/ OpenRC on Arch Linux]
[http://blog.notfoss.com/posts/openrc-on-arch-linux/ OpenRC on Arch Linux]
* [http://systemd-free.org/ systemd-free.org]
 
* [https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts Initscripts]
[http://abchk1234.wordpress.com/2014/06/03/using-openrc-on-arch-archbang-manjaro-linux/ Using OpenRC on Arch / Archbang / Manjaro Linux]
* [https://wiki.gentoo.org/wiki//etc/local.d /etc/local.d]
 
== Support ==
 
Following is a link to this page's forum counterpart where you can post any related feedback: [https://forum.manjaro.org/index.php?topic=14080.0]




[[Category:Contents Page]]
[[Category:Obsolete]]

Latest revision as of 11:58, 29 June 2024

Tango-dialog-warning.png This article or section is out of date.
Reason: OpenRC is no longer supported --Frede H. 08:41, 25 September 2020 (CEST) (Discuss)
Tango-dialog-warning.png

Unsupported on Manjaro

Info
Manjaro does no longer support OpenRC


Replacement

Info
If you are looking for OpenRC capable Arch have a look at Artix Linux


What is OpenRC

OpenRC is a dependency based init system maintained by the Gentoo developers, that works with the system provided init program, normally sysvinit. It is not a replacement for sysvinit.

It is an alternative to systemd for users that like more control over their system, and do not want all the features that systemd provides and automatically activates.


Further Reading

Cookies help us deliver our services. By using our services, you agree to our use of cookies.