0

My /tmp directory got corrupted. Things got scary for a while and I was unable to boot :-(. I have now got myself back to a working system by renaming the corrupt /tmp to /tmp.old, and creating a new /tmp:

drwxrwxrwt   6 root root       4096 Nov 29 13:44 tmp
drwxrwxrwt   4 root root 1013628928 Nov 29 13:49 tmp.old

I forced an fsck at reboot, and I expected that might fix things. It seemed to go ok, but if I attempt to look at or remove /tmp.old, ls or rm commands just hang and don't return any thing. How do I get rid of /tmp.old and make sure there are no other problems?

2 Answers 2

2

The solution to this turned out to be a little different to what I was expecting. After I asked this question my /tmp directory "corrupted" two more times.

I finally figured out that actually it wasn't corrupt at all. It was just full of an enormous number of files (symlinks actually). So full in fact that ls would hang for a considerable time (over a minute) whilst it was processing the index before it would start doing anything. My system wouldn't boot because part of the start up process is to clear out /tmp, and it was getting stuck at this point. I never got the rm command to return at all even after waiting for a very long period of time. After doing some online research I eventually came across this command:

cd /tmp
sudo find . ! -path . -delete

This seemed to work faster and only took an hour or so!!

That sorted out the /tmp directory. The reason it was filling up was to do with printing. If I attempted to print something then that triggered the problem (although this wasn't immediately obvious as it took a while for /tmp to fill up). However looking at the symlinks that were being created, I noticed that they were all pointing at a ppd file for my printer. I deleted and reinstalled my printer using the hp-setup program (it's an HP printer) - but that didn't solve the problem. However deleting and manually setting up the printer without using hp-setup did. Not sure if this is a problem with hp-setup, my printer driver or cups...but it now works.

0

Live boot into Ubuntu and remove it

You must log in to answer this question.

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