Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to switch a Debian buster system from systemd to sys-v init

590 views
Skip to first unread message

Rick Thomas

unread,
Jun 22, 2019, 9:20:04 PM6/22/19
to

Purely out of curiosity, I'd like to see what's involved in switching a Debian buster system from systemd to sysv init. Please, I don't want to restart or get involved in any of the existing systemd/sysv flame wars. I'm *just curious* to see if it would work?

First of all, is this even possible?

Second, has anyone done it? If so, how did you do it? Here's what I've discovered so far:

Step zero: I fired up a virtual machine and installed stock-out-of-the-box Debian buster with mate on it. I didn't want to have my experiments break any of my production machines! Everything that follows is happening on the VM.

Step one: I searched for packages with "sysv" in their names that weren't already installed. Then I looked for one that said it conflicted with systemd. I settled on sysvinit-core. The rival was sysv-rc (though I'm sure there were others I could have tried). The reason I rejected sysv-rc is that it does not seem to conflict with systemd. Am I wrong in assuming that this (conflicting with systemd) is a requirement for something that will replace systemd?

Step two: But when I try "apt install sysvinit-core" it wants to delete lots of stuff that seem to have nothing to do with systemd at all. For example it wants to remove a bunch of libreoffice packages, and some mate packages, and a bunch of xserver-xorg packages. More precisely it says they are no longer needed and should be deleted by using "apt autoremove". Somehow that doesn't seem right to me. I’m pretty sure I need those packages.

Step three: I tried “apt install sysvinit-core sysvinit-utils” and let it go ahead and delete all the stuff it wanted to. Then I rebooted the system and it came up running the sysv init, but there was a long pause during the boot process while it was trying to start dbus. This eventually timed out and continued and gave me a “login:” prompt, but now I get frequent pauses while it seems to be looking for a non-existent bus daemon.

Anybody got any thoughts?

Thanks for any help you can offer!

Rick

PS: It would be really cool (TM) if the Debian installer offered sysv as an option!

PPS: I googled a bit and found a Devuan website[1] that had instructions for getting a small number of .deb packages from the Devuan ascii repo and using them to replace the corresponding packages from Debian, but it said to start with Debian stretch, not buster. It also pointed out that gnome (and presumably most/all of the other of the other desktop managers) in Debian nowadays explicitly depend on systemd, so it’s best done on a pure headless server configuration. This explains why sysvinit-core wanted to delete all the stuff like server-xorg and libreoffice.

I’d prefer a solution that was pure Debian (i.e. without being dependent on stuff from Devuan[2]) even if it meant being restricted to a headless server config.

[1] https://linuxconfig.org/how-to-replace-systemd-with-sysv-init-on-debian-linux

[2] Don’t take me wrong, I am very supportive of Devuan. I even have a couple of systems that run it in production, but it does tend to drag a bit behind Debian on bug-fixes and latest-feature updates. This is understandable: it’s a much smaller project than Debian.

to...@tuxteam.de

unread,
Jun 23, 2019, 5:50:03 AM6/23/19
to
On Sat, Jun 22, 2019 at 05:45:39PM -0700, Rick Thomas wrote:
>
> Purely out of curiosity, I'd like to see what's involved in
> switching a Debian buster system from systemd to sysv init.

The short version [1]:

apt-get install -y sysvinit-core

> Please, I don't want to restart or get involved in any of
> the existing systemd/sysv flame wars [...]

Phew! ;-)

> First of all, is this even possible?

See above. It's even easy. But see the somewhat longer version
below.

> Second, has anyone done it? If so, how did you do it?
> Here's what I've discovered so far:

[I see you already found out about [1], but Mate goes down the drain]

That's right. "Modern" desktop environments (Gnome and derivatives,
most probably also KDE) depend these days on systemd. I don't know
how hard those dependencies are -- you'd want to look at Devuan [2] [3]
to see how far they went, if at all, into fixing this.

Since I'm not using a DE, but just a traditional window manager,
I'm a happy Debian user without systemd.

Cheers

[1] https://wiki.debian.org/systemd#Installing_without_systemd
[2] https://devuan.org/
[3] https://en.wikipedia.org/wiki/Devuan
-- tomás
signature.asc

arne

unread,
Jun 23, 2019, 7:50:03 AM6/23/19
to

> That's right. "Modern" desktop environments (Gnome and derivatives,
> most probably also KDE) depend these days on systemd. I don't know
> how hard those dependencies are -- you'd want to look at Devuan [2]
> [3] to see how far they went, if at all, into fixing this.

The Devuan default desktop is Xfce. Cinnamon, KDE, LXQt and MATE are
available from tasksel during installation and a number of other
graphical environments are available post-install.

https://devuan.org/os/

to...@tuxteam.de

unread,
Jun 23, 2019, 9:00:04 AM6/23/19
to
Thanks for that information. So it seems that they have at least
tackled some of them. Good for them!

Cheers
-- t
signature.asc

Rick Thomas

unread,
Jun 24, 2019, 8:10:03 PM6/24/19
to


> On Jun 23, 2019, at 2:24 AM, to...@tuxteam.de wrote:
>
> On Sat, Jun 22, 2019 at 05:45:39PM -0700, Rick Thomas wrote:
>>
>> Purely out of curiosity, I'd like to see what's involved in
>> switching a Debian buster system from systemd to sysv init.
>
> The short version [1]:
>
> apt-get install -y sysvinit-core

That may work when starting from Debian stretch (or a non-gui buster system), but buster with mate is a little bit more complicated. See my next email “part 2”…

