General: How to Fix Ubuntu 10.04 /tmp Clearing Bug
Posted on 2011-04-21 @ 20:23:53 by r00t

Well - really, this is a hack, not so much a fix - so read on if you dare!

Alright - so I updated my Ubuntu workstation to 10.04 LTS, and noticed (I guess I hadn't checked before) that on boot, it complained about /tmp being out of space. WTH? Wasn't it supposed to be cleared on reboot? Doing some research, I found that this was a known bug, but without a known fix:

I started trying some of those things listed in that thread - then I tried the second to the last entry, rebooted and...

...and my boot locked up solid!!! ARGH!

So, after pulling out my hair wondering WTF just happened, I pulled out an old 8.10 boot CD, started it up, then mounted the /boot filesystem, changed the file back to what it used to be, and re-booted. Things came back up, everything was happy - so I looked around for what was happening. Well - I guess from these threads:

The reason is because (well, in my case) I have /tmp on a separate partition; when /etc/init/mounted-tmp.conf runs, it uses find in the deletion process, but at that point /usr isn't mounted (find is located in /usr/bin). According to the above threads, the trick is to copy find to /bin (which is available) - and magically things will work.

I didn't like this idea, mainly because I wasn't sure which find would be used, and if find ever was upgraded/patched, which one it would use, etc - so I copied find over to a new name (binfind), then modified mounted-tmp.conf to use binfind. This way, the only software using this copy of find would be that script, but everything else using regular find would run it from /usr/bin.

What they need to do is put find in /bin as a matter of the standard spot for the distribution, no matter what. That, or fix the issue that locks the boot process when you try to keep /usr mounted.

...or something. Ugh - at least /tmp is clearing now...sigh.

Share This Article


Questions or Comments?

If you have any questions or comments about this article, please contact me...

0 comment(s) posted
Post New Thread