supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Lorenzo <plorenzo@disroot.org>
To: supervision@list.skarnet.org
Subject: Re: Runit in Ubuntu Jammy
Date: Sat, 1 Oct 2022 15:41:29 +0200	[thread overview]
Message-ID: <20221001154129.505b5a96@lorenz.fritz.box> (raw)
In-Reply-To: <CAEfp_B7ABzJani4uH60ex-sDc7nDOwSMtD+xPtm_OWUMhD7AtQ@mail.gmail.com>

Hi,

On Sat, 1 Oct 2022 06:07:28 +0200
Paul Gerdes <pgerdes89@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'


  parent reply	other threads:[~2022-10-01 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01  4:07 Paul Gerdes
2022-10-01  4:49 ` Adam Faiz
2022-10-01 11:25   ` Lorenzo
2022-10-01 13:41 ` Lorenzo [this message]
2023-02-10 15:39 Adam Faiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221001154129.505b5a96@lorenz.fritz.box \
    --to=plorenzo@disroot.org \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).