- 1 Installation
- 2 Configuration
- 3 Usage
- 4 Tips and tricks
- 5 Troubleshooting
- 6 Using OpenRC with a desktop environment
- 7 Reverting to systemd
- 8 See also
Install either the
Optionally, you can use other inits from, e.g., or AUR. Note that when
openrc-init is used, it must be paired with
openrc-shutdown, and not the
reboot commands from other packages, otherwise you will encounter errors.
A basic set of service files are available from theAUR package. Other packages may have service files provided outside this package; a search on the AUR is recommended.
To maintain compatibility with
For booting with OpenRC add your chosen init to the kernel parameters. OpenRC's built-in init is
/usr/bin/openrc-init, and the one provided by AUR is
/etc/openrc/conf.d directory, and the
/etc/openrc/rc.d file is used for configuration.
For general information on configuring OpenRC, see:
OpenRC services are enabled by issuing
rc-update add service_name runlevel as root. It is recommended to at least enable the following services:
The network is configured through
newnet.  Modify 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. See Network configuration for general networking information.
To enable boot logging, uncomment the
rc_logger="YES" line in
/etc/openrc/rc.conf. When enabled, boot logs are stored in
OpenRC sets the hostname from
/etc/openrc/conf.d/hostname. The file looks as follows:
# Set to the hostname of this machine hostname="myhostname"
/etc/openrc/conf.d/modules instead of
/etc/modules-load.d. For example:
# 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/openrc/conf.d/consolefont. You can also configure the settings through the
/etc/locale.conf file, which is sourced via
You can omit the
.target extensions, especially if temporarily editing the kernel parameters.
||List running services status|
||Check failed services|
||Display all available services.|
||Change service state.|
||Turn service on or off.|
||Create or modify configuration.|
Tips and tricks
To hide boot messages from OpenRC, you can edit
/etc/inittab and add
--quiet to every openrc command. For further information check with
$ openrc -h.
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 does not work
One option is to add:
# 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
/etc/sysctl.conf not found
To prevent a missing file error, create the file:
# touch /etc/sysctl.conf
opentmpfiles-setup failed to start
On booting openrc you may see lines like these :
* Setting up tmpfiles.d entries ... chattr: Operation not supported while setting flags on /var/log/journal chattr: No such file or directory while trying to stat /var/log/journal/%m chattr: Operation not supported while setting flags on /var/log/journal/remote [ !! ] ERROR: opentmpfiles-setup failed to start
This is caused by
/usr/lib/tmpfiles.d/journal-nocow.conf using options that are only valid if journal is on a btrfs filesystem.
See https://github.com/OpenRC/opentmpfiles/issues/2 for details
A workaround is to create an empty /etc/tmpfiles.d/journal-nocow.conf to override the settings.
Using OpenRC with a desktop environment
# rc-update add consolekit default
See ConsoleKit for more information.
Begin with OpenRC 0.28 SysVinit is replaced with openrc-init, shutdown is replaced with openrc-shutdown, by using consolekit the system may hang up when shuting down from desktop session. So use broken link: package not found] instead. Enable it with:AUR[
# rc-update add elogind default
Also you need to replace polkit-consolekit withAUR, or the system will alarm "not authorized to perform operation" when mounting usb device, and can't reboot or shutdown from the desktop session.
Reverting to systemd
Reverting to systemd should be straightforward in most cases. It is essentially the reversal of migrating to OpenRC, with care placed on the following:
- Removal of, or otherwise editing, the
init=parameter on the kernel command line
- Replacement of any OpenRC-tailored or no-systemd packages with their stock equivalents (e.g. replacement of AUR with )