>
>> Please, I don't want to restart or get involved in any of
>> the existing systemd/sysv flame wars [...]
>
> Phew! ;-)

So far we’ve managed. Let’s try to keep it that way!

>
>> First of all, is this even possible?
>
> See above. It's even easy. But see the somewhat longer version
> below.
>
>> Second, has anyone done it? If so, how did you do it?
>> Here's what I've discovered so far:
>
> [I see you already found out about [1], but Mate goes down the drain]

Sad, but I can live with it if necessary.

>
> That's right. "Modern" desktop environments (Gnome and derivatives,
> most probably also KDE) depend these days on systemd. I don't know
> how hard those dependencies are -- you'd want to look at Devuan [2] [3]
> to see how far they went, if at all, into fixing this.

Devuan does seem to have something working — kudos to them!
But I like to have a better idea of how much they have to give up to get the job done.

>
> Since I'm not using a DE, but just a traditional window manager,
> I’m a happy Debian user without systemd.

Maybe that would work for me too…
Which window manager are you using?
What’s your preferred method of installing it?

Rick Thomas

unread,
Jun 24, 2019, 10:00:05 PM6/24/19
to


> On Jun 23, 2019, at 2:24 AM, to...@tuxteam.de wrote:
>
> On Sat, Jun 22, 2019 at 05:45:39PM -0700, Rick Thomas wrote:
>>
>> Purely out of curiosity, I'd like to see what's involved in
>> switching a Debian buster system from systemd to sysv init.
>
> The short version [1]:
>
> apt-get install -y sysvinit-core

So our goal is to start with a working Debian buster system with the Mate desktop using the systemd init, and convert it to a working buster system with no desktop gui, and using the sys-V init.

As Tomas points out, basically all you should have to do is “apt-get install sysvinit-core”, and the rest should be fully automatic. This may have worked with Debian stretch, but it’s a bit more complicated with buster. In particular, there seems to be some parts of the old dbus stuff left around that cause the long pauses I’ve mentioned previously. This may be a bug and should be reported, but I have no idea what package to report it against, or what a suitable proposed fix would be.

In any case, the solution I came up with is

apt-get --purge install -y sysvinit-core dbus- glib-networking- libgtk-3-0-
apt-get --purge autoremove

Note the trailing minus-signs on dbus- glib-networking- libgtk-3-0- These packages need to be deleted in the same pass as sysvinit-core is added.

Hope this helps somebody in the future…

Enjoy!
Rick

Dan Ritter

unread,
Jun 25, 2019, 9:50:04 AM6/25/19
to
Rick Thomas wrote:
>
> In any case, the solution I came up with is
>
> apt-get --purge install -y sysvinit-core dbus- glib-networking- libgtk-3-0-
> apt-get --purge autoremove
>
> Note the trailing minus-signs on dbus- glib-networking- libgtk-3-0- These packages need to be deleted in the same pass as sysvinit-core is added.
>
> Hope this helps somebody in the future…

I thank you on behalf of my future-self.

-dsr-

Jonas Smedegaard

unread,
Jun 26, 2019, 2:40:03 AM6/26/19
to
Quoting Rick Thomas (2019-06-25 03:32:41)
Seems this would work as well, with less collateral damage:

apt install -y sysvinit-core elogind
apt --purge autoremove

Would be helpful to know if those experiencing long pause in
dbus-depending environments had _no_ dbus installed (and actively
running) or had it running with elogind.


- Jonas

--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/

[x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc

Rick Thomas

unread,
Jun 26, 2019, 3:40:04 AM6/26/19
to
Hi Jonas,

> On Jun 25, 2019, at 11:20 PM, Jonas Smedegaard <jo...@jones.dk> wrote:
>
> Would be helpful to know if those experiencing long pause in
> dbus-depending environments had _no_ dbus installed (and actively
> running) or had it running with elogind.

How can I tell which situation I have?

Thanks!
Rick

Jonas Smedegaard

unread,
Jun 26, 2019, 4:20:04 AM6/26/19
to
Quoting Rick Thomas (2019-06-26 09:13:37)
Check if elogind is installed, e.g. with `dpkg --list dbus`.

Check if dbus is installed (it wouldn't be immediately after running the
previously shared set of commands which explicitly remove it, but might
have been later pulled in again), e.g. with `dpkg --list elogind`.

If dbus is installed then check if dbus is running, e.g. by inspecting
output of `ps ax`
signature.asc

Rick Thomas

unread,
Jun 27, 2019, 4:10:04 AM6/27/19
to


> On Jun 25, 2019, at 11:20 PM, Jonas Smedegaard <jo...@jones.dk> wrote:
>
> Seems this would work as well, with less collateral damage:
>
> apt install -y sysvinit-core elogind
> apt --purge autoremove
>

This works great and, as noted, is far more elegant.

Thanks, Jonas!
Rick

Rick Thomas

unread,
Jun 27, 2019, 4:40:04 AM6/27/19
to
A warning about all of these solutions: They will remove the package, network-manager.
Sometimes this may rewrite the “/etc/network/interfaces” file. You can loose network connectivity after a reboot as a result.
Be prepared to login to the console and fix that up manually if it happens.

Another work-around is to, before doing any apt stuff at all, put a suitable fragment into the “/etc/network/interfaces.d/“ directory that configures at least one of your network interfaces the way you want it. As an example, on my test system I have:

> $ cat /etc/network/interfaces.d/enp0s3
> auto enp0s3
> iface enp0s3 inet dhcp

Hope it helps!
Rick
0 new messages