Migrate from Milky Way v0.1 to v0.2
Since Hyperbola has announced the end of systemd support, migration to OpenRC is required if you come from Milky Way v0.1.
What is OpenRC?
For the current session when you install OpenRC, the command poweroff will probably not work. After a hard reboot, the command poweroff works fine again. Close your softwares, do sync, and you can shut down your computer manually.
netctl works with systemd only, therefore it will not work anymore from Milky Way v0.2 since OpenRC is the main init system of Hyperbola. In this page, we will assume you already have an alternative, in our case, it is netifrc or networkmanager.
Before Arch migrated to systemd, users had to be manually added to some groups in order to be able to access the corresponding devices. Read more about here.
Make sure your user is on the audio group, you won't have sound otherwise:
# gpasswd -a <your-user> audio
In the case of some graphical environments, such as KDE, you´ll need to edit /etc/pulse/client.conf and remove the autospawn = no line, and it should look something like this:
... ; default-sink = ; default-source = ; default-server = ; default-dbus-server = ; autospawn = yes ; daemon-binary = /usr/bin/pulseaudio ; extra-arguments = --log-target=syslog ; cookie-file = ; enable-shm = yes ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB ; auto-connect-localhost = no ; auto-connect-display = no
Same for video, your games might be laggy otherwise:
# gpasswd -a <your-user> video
# gpasswd -a <your-user> network
# gpasswd -a <your-user> optical
Also for storage:
# gpasswd -a <your-user> storage
# gpasswd -a <your-user> disk
And for CUPS:
# gpasswd -a <your-user> sys
Since OpenRC is included by default and systemd is blacklisted by your-freedom, just upgrade your machine in the simplest way:
# pacman -Syyuu base
On migrating, one may get messages like:
run 'rc-update add cronie default' run 'rc-update add elogind default'
Running these command(s) adds the service(s) to the specified runlevels. For example on running:
# rc-update add elogind default
The elogind service would be added to the default runlevel and would automatically be started at boot.
elogind (systemd's logind replacement) and cronie (for cron) are some common services that can be enabled.
Also you need to install polkit to gain enough desktop privileges for operations like shutdown, mounting usb device:
# pacman -S polkit
Services often required
Once you migrate to OpenRC, you might need to add lvm2 etc.
There is the procedure for lvm2:
# rc-update add lvm boot
# rc-update add dmcrypt boot
# rc-update add alsasound default
# rc-update add cronie default
On each package containing an OpenRC service, you will have have this message :
==> rc 'rc-update add ... default'
$ ls -ls /etc/systemd/system/multi-user.target.wants/
Sometimes, there are target files such as remote-fs.target which are useless in OpenRC.
OpenRC has its configuration in /etc/conf.d/, in order to have your hostname, edit /etc/conf.d/hostname:
# nano -w /etc/conf.d/hostname
And replace localhost with the name that you want:
# Set to the hostname of this machine hostname="localhost"
You need to enable the software at boot:
# rc-update add NetworkManager default
In order to not change the computer's hostname when you're connecting to Internet (provided by dhcp), uncomment the part [keyfile] in the file /etc/NetworkManager/NetworkManager.conf as follow :
# Static hostname [keyfile] hostname=**Votre hostname**
For NetworkManager to work correctly in OpenRC, make sure that /etc/hostname has the same localhost as in /etc/conf.d/hostname. Optionally, you can safely remove /etc/hostname
As the hostname, you need to setup the keymap in the file /etc/conf.d/keymaps:
If you have an advanced usage of your keymap, you can watch the other functionalities, documented in the comments. You can find all the available keymaps in /usr/share/kbd/keymaps. Then run:
# rc-service keymaps restart
Login display manager
Unlike another distros with OpenRC support, the DM is launched directly.
For example, with lightdm, you just need enable the service.
# rc-update add lightdm default
Adaptation between systemctl and rc-update
Add or delete a service
You can add a service using this way:
# rc-update add <service> <runlevel>
And delete it as follow:
# rc-update del <service> <runlevel>
Services currently running
In order to have a summary of all the services running, stopped etc, you can run this command:
# rc-status --all -v
Stop/Start/Restart a service
To restart a service, you need to use rc-service:
# rc-service <service> restart
Consistent network device naming is not disabled
To disable consistent network device naming, disable the assignment of fixed names, so that the unpredictable kernel names are used again, by masking udev's rule file for the default policy. This “masking” can be done by making a symbolic link to /dev/null. As root, issue a command as follows:
# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
Sysctl.conf is missing
You can encounter an issue if /etc/sysctl.conf is missing. To fix this, you need to create the file:
# touch /etc/sysctl.conf
/usr/lib/rc/cache doesn't exist
If you have this error when you shutdown the computer:
WARNING: /usr/lib/rc/cache is not writable!
The solution is to create the folder:
# mkdir /usr/lib/rc/cache
Swap isn't enabled
Systemd used to mount the swap automatically, you need to manually add the swap in /etc/fstab as follow:
# /dev/sda2 UUID=0c3e9434-bc5c-461c-a5e4-4e9fe5f9a149 swap swap sw 0 0
tmpfs isn't present
As the swap, systemd automatically mounts the tmpfs. Add it manually in /etc/fstab:
tmpfs /tmp tmpfs nodev,nosuid 0 0
The system can't shutdown correctly
Begin with OpenRC 0.28 SysVinit is replaced with openrc-init, shutdown is replaced with openrc-shutdown. If you use startx to start your desktop, you also need to modify ~/.xinitrc for xfce4, replace exec ck-launch-session startxfce4 to startxfce4.
This wiki article is based on ParabolaWiki.