base-files: add /run to dirs755 for systemd
PATCH 1/1 base-files: add /run to dirs755 for systemd
The /run directory needs to exist when using systemd otherwise startup fails with the following error:
systemd[1]: Failed to mount /run: No such file or directory
This affects directdisk and vmdk images but images using an initrd do not appear to be affected.
--- meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -1
@@ -34,7 +34,7 @@ docdir_append = "/${P}" dirs1777 = "/tmp ${localstatedir}/volatile/lock ${localstatedir}/volatile/tmp" dirs2775 = "/home ${prefix}/src ${localstatedir}/local" dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ - ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /sbin \ + ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \ ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \ ${libdir} ${sbindir} ${datadir} \ ${datadir}/common-licenses ${datadir}/dict ${infodir} \
Signature · 1 line
1.8.2.3
Quoted 3 lines · Jonathan Liu
The /run directory needs to exist when using systemd otherwise startup fails with the following error:
systemd[1]: Failed to mount /run: No such file or directory
This is a genuine bug, but I'm not convinced it is the whole fix. What about non-systemd images? /run is meant to be a tmpfs, which is why udev installs a volatile link from /run to /var/run. If we create a directory in sysvinit cases, we'll also need to mount a tmpfs on it.
The FHS 3 draft specification actually ratifies /run[1] so we could take this advantage to start cleaning up our volatile layout in /var. Start by always creating /run in base-files, and always mounting it as tmpfs in fstab for the non-systemd case. Then we can symlink /var/run to /run, /var/lock to /run/lock, and so on.
Ross
[1] http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData
Quoted 9 lines · Ross
Quoted 3 lines · Jonathan Liu
The /run directory needs to exist when using systemd otherwise startup fails with the following error:
systemd[1]: Failed to mount /run: No such file or directoryThis is a genuine bug, but I'm not convinced it is the whole fix. What about non-systemd images? /run is meant to be a tmpfs, which is why udev installs a volatile link from /run to
/var/run. If we create a directory in sysvinit cases, we'll also need to mount a tmpfs on it.
Quoted 5 lines
The FHS 3 draft specification actually ratifies /run[1] so we could take this advantage to start cleaning up our volatile layout in /var. Start by always creating /run in base-files, and always mounting it as tmpfs in fstab for the non-systemd case. Then we can symlink
/var/runto /run,/var/lockto/run/lock, and so on.
I have submitted a more complete patch for your review.
Quoted 3 lines
Ross
[1] http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData
Regards,
Jonathan