PDA

View Full Version : tmp is out of space



dinosoep
03-02-2011, 10:37 PM
I am trying to install truecrypt on my knoppix install.
I wasn't able to download the setup from the truecrypt site, iceweasel stating that I had not enough space on /tmp/*random dir*
my tmp dir is only 1mb...

so I used wget, downloaded succesful (to the /tmp dir without any problems) while that setup file is > 1mb ...

then I tried to install and the install states tail: write error: No space left on device

are the two errors related to eachother?
if not, how can I fix the first and the second error?
if they are related, what's messed up this time? :p

I am running knoppix 6.4.4 or 6.4.3, don't really know. it's the cd and I installed to usb.
the only real big change was replacing sysvinit with upstart and using squashfs instead of cloop,...

kl522
03-02-2011, 11:31 PM
The /tmp directory is mounted by /etc/init.d/knoppix-autoconfig as a 1GB tmpfs ( look for it in the shell script ). It's not 1 MB - well unless newer version of Knoppix Klaus Knopper decided to change it - which I doubt so.

Do a 'du -s /tmp' or 'df' to see it is currently used closed to its 1GB limit.

If it is closed to being full, perhaps you can try to purge some leftover temporary files there to free up space. Otherwise, you can change /etc/init.d/knoppix-autoconfig to increase it's size ( effective next boot ) - at the expense of memory/virtual memory.

Second error might or might not be related to first, it all depends on trueCrypt, where it is writing to. Perhaps you can do 'df' to check.

Forester
03-03-2011, 12:38 AM
Hi dinosoep,

You've run out of something somewhere. Probably memory as kl522 suggests. Do df -h. in a terminal / console.

I count six entries that are tmpfs entries. These are all in virtual memory. Unlike the old ramfs, the amount of memory each uses grows and shrinks as files are created and deleted on them. The 'Avail' column is the maximum size each could grow to. That one of them (/tmp) is full is more likely to be because you have run out of memory than you've actually written 2.0 G of junk in there.

Type in free. That gives you a quick idea of how much virtual memory you have left. Is your machine one with less than 1 Gb of RAM ? Have you no swap ?

If /tmp contains a lot of stuff relative to how much memory you have, reboot.

How big is your persistent store and how full is that ? Look for the entry /KNOPPIX-DATA in the output of df -h. When you install something, that something ends up here. The install might fail because this file system is full. If it 100 % full, try to uninstall truecrypt to recover what free space you had before.

