OpenRC fully compatible OS

The best alternative to SystemD is OpenRC, how much Elive can support it ? - Right now, it's perfectly supported, you can use it. But:

This thread is about using it daily, keeping betatestings and looking for compatibilities, bug reports and solutions, etc. The more correctly integrated, the better.

So if you use it and found issues with it, post here your experience and especially try first to search the solution to the issue, so we can improve Elive with it.

Actual status:

  • fix for shutdown / suspension / hibernation, etc
  • elive-upgraded integration
  • switcher between OpenRC / SystemD
  • boot messages without garbage
  • systemd compatibility commands
  • plymouth compatibility
  • implement correctly everything in the system / os / packages
  • update the installer to use the init-switcher (needs betatest of all the compat systemd commands)

Right now the main issues with OpenRC were related to shutdown and suspend as we were talking with @triantares . If im not wrong this issue has been fully resolved right now.

On the other hand, there's a small issue that doesn't affect at all the system, its about the boot messages, which looks like this:

The cause that you see this is not really openrc but the lack of plymouth, the problem basically relies in /bin/sh which points to "dash" (in other words, this is a Debian bug)

So why this happens ?

Init scripts, like from /etc/init.d/ , sources /usr/lib/lsb/init-functions, which defines entries like:

# int log_begin_message (char *message)
log_begin_msg () {
    log_begin_msg_pre "$@"
    if [ -z "${1:-}" ]; then
        return 1
    fi
    echo -n "$@" || true
    log_begin_msg_post "$@"
}

As you can see, there's "echo -n" calls (and "echo -e", etc), which are not compatible with dash, so since dash is the shell used by the /etc/init.d/ scripts and try to call "echo -n" and other ones, it just print the bunch of -en messages, looking ugly

Solutions:

switch sh to bash

You can replace the default /bin/sh to point to bash, by running "dpkg-reconfigure dash" (it doesn't seems to work on my side) or with sudo ln -sf /bin/bash /bin/sh, but this is not an ideal idea, dash is used because is much lighter, and we want to keep lightness

use plymouth

By using plymouth you won't see these "broken/ugly" messages, but plymouth is not compatible with non-systemd systems unless you use GitHub - Kangie/plymouth-openrc-plugin: Plymouth plugin for OpenRC, currently maintained here. · GitHub or ced4rtree/plymouth-openrc: Scripts to use Plymouth to boot into a display manager on OpenRC - Codeberg.org (not tried here)

this also replaces the main functions from /usr/lib/lsb/init-functions.d/99-plymouth

fix init-functions

That's the best solution, Elive can provide its own modified version of the init-functions file , where it detects if $SHELL (or similar) is bash or dash and decide which type of echo, printf, or functions to use or even better an overwrriter file in .d dir that will replace the other functions if openrc is installed, something like this (didn't do any tests yet)

Update: :disbelief: im unable to make this working :thinking: looks like something else than /etc/init.d/ is using echo -e commands, i think openrc migrates them to their system

in any case again: this doesn't affect at all your openrc stability and use

Apparently there isn't a a plymouth alternative but ........ some call this animated in-kernel eye-candy stuff professional: I don't, so I don't really miss the bling-bling and always hit 'Escape' on boot.
It's too M$Windows-like IMO and there's always folks who love to copycat that OS. :grimacing:
What could be nice (not sure if it's do-able) is a nice picture as underlay for the scrolling text

no need escape, just reove hte package :slight_smile: or remove the "splash" entry from your grub settings in /etc/default/grub

yes and no, is nice to have... but maybe better as it was in the Elive 3.0 (or it was in 2.0? I don't recall :thinking: ) - installed system. Which was not plymouth but an EFL app :eyepopping:

What could be nice (not sure if it's do-able) is a nice picture as underlay for the scrolling text

Yes, Elive 1.0 or 2.0 had that (which also compiled its own kernels) :rofl2:

New tools:

Install the package systemd-compat-notinstalled

You will have now 2 new tools:

  • systemd-openrc-wrapper: this tool will create all the relative "systemd" commands that a normal OS actually needs, translating these commands to openrc commands, making the system fully compatible for anything that expect to use systemd [VERY EXPERIMENTAL STATE]
  • init-switcher: an easy way to switch between openrc and systemd, directly on the fly

How to use them:

The wrapper will require the --install parameter, but not needed if you run "init-swither" (it calls it automatically)

The init-switcher tool should be called like:

sudo -E init-switcher openrc -y      # switches to OpenRC
sudo -E init-switcher systemd -y     # switches to SystemD

Does Elive can be more amazing than this ? :dance:

Init-switcher looks interesting .... I definitely have to look into how that works. :face_with_open_eyes_and_hand_over_mouth:

I dunno, I missed out on 2.0 (I think) but I do remember the login screen that had me chasing after the moving login widget with my mouse. :madness: