<font size=1 face="Lucida Console">I recently switched to using systemd
in my initrd, and nearly everything works fine, expect now the system comes
up without /tmp being mounted correctly. I'm not sure where to start looking.
Can anyone nudge me in the right direction?</font>
<br>
<br><font size=1 face="Lucida Console">The tmp.mount unit seems to be inactive.
It didn't do that before I started using systemd in initrd.</font>
<br>
<br><font size=1 face="Lucida Console">~ # systemctl status tmp.mount</font>
<br><font size=1 face="Lucida Console">● tmp.mount - Temporary Directory</font>
<br><font size=1 face="Lucida Console"> Loaded: loaded (/usr/lib/systemd/system/tmp.mount;
static; vendor preset: enabled)</font>
<br><font size=1 face="Lucida Console"> Active: inactive (dead)
since Sat 2015-09-12 00:28:11 UTC; 33s ago</font>
<br><font size=1 face="Lucida Console"> Where: /tmp</font>
<br><font size=1 face="Lucida Console"> What: tmpfs</font>
<br><font size=1 face="Lucida Console"> Docs: man:hier(7)</font>
<br><font size=1 face="Lucida Console">
</font><a href=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems><font size=1 color=blue face="Lucida Console">http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems</font></a>
<br>
<br><font size=2 face="sans-serif">The local-fs.target unit is active and
happy.</font>
<br>
<br><font size=1 face="Lucida Console">~ # systemctl status local-fs.target</font>
<br><font size=1 color=#41ff32 face="Lucida Console">●</font><font size=1 face="Lucida Console">
local-fs.target - Local File Systems</font>
<br><font size=1 face="Lucida Console"> Loaded: loaded (/usr/lib/systemd/system/local-fs.target;
static; vendor preset: enabled)</font>
<br><font size=1 face="Lucida Console"> Active: </font><font size=1 color=#41ff32 face="Lucida Console">active</font><font size=1 face="Lucida Console">
since Sat 2015-09-12 00:28:12 UTC; 1min 24s ago</font>
<br><font size=1 face="Lucida Console"> Docs: man:systemd.special(7)</font>
<br>
<br><font size=2 face="sans-serif">But its dependencies list tmp.mount
as not active.</font>
<br>
<br><font size=1 face="Lucida Console">~ # systemctl list-dependencies
local-fs.target</font>
<br><font size=1 face="Lucida Console">local-fs.target</font>
<br><font size=1 color=#41ff32 face="Lucida Console">●</font><font size=1 face="Lucida Console">
├─-.mount</font>
<br><font size=1 color=#41ff32 face="Lucida Console">●</font><font size=1 face="Lucida Console">
├─systemd-remount-fs.service</font>
<br><font size=1 color=#ff4040 face="Lucida Console">●</font><font size=1 face="Lucida Console">
├─tmp.mount</font>
<br><font size=1 color=#41ff32 face="Lucida Console">●</font><font size=1 face="Lucida Console">
└─var.mount</font>
<br>
<br><font size=1 face="Lucida Console">The list of mounts show that tmpfs
is mounted on /tmp, but it isn't really. I assume this is a /tmp in initrd
that is masked by switching the root to /sysroot (similar to the rootfs
on the first line), because it is read-only like the root file system (can't
make any files in it), and when I manually start tmp.mount that problem
is fixed.</font>
<br>
<br><font size=1 face="Lucida Console">~ # cat /proc/mounts</font>
<br><font size=1 face="Lucida Console">rootfs / rootfs rw 0 0</font>
<br><font size=1 face="Lucida Console">sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime
0 0</font>
<br><font size=1 face="Lucida Console">proc /proc proc rw,nosuid,nodev,noexec,relatime
0 0</font>
<br><font size=1 face="Lucida Console">devtmpfs /dev devtmpfs rw,nosuid,size=954032k,nr_inodes=238508,mode=755
0 0</font>
<br><font size=1 face="Lucida Console">tmpfs /dev/shm tmpfs rw,nosuid,nodev
0 0</font>
<br><font size=1 face="Lucida Console">devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620
0 0</font>
<br><font size=1 face="Lucida Console">tmpfs /run tmpfs rw,nosuid,nodev,mode=755
0 0</font>
<br><font size=1 face="Lucida Console">tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755
0 0</font>
<br><font size=1 face="Lucida Console">cgroup /sys/fs/cgroup/systemd cgroup
rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
0 0</font>
<br><font size=1 face="Lucida Console">tmpfs /tmp tmpfs rw 0 0</font>
<br><font size=1 face="Lucida Console">/dev/disk/by-partlabel/rootfs /
ext4 ro,relatime,data=ordered 0 0</font>
<br><font size=1 face="Lucida Console">/dev/disk/by-partlabel/varfs /var
ext4 rw,relatime,discard,nodelalloc,data=journal 0 0</font>
<br>
<br><font size=1 face="Lucida Console">/etc/fstab is pretty tame. Not sure
if it would be causing an issue or not.</font>
<br>
<br><font size=1 face="Lucida Console">~ # cat /etc/fstab</font>
<br><font size=1 face="Lucida Console">PARTLABEL=rootfs / ext4 ro 0 1</font>
<br><font size=1 face="Lucida Console">PARTLABEL=varfs /var ext4 rw,data=journal,discard
0 2</font>
<br>
<br><font size=1 face="Lucida Console">Some journal output for reference.
The root file system is read-only, so the errors with chmod are expected.
These errors don't occur when /tmp is mounted properly.</font>
<br>
<br><font size=2 face="Courier New">systemd[1]: systemd 219 running in
system mode. (-PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK -SYSVINIT -UTMP
-LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ -LZ4 -SECCOMP +BLKID -ELFUTILS
-KMOD -IDN)<br>
systemd[1]: Started Remount Root and Kernel File Systems.<br>
systemd[1]: Reached target Local File Systems (Pre).<br>
systemd[1]: Starting Local File Systems (Pre).<br>
systemd[1]: Found device SILICONSYSTEMS_INC_8GB varfs.<br>
systemd[1]: Mounting /var...<br>
systemd[1]: Mounted /var.<br>
systemd[1]: Starting Flush Journal to Persistent Storage...<br>
systemd[1]: Started Flush Journal to Persistent Storage.<br>
systemd[1]: Reached target Local File Systems.<br>
systemd[1]: Starting Local File Systems.<br>
systemd[1]: Starting Create Volatile Files and Directories...<br>
systemd-tmpfiles[161]: chmod(/tmp) failed: Read-only file system<br>
systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited,
status=1/FAILURE<br>
systemd[1]: Failed to start Create Volatile Files and Directories.<br>
systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.<br>
systemd[1]: systemd-tmpfiles-setup.service failed.<br>
systemd[1]: Reached target System Initialization.</font>