OpenRC is an rc system maintained by the Gentoo developers. OpenRC is dependency based and works with the system provided init program, normally sysvinit. It is not a replacement for sysvinit.
- 1 Installation
- 2 Configuration
- 3 Troubleshooting
- 4 Using OpenRC with eudev
- 5 External Links
OpenRC is available in the AUR.
Method A (apg's way)
You can choose to install either
The packages will be installed under
/etc/openrc instead of the default location of
/etc, so that users can switch to initscripts or systemd when desired.
Method B (artoo's way)
Here the main package isAUR (and corresponding set of scripts belonging to the openrc-base group).
Some other packages of note areAUR and AUR (both grouped under the openrc-desktop group), and AUR (from the openrc-misc group).
A summary as well as the source for these package groups can be found at github.
eudev can also be used as udev provider instead of systemd.
Difference between the approaches
- apg's version uses a special directory
/etc/openrcso that sysvinit can be used as init instead of openrc if required.
- artoo's version uses the default
/etcdirectory to maintain compatibility with the Gentoo version (means sysvinit can not be used as init).
- artoo's version uses netifrc for network (Gentoo default), while apg's version uses newnet.
- apg's packages follow a monolithic pattern, with one package that contains the base openrc system, and another containing the rc scripts.
- artoo's package are split packages, which are greater in number, but allow more control in modifying the individual components.
For booting with OpenRC add
init=/usr/bin/init-openrc to the kernel line in your bootloader configuration. If you want to switch back to systemd, change it to
/etc/openrc/conf.d directory, and the
/etc/openrc/rc.d file is used for configuration.
It is worth noting that the udev service is not enabled by default. In order to enable it, do:
# rc-update add udev sysinit
OpenRC is booted by default.
To boot with systemd, add
init=/usr/lib/systemd/systemd to the kernel line in your bootloader configuration.
The files in the
/etc/conf.d directory are used for configuration.
Here udev is enabled by default.
There are multiple ways to get a network up and running. One way is by configuring the
/etc/openrc/conf.d/network file. Both the
ip ( ) and the
ifconfig ( ) commands are supported.
Below is an example configuration using
ip_eth0="192.168.1.2/24" defaultiproute="via 192.168.1.1" ifup_eth0="ip link set \$int mtu 1500"
The network service is added to the boot runlevel by default, so no further action is required.
dhcpcd is enabled by default.
For network configuration, look at the
Out of the box it uses netifrc, which defaults to dhcpcd if not specified differently in
AUR package provides a specific dhcpcd script, not to be confused with netifrc default.
It will start
To use a static route you need to create a symlink of net.lo that reflects your device's name:
ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
For more info, look at Gentoo documentation
For having a graphical network manager,AUR can be installed.
Other options are available, like connman via AUR, which some has GUI front-ends:
AUR (Qt), AUR (Gtk), and AUR (for Enlightenment DE).
Take a look at Network configuration for a detailed look at networking in general.
If you use syslog-ng, comment out the following line in
and add this line instead:
Many different loggers are available, likeAUR, AUR, and AUR.
They mostly work out of the box.
These loggers may conflict with each other, hence using only a single logger is recommended.
OpenRC's boot logging is disabled by default. To enable it, uncomment the following line in
Boot logging is enabled by defualt.
To disable it, comment out the rc_logger="YES" line in
OpenRC sets the hostname from
/etc/openrc/conf.d/hostname (apg's way) or
/etc/conf.d/hostname (artoo's way).
It looks like the following:
# Set to the hostname of this machine hostname="myhostname"
OpenRC doesn't use /etc/modules-load.d/ folder, instead it uses
/etc/openrc/conf.d/modules (apg's way) or
/etc/conf.d/modules (artoo's way).
It looks like the following:
# You should consult your kernel documentation and configuration # for a list of modules and their options. modules="vboxdrv acpi_cpufreq"
Keyboard layout can be configured via
/etc/conf.d/consolefont (artoo's way).
For more info, see the Gentoo wiki.
You can also configure the settings through the
/etc/locale.conf file, which is sourced via
For more details on configuring the locale, take a look here.
Error while unmounting /tmp
When shutting the system down, you might get an error message such as
* Unmounting /tmp ... * in use but fuser finds nothing [ !! ]
This can be fixed by adding
Disabling IPv6 doesn't work
If you have OpenRC installed under the
/etc/openrc sysconf directory.
One fix for this is to put
# Disable ipv6 net.ipv6.conf.all.disable_ipv6 = 1
in a file (with a .conf extension) under
During shutdown remounting root as read-only fails
If the above happens, edit the
/etc/openrc/init.d/mount-ro file and put:
after the following line:
# Flush all pending disk writes now sync; sync
Using OpenRC with eudev
With OpenRC being used as init system, the role of systemd is reduced to that of a udev provider, and for compatibility reasons.
Two packages are needed in order to install eudev:AUR and AUR.
The eudev-systemdcompat package conflicts with systemd and libsystemd, and requires theAUR package. AUR is an optional dependency.
makepkg -di(-d to ignore build dependencies), which pulls in eudev and libeudev as package dependencies.
After thatAUR can be installed from the local repo created earlier. AUR can be installed for suspend / hibernate support.