I have been using Ubuntu on my Oracle Virtual Box for a while. Recently, I have resize the hdd from 8GB to 16GB because it was full, and for some reasons, Guest Addition is not working anymore. So I removed the old Guest Additions, downloading Guest Additions 4.2.12, but I cannot install it. Below is the error message:

/media/isos$ sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.12 Guest Additions for Linus
Not enough space left in /tmp (1024 KB) to decompress ./VBoxLinuxAdditions.run (8920 KB)
Consider setting TMPDIR to a directory with more free space.

Please help me fix this.

  • Do you have a separate /tmp partition? – jobin Mar 6 '14 at 17:55

When you resized the drive that doesn't make the partition any bigger. You need to resize the partition. You can easily do this with gparted.

In terminal type "sudo apt-get install gparted", then run gparted, and right click on the os partition. You will see an option to "resize/move", choose that, and then drag the arrow over to use all the free space.

Also you should not use new guest addons in an older version of virtualbox, the versions should be matched.

  • Thank you very much for your answer. I cannot run gparted though. Probably because my OS is at low-graphics mode. Can I resize the partitions using terminal? – Nam Thai Mar 6 '14 at 4:32
  • To be specific, the error code is: (gpartedbin:2475): Gtk-WARNING **: cannot open display: :0 – Nam Thai Mar 6 '14 at 4:58
  • Sorry but I'm not familiar with any cli partition methods in Ubuntu, though I'm sure there are many. Try launching gparted with gksu. "gksu gparted". – mango Mar 6 '14 at 5:07

Assuming you have ext2/ext3/ext4 it's quite easy.

Use mount to see on which partition your / is mounted (lets assume /dev/sda1)


sudo resize2fs /dev/sda1

is all you need. It will extend the filesystem to the size of the partiton. You can even do it on the running system (although having a backup ready is always good advice :-))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.