Then type in sudo du -hs /KNOPPIX-DATA/*. If you've a lot under /home then it is time you did some house keeping. If you've a lot under /var you might try finding out what is taking up the space, delete it and reboot. If you've a lot under /usr, /lib, /opt or the other directories then you either need to uninstall something you've installed recently or it is time to remaster again.

dinosoep
03-03-2011, 07:29 AM
the outputs I get are:


knoppix@Microknoppix:~$ free
total used free shared buffers cached
Mem: 2026404 918240 1108164 0 82012 627096
-/+ buffers/cache: 209132 1817272
Swap: 0 0 0
knoppix@Microknoppix:~$ du -s /tmp
32 /tmp
knoppix@Microknoppix:~$ df /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
overflow 1024 36 988 4% /tmp
knoppix@Microknoppix:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdc1 7.7G 6.2G 1.5G 81% /mnt-system
tmpfs 2.0G 0 2.0G 0% /ramdisk
/dev/loop0 561M 561M 0 100% /KNOPPIX
/dev/loop1 2.0G 605M 1.4G 31% /KNOPPIX-DATA
unionfs 2.0G 605M 1.4G 31% /UNIONFS
unionfs 2.0G 605M 1.4G 31% /home
tmpfs 990M 4.0K 990M 1% /UNIONFS/lib/init/rw
tmpfs 10M 420K 9.6M 5% /dev
tmpfs 990M 4.0K 990M 1% /dev/shm
overflow 1.0M 36K 988K 4% /tmp
/dev/sdb1 7.4G 100M 7.4G 2% /media/sdb1
/dev/sda3 149G 99G 50G 67% /media/sda3


what's strange about that is that I don't see tmpfs but overflow there...

dinosoep
03-03-2011, 07:33 AM
It seems to me that knoppix-autoconfig is never called, could this be the case?
because after I installed upstart I never saw that green progressbar again, and I think thats one of the things knoppix-autoconfig does.

Forester
03-03-2011, 02:56 PM
It seems to me that knoppix-autoconfig is never called, could this be the case?
because after I installed upstart I never saw that green progressbar again, and I think thats one of the things knoppix-autoconfig does.

Yup, I think that's your problem. I see your /dev is a tmpfs instead of udev. If you do an ls -l / I think you'll find there are no (or only a few) symbolic links to /UNIONFS.

So knoppix-autoconfig does not get run. So there's no tmpfs mounted on /tmp. It's still just a directory on the read-only squashfs. So Linux says there is not enough tmp space to login so it creates the emergency tmp file system of 1 Mb that you see.

The overflow bit means it is supposed to be able to overflow but I'm not sure where to. Firefox checks before downloading if there is enough space on /tmp. That's called being user friendly. On the other hand, wget isn't for quiche eaters so it doesn't check and it 'works'.

However, when you try to install truecrypt, the installer tries to write to /usr or whatever, which is still just a directory on the squashfs so the write fails with 'no space left on device'.

Knoppix 6 features the MicroKnoppix kernel which is faster than the old one because it tries to do things in parallel. I guess much of this parallelism is in knoppix-autoconfig. The upstart in an Ubuntu thing and it's relationship with what KK has done is likely to be tenuous. I read somewhere that Debian considered using it for Squeeze. However, the release notes talk about Dependency Booting. I think that is used by Knoppix 6.

The problem wtih upstart is Canonical's controversial contributor agreement (http://en.wikipedia.org/wiki/Canonical%27s_contributor_agreement) (see http://en.wikipedia.org/wiki/Canonical%27s_contributor_agreement). So whatever you do, don't change anything. I've read RedHat have used it but are busy writing their own.

In the short term, take out upstart. In the medium term, read up on sysvinit and find out how KK uses it and read up on upstart and how to migrate from sysvinit to upstart.

Start a thread and let us all know how you get on. I suspect your resolution hangs on the line:


si::sysinit:/etc/init.d/knoppix-autoconfigin your /etc/inittab.

Since upstart is supposed to be backwards compatible with sysvinit it should be too hard for you to change Knoppix to be not-Knoppix. Just as long as you can figure out what KK has done and why. :cool:

dinosoep
03-03-2011, 05:06 PM
for start, let's try to fix it :p
uninstalling upstart did not help the issue, I guess the bootup scripts are now back to default.
what files can I remove from knoppix-data to repair this mess?

dinosoep
03-03-2011, 08:23 PM
hey,
I only ran sudo sh knoppix-autoconfigure and my cleanup.sh script(just apt-get autoremove, apt-get autoclean, deborphan,.......) and it removed a package. after that everything worked fine :D

Forester
03-04-2011, 09:20 AM
after that everything worked fine :D

Well done.

You get the green bar during startup that shows udev is probing you hardware ? The output of df -h looks good ? When you ls -l / you see symbolic links to UNIONFS for bin, boot, etc, lib, opt, root, sbin, usr and var ?

So you have rebooted a couple of times and it still works fine ? You can copy a file of significant size onto your tmp file system ? You checked that you can save files to persistent store and they are still there after reboot ? You tried installing and removing software ?

Are you still running with upstart or has that been removed ?

dinosoep
03-06-2011, 06:54 PM
I get the green bar, the startup sound.
I can download and install everything, truecrypt worked fine.
But I have completely removed upstart and replaced with sysvinit