Author: Rainer Weikusat Date: To: dng Subject: [DNG] running with separate / and /usr
Background
----------
Recently, the disk in my work computer developed a local defect which
caused me to lose a sizable chunk of the data on the 'writable' system
partition (affecting /home and /var --- in particular, I lost the
complete dpkg database and had to write a set of scripts to recreate it
from the list of available package names in /usr/share/doc). This has
reimpressed me with the usefulness of structured disk layouts --- had
/home and /var been on separate partitions, ie, had their data not been
spatially intermixed, I would have lost data on from one of them but not
both).
Practical Problem
-----------------
Devuan 4 cannot boot, at least not without an initrd, with / and /usr
being separate because a large number of programs in / are linked with
libselinux which, in turn, needs libpcre which is on /usr and not on /.
Two programs (I remember kmod) also need libcrypto (OpenSSL) which is
also not on /. I worked around this by booting a live system on a USB
stick and copying the libraries manually.
Is this still a supported configuration, ie, should this be regarded as
a bug? Even if not, is their interest for making it again possible? I
did a POC for init in order to make it load libselinux at runtime and
fail gracefully if it isn't available (or not load it at all if running
on a kernel without SELinux support [such as the 6.1.2 one I'm
running]). A real solution would probably need to be a library
installing itself as libselinux (and the real libselinux library under a
different name) which would forward function calls to the real library
if it can be loaded (and if the kernel supports SELinux).
I'm willing to put work into this although this would only proceed
slowly as this would amount to just a few hours each Sunday.