Hi, On Sat, 1 Oct 2022 06:07:28 +0200 Paul Gerdes <pgerde...@gmail.com> wrote:
> Hello everyone. I am trying to get a minimal ubuntu desktop > installation without systemd. > Do you know if there is a way to get runit, openrc or sysvinit > running as an init replacement on modern ubuntu? Could you please > give me a Guide on how to install it and set it up? > > Runit Packages are already available in Ubuntu Repos. Together with > 'init-system-helpers'. > See here: > https://packages.ubuntu.com/search?keywords=runit&searchon=names > > I know its not officially supported in Ubuntu, but Debian 11 can run > without systemd. There should be a way to do this. There is probably a way but you are on your own, did you consider to do this directly in Debian or even better in a derivative that supports runit, like Devuan? Anyway, going back to your question, to have runit as init system on Ubuntu Jammy or Kinetic I would try as following (not tested!): 1. install packages available in Ubuntu; # apt-get install runit getty-run runit-helper # apt-get remove runit-run runit-systemd 2. download packages that are unavailable in Ubuntu from Debian and install manually: download runit-init, insserv, startpar, sysv-rc, initscripts [1]; then first install [2] insserv and startpar, then sysv-rc and finally initscripts. Note that you can't proceed further if installation of those packages fails. Also, if /etc/rc2.d/ is empty, you may want to run 'update.rc.d service-name enable' for each service that you want to be automatically stated on boot with runit; this is sysvinit stuff but see next point 3. boot with init=/lib/runit/runit-init GRUB parameter (not /sbin/runit-init !), and you should get at least a getty login on tty1. As a fallback, sysvinit scripts enabled in /etc/rc2.d/ are run sequentially when a corresponding (same basename) runit service is missing from /etc/sv/ , so you may also get other services running unsupervised. Note that no Desktop-Environment that requires systemd-logind will work at this stage, as systemd-logind requires systemd as PID 1. You need to download and install elogind, libelogind0 and libpam-elogind packages from Debian... and you can't do this in one step because elogind conflicts with systemd, and systemd doesn't allow to be removed while is PID 1, extra fun here! 4. if everything with step 3 is ok, proceed with installing runit-init package: ( init is an empty metapackage) # apt-get --allow-remove-essential remove init # apt -i /path/to/runit-init.deb 5. now start replacing sysv services with runit services: you can look at runscipts from the Void project, but there are many collections around if you search in GitHub. Best, Lorenzo > > Thanks for your help > Greetings [1] https://packages.debian.org/sid/runit-init https://packages.debian.org/sid/insserv https://packages.debian.org/sid/startpar https://packages.debian.org/sid/sysv-rc https://packages.debian.org/sid/initscripts [2] use 'apt -i /path/to/downloaded/debs/packagename.deb'