5

I recently created a RAM /tmp by adding this to /etc/fstab:

tmpfs /tmp tmpfs rw,nosuid,nodev,noatime   0    0

Everything works fine, and in theory the system runs faster now, but at boot time /var/log/syslog gets:

… tmp.mount: Directory /tmp to mount over is not empty, mounting anyway.

This situation seems inevitable, as there is never an opportunity to remove files from the filesystem version of /tmp.

The wasted space is trivial, but as a matter of interest, is there any easy way to clean out the junk hidden under the /tmp mountpoint?

0

2 Answers 2

10
mkdir /mnt/root
mount --bind / /mnt/root

This will mount your root partition in /mnt/root. Current mountpoints are not affected, so when looking in /mnt/root, you will see the original directory contents.

1
1

The 'easy' way is to boot from a Live USB/CD. Then, your mount won't have happened.

You must log in to answer this question.

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