7

So, I've also switched from Debian to the Devuan pseudo-fork. But - this doesn't get rid of systemd... I've followed the instructions here, and did:

# apt-get install sysvinit-core sysvinit-utils

but when I then tried:

# apt-get remove --purge --auto-remove systemd

I got basically the following error message:

systemd is the active init system, please switch to another before removing systemd.

Yeah great, just what I thought I was trying to do..

  • 1
    Do it from a chroot... – jasonwryan Jul 28 '15 at 21:17
  • @jasonwryan: Can you be more specific? chroot to where? And why would this help? And are you sure it won't render the system unbootable? – einpoklum Jul 28 '15 at 21:27
  • 1
    You have two choices. Boot from a live medium, chroot in and change it, or boot from Devuan and then remove systemd. No, I am not sure it won't render the system unbootable because I know nothing about Devuan... – jasonwryan Jul 28 '15 at 21:36
4

You have to reboot your machine after executing first command.

Please take a look at How to remove systemd from a Debian jessie/sid installation.

  • No, that doesn't help at all, systemd runs after the reboot as well. – einpoklum Jul 29 '15 at 20:55
  • @einpoklum well there's ALT Linux out there just in case, we ship both systemd and sysvinit (but most of the docs and discussions are in Russian). Maybe my en.altlinux.org/rescue would be helpful back then either -- boot, mount, chroot, replace init, reboot. – Michael Shigorin Mar 4 '16 at 12:35
0

1. error reason

this error came from here:

/var/lib/dpkg/info/systemd.prerm

# Prevent systemd from being removed if it's the active init.  That
# will not work.
#

if [ "$1" = "remove" ] && [ -e /sys/fs/cgroup/systemd ]; then
    echo "systemd is the active init system, please switch to another before removing systemd."
    exit 1
fi

2. resolve & remove

see systemd cgroup mounts (mounted by /lib/systemd/systemd)

mount
...
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/debug type cgroup (rw,nosuid,nodev,noexec,relatime,debug)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)

umount them, and try to remove again:

apt-get remove systemd

OR

apt-get purge systemd

that's worked for me.

3. after remove

then other service manager maybe needed, sysvinit or upstart or something else.

  • Thank you. Unfortunately, I can't test this right now since I don't have Devuan installed at the moment... – einpoklum Mar 2 '18 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.