8

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..

3
  • 1
    Do it from a chroot...
    – jasonwryan
    Commented Jul 28, 2015 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
    Commented Jul 28, 2015 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
    Commented Jul 28, 2015 at 21:36

2 Answers 2

5

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.

2
  • No, that doesn't help at all, systemd runs after the reboot as well.
    – einpoklum
    Commented Jul 29, 2015 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. Commented Mar 4, 2016 at 12:35
1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .