Description | Commands | |
---|---|---|
1 | Append the [openrc-eudev] repository to /etc/pacman.conf (all commands here need root privileges).
[openrc-eudev]
SigLevel=PackageOptional
Server=http://downloads.sourceforge.net/project/archopenrc/$repo/$arch
|
echo -e "[openrc-eudev]\nSigLevel=PackageOptional\nServer=http://downloads.sourceforge.net/project/archopenrc/\$repo/\$arch" >> /etc/pacman.conf |
2 | Save a list of your running daemons. | systemctl list-units --state=running "*.service" > daemons.list |
3 | Refresh the database and list the packages in [openrc-eudev]. The ones ending in -openrc are start/stop scripts for various daemons. Compare with the list from step 2. Fetch the basic packages in cache (not really mandatory, but better safe than sorry). |
pacman -Syl openrc-eudev pacman -Sw sysvinit openrc-core eudev eudev-openrc eudev-systemdcompat dbus-nosystemd procps-ng-nosystemd syslog-ng-nosystemd |
4 | Remove systemd and family (answer 'yes' to all pacman questions below). If you do this you MUST also complete step 5, otherwise you're left without init system. | pacman -Rdd systemd libsystemd |
5 | Install openrc and family (eudev-systemdcompat provides systemd and libsystemd dependencies for packages that are linked against libsystemd).
Some systems, especially of pre-2012 installations might have leftover sysvinit configuration files. In such a case, either remove or rename them. Or you can keep calm and use '--force' to overwrite them. |
pacman -S sysvinit openrc-core eudev eudev-openrc eudev-systemdcompat |
If steps 4 and 5 have been completed, then your system is ready to boot with init/OpenRC. |
||
6 | Recommended packages: - procps-ng-nosystemd because procps-ng's binaries are hardlinked to libsystemd and won't work. - dbus-nosystemd because, well, dbus. |
pacman -S --needed dbus-nosystemd procps-ng-nosystemd |
7 | Install the openrc scripts for your daemons from step 2 (edit for your setup). | pacman -S --needed acpid-openrc alsa-utils-openrc autofs-openrc consolekit consolekit-openrc cronie-openrc dbus-openrc cups-openrc displaymanager-openrc fuse-openrc haveged-openrc hdparm-openrc openssh-openrc samba-openrc syslog-ng-openrc avahi-openrc |
8 | The followins steps concern system-wide settings; for desktop configuration we'll elaborate in Configuration. First, enable necessary daemons. | for daemon in acpid alsasound autofs dbus consolekit cronie cupsd xdm fuse haveged hdparm smb sshd atd; do rc-update add $daemon default; done |
9 | Edit /etc/rc.conf to your liking. If you want to boot into X, edit /etc/conf.d/xdm and replace 'xdm' with your display manager (e.g. 'lxdm' or 'mdm') and enable xdm. OpenRC reads /etc/conf.d/modules instead of systemd's /etc/modules-load.d/. |
vi /etc/rc.conf vi /etc/conf.d/xdm; rc-update add xdm default vi /etc/conf.d/modules |
10 | Copy all sysctl settings into /etc/sysctl.conf and edit. Alternatively, install procps-ng-nosystemd, but before creating /etc/sysctl.conf because it's provided by the package. Save your hostname where OpenRC can find it. Edit your locale settings. |
cat /etc/sysctl.c/*.conf >> /etc/sysctl.conf; vi /etc/sysctl.conf echo "hostname="`hostname` >| /etc/conf.d/hostname vi /etc/conf.d/keymaps; vi /etc/conf.d/consolefont; vi /etc/locale.conf |
11 | Edit /etc/conf.d/net, especially if this is a remote box. Assuming the main network interface is eth0, set its IP and default route and make a symlink of /etc/init.d/net.lo -> /etc/init.d/net.eth0. | vi /etc/conf.d/net; cd /etc/init.d; ln -s net.lo net.eth0; rc-update add net.eth0 boot |
12 | If you have an LVM setup, you need lvm2-openrc and device-mapper-openrc, otherwise your logical volumes will be inactive after reboot. | pacman -S lvm2-openrc device-mapper-openrc rc-update add lvm boot; rc-update add device-mapper boot |
13 | Remove some systemd-only users (optional). | for user in systemd-journal systemd-journal-gateway systemd-timesync systemd-network systemd-bus-proxy systemd-journal-remote systemd-journal-upload; do userdel $user; done |
14 | Make sure you remove any 'init=/usr/lib/systemd/systemd' or similar directives in your bootloader config, if any. The linux kernel by default launches /sbin/init. Also, remove any 'x-systemd' directives from /etc/fstab. | vi /etc/grub/grub.cfg ; vi /etc/fstab |
15 | Packages for desktop users. Read Configuration for better explanation, this step is here for the sake of completeness. Make sure that a graphical authentication agent is installed and autostarted on login. Cinnamon, GNOME, KDE, LXDE, LXQt, MATE and Xfce have an authentication agent already. See this section of Polkit if unsure. Finally, become member of some groups (for suspend/hibernation functionality and for accessing soundcards, removable drives, cd/dvd-roms) |
pacman -S --needed consolekit polkit-consolekit upower-pm-utils udisks2-nosystemd desktop-privileges xorg-xwrapper pacman -S --needed polkit-gnome|polkit-kde|mate-polkit|lxsession|lxqt-policykit (also xfce-polkit-git or polkit-efl-git from the AUR) usermod -a -G video,audio,power,disk,storage,optical,lp,scanner $USER |
16 | You can now reboot into openrc. However, since systemd's executables are no longer present, this is not possible at this point with the regular commands. Umount all filesystems manually and force remount / read-only. You can also use SysRq; sync filesystems, remount read-only and reboot. | umount -a mount -f / -o remount,ro echo s >| /proc/sysrq-trigger echo u >| /proc/sysrq-trigger echo b >| /proc/sysrq-trigger |
17 | Enjoy your systemd-free box. Additional configuration may be needed, especially with regards to a window manager or a desktop environment. Read the information and the linked articles in Configuration for more information. | OpenRC 0.13.8 is starting up Arch Linux (x86_64) * Mounting /proc ... [ ok ] * Mounting /run ... * /run/openrc: creating directory * /run/lock: creating directory * /run/lock: correcting owner * Caching service dependencies ... ... |
# pacman -Rdd systemd libsystemd systemd-sysvcompat
# pacman -S sysvinit openrc-core eudev eudev-openrc eudev-systemdcompat dbus-nosystemd procps-ng-nosystemd syslog-ng-nosystemd udisks2-nosystemd consolekit polkit-consolekit upower-pm-utils udisks2-nosystemd desktop-privileges xorg-xwrapper acpid-openrc alsa-utils-openrc autofs-openrc consolekit consolekit-openrc cronie-openrc dbus-openrc cups-openrc displaymanager-openrc fuse-openrc haveged-openrc hdparm-openrc openssh-openrc samba-openrc syslog-ng-openrc avahi-openrc
All you have to do now is to complete configuring your system as shown in the comprehensive steps above and in Configuration.
# pacman -Rs sysvinit openrc-core eudev eudev-openrc eudev-systemdcompat dbus-nosystemd procps-ng-nosystemd syslog-ng-nosystemd udisks2-nosystemd consolekit polkit-consolekit upower-pm-utils udisks2-nosystemd desktop-privileges xorg-xwrapper acpid-openrc alsa-utils-openrc autofs-openrc consolekit consolekit-openrc cronie-openrc dbus-openrc cups-openrc displaymanager-openrc fuse-openrc haveged-openrc hdparm-openrc openssh-openrc samba-openrc syslog-ng-openrc avahi-openrc
# pacman -S systemd libsystemd systemd-sysvcompat