Opened 9 years ago

Closed 9 years ago

#981 closed task (fixed)

Separate USR and Systemd

Reported by: William Harrington Owned by: clfs-commits@…
Priority: trivial Milestone: CLFS Standard 3.0
Component: BOOK Version: CLFS Standard GIT
Keywords: Cc: berzerkula@…, jonathan@…, chris@…


Systemd doesn't support a configuration with a separate /usr filesystem.

It will either remount it when an initramfs mounts /usr, but if /usr ends up being empty, the systemd core will print that a separate /usr configuration is not supported.

We need to have a disclaimer in the book, probably around the partitioning section, that a separate /usr is not a valid configuration supported by systemd, but that /usr can be mounted with an initramfs setup and systemd will remount it when it is remounting / as well.

I've attempted to hack the systemd core code to run mount /usr and read the fstab entry, but that probably is not a good idea.

I can boot systemd all the way to a login with a separate /usr, but systemd-logind and any dbus daemons won't run as the required binaries and shared data are at /usr

A separate /usr for the sysvinit book is still probably fine. Outside of udev having some things in /usr, it is probably still okay.

Attachments (1)

systemd-213-separate_usr-1.patch (6.3 KB) - added by William Harrington 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by William Harrington

comment:1 Changed 9 years ago by William Harrington

I have attached systemd-213-separate_usr-1.patch

This patch allows Systemd to mount a separate /usr filesystem and not need an initramfs.

It would be more ideal to use the #ifdef HAVE_SPLIT_USR around some of the code which was removed, if possible.

That way if someone does use an initramfs it'd work then, too. With the patch it doesn't matter if the initramfs mounts /usr or not if /usr is a separate filesystem.

This isn't needed, I was doing this to get it to work as it did long ago with systemd before /usr as a separate filesystem was removed. The code has changed quite a bit since 2012.

comment:2 Changed 9 years ago by William Harrington

Resolution: fixed
Status: newclosed

I have added a note to the current book stating that a separate /usr filesystem is not supported by Systemd by default. Hacks can be performed to the source, and it is mentioned that an initramfs is required.

commit 72c2b349b8060ec922db33f1b5ad69e9c964a938

Last edited 9 years ago by William Harrington (previous) (diff)
Note: See TracTickets for help on using tickets.