AlbiWiki

fait par moi pour moi (et accessoirement vous aussi)

Outils pour utilisateurs

Outils du site


debian_without_shitstemd

Change Debian buster from systemd to sysvinit

Saved from without-systemd.org

About these instructions

These instructions are for installing the sysvinit init program on Debian “buster” 10 systems. This is done by installing the sysvinit-core package for an init system that's not systemd, and a set of elogind packages to provide backwards compatibility with the systemd library packages.

I have chosen to recommend using rescue media to change init programs because systemd does not allow its removal while it is running, and this seems to be the easiest and cleanest way. It also makes sure your reboot will be clean.

These instructions work on buster systems, but also you can run these commands near the end of the Debian install procedure if you want to remove systemd before you even finish installing Debian.

Boot with your Debian install media, or your rescue disc of choice

Boot with your Debian install disc or USB mass storage device. Choose rescue mode. Answer all of the questions.

Mount your harddrive and chroot into the filesystem

Choose your root filesystem, for example the /dev/sda2 device. (It'll probably be the only one that works, unless you have more than one UNIX or Linux system installed on your computer.) Choose to execute a shell in that device, your root filesystem.

Add sources for experimental and unstable to the APT sources.list

Edit your /etc/apt/sources.list file, for example with the nano command. You can use your mirror or the CDN source in the examples.

Add a line for unstable, like this one, for example. deb http://deb.debian.org/debian unstable main

Add another line for experimental, like this one: deb http://deb.debian.org/debian experimental main

You can add deb-src lines in addition to the above two lines, too, if you want to.

Create an APT preferences pin for the unstable branch of Debian

This is so your system doesn't download and upgrade everything to the unstable branch of Debian.

Create a file called something like /etc/apt/preferences.d/unstable-pin and edit it, and put this in the file:

 Package: *
 Pin: release a=unstable
 Pin-Priority: -1

Update APT package cache

Make APT aware of the new packages, which we're going to install, by running the following line: apt update

Install the relevant sysvinit and elogind compatibility packages

To install the sysvinit-core package and remove the systemd packages, run:

apt install sysvinit-core elogind/unstable libpam-elogind-compat libpam-elogind/unstable libelogind0/unstable

If you have a multi-arch i386 and amd64 Debian system, and you want i386 support for Wine or Steam, for example, you will need to install the libelogind0:i386/unstable package, too. Either add that package to the line above or run the following line:

apt install libelogind0:i386/unstable

Reboot your system

Exit the shell and choose the “reboot the system” option from the Debian rescue menu.

You may wish to remove the Debian install media before you reboot so your computer does not automatically boot from the media.

What works

I installed all of the Debian graphical interfaces or desktop environments (DEs) in a Qemu virtual machine, GNOME, Cinnamon, MATE, Xfce, LXQT, LXDE. They all worked.

Installing and removing packages in Synaptic worked in LXDE and probably would work in all the other DEs since it's not DE-dependent.

What doesn't work

Ejecting the (virtual) DVD-ROM took around 3 minutes in MATE and Xfce. In LXQT and LXDE I got messages saying the DVD-ROM was already mounted, although it was mounted or possible to mount, which is the main point.

Setting a hold on the systemd package

Installing assorted different packages can trigger a reinstall of the systemd package.

In order to avoid reinstalling systemd you can at least get a warning from APT by setting a hold on the systemd package after it is installed. Run: echo systemd hold | dpkg --set-selections

You may have to be watchful whenever installing new packages, to see if the held systemd package will be changed, or if systemd will be reinstalled.

Support status

The developers have stated that the libpam-elogind-compat package is for testing only, so these instructions may be completely unsupported in Debian.

I have only tested what I said above, that is, running all the desktop environments, testing mounting and ejecting the DVD-ROM, and installing and removing packages in Synaptic.

It would probably help if I made a better APT unstable pin so that the related packages would upgrade automatically once they were in Debian buster (or stable.)

debian_without_shitstemd.txt · Dernière modification: 2019/09/12 19:15 par albirew