Have /tmp cleaned by mounting it as tmpfs
Describe your issue
What's the expected behaviour?
I would expect /tmp to be clean after a reboot.
What's the current behaviour?
Files and directories in /tmp are persistent across reboots.
How to reproduce your issue?
Look into /tmp, you should see some old files. Otherwise write a file to /tmp, reboot and see whether it is still there.
What device are you using?
Pinephone PMOS CE
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v21.06
-
v21.12
On what environment did you encounter the issue?
Phone environments
-
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway)
Other
-
No environment -
GNOME -
KDE Plasma -
Kodi -
MATE -
Shelli -
Sway -
Weston -
Xfce4 -
fbkeyboard -
i3wm -
Sxmo (Xorg/Dwm)
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device
What's the build date of the image? (in yyyy-mm-dd format)
Unsure, I installed it a couple months ago.
Additional information
Looking at the mount output of my Arch desktop I see:tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=409600,inode64)
, so presumably something like this would be the solution.
I noticed the issue because Megapixels writes large files to /tmp and fails to clean them up. As a consequence the file system filled up completely and the device became unusable. Luckily I could figure out the cause and recover using SSH.