Opened 10 years ago
Closed 10 years ago
#981 closed task (fixed)
Separate USR and Systemd
Reported by: | William Harrington | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | CLFS Standard 3.0 |
Component: | BOOK | Version: | CLFS Standard GIT |
Keywords: | Cc: | berzerkula@…, jonathan@…, chris@… |
Description
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)
Change History (3)
by , 10 years ago
Attachment: | systemd-213-separate_usr-1.patch added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
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.