0

I'm running Ubuntu 22.04 (Jammy Jellyfish, ARM64) on a Raspberry Pi. After imaging the Pi's SSD, I re-partitioned the drive and mirrored the contents of /var onto the new partition (verified), renamed the original /var to /var.old before making a fresh, empty /var directory for use as a mount point. The appropriate change was made to fstab and everything was working exactly as expected after several re-boots into the SSD's Ubuntu. Afterwards, I booted the Pi using a microSD card and mounted /dev/sda2 (Ubuntu's root on the SSD) to find a populated fontconfig directory under the SSD's otherwise empty /var. This leads me to believe that something (a script or systemd, maybe) is writing to the mount point directory shortly after the root is mounted, but before the intended partition for var is. Please note that the partition which eventually gets mounted at /var also has it's own fontconfig directory, which differs in its contents from the otherwise empty mount point folder's. I'm somewhat new to Linux in general, and have no idea where to begin looking. Search engines haven't returned anything useful. Having a dedicated partition for /var is, to my understanding, a very standard configuration in Linux. My question: Is there a way to make sure nothing gets written to /var until the bespoke partition is mounted? Thanks in advance.

1
  • don't use /var as its own partition. If this is for mysql/maridb or apache/nginx or logfiles or printing history: each of these can be setup to use another directory. It is nowadays more ideal to have a / and a personal partition and point software to that partition
    – Rinzwind
    Commented Mar 17 at 15:08

1 Answer 1

1
sudo systemctl disable fontconfig-regenerate-cache.service

is a workaround. But you'll have to re-generate your font cache manually when necessary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .