I am trying to build Linux kernel. I am getting out of space after a while. I unpacked it in /usr/src directory. It seems I have plenty of space. Can you please let me know what can be done about it. How much space does it need to compile & build kernel.

I am using VirtualBox.

root@vinay-VirtualBox:/usr/src/linux- df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             6.9G  3.2G  3.4G  49% /
none                  669M  640K  668M   1% /dev
none                  675M   24K  675M   1% /dev/shm
none                  675M   96K  675M   1% /var/run
none                  675M     0  675M   0% /var/lock
/dev/sr0               39M   39M     0 100% /media/VBOXADDITIONS_4.0.10_72479
  • 1
    if you're running out of space, obviously it needs more than 3.4GB! Jul 10, 2011 at 17:42
  • 1
    What is the exact error message? Out of disk space or out of memory space (=RAM+SWAP)?
    – Turbo J
    Jul 10, 2011 at 17:46
  • 1
    out of disk space
    – vinay
    Jul 10, 2011 at 17:48
  • 2
    @jcomeau_ictx: More than 3.4 GB? Not plausible. Jul 10, 2011 at 17:49
  • 1
    @jcomeau_ictx: A recent tarball on my disk: linux-source-2.6.32.tar.bz2, is 64M in size. Extracted it will be bigger, and during compilation it will generate intermediate files, and the the final .ko-files - in /lib/modules I find files of about 90M. In total you might need 200M or 300M disk space, but not 3G. Jul 10, 2011 at 21:17

2 Answers 2


I added a virtual disk to it & mounted it to /usr/src . It took about 6.5 GB to compile & build Linux kernel

-- ( comment)


Here are the statistics for a linux-3.19 compilation on ubuntu 14.04.3 LTS with no plus feature.

After I downloaded and decompressed it, without removing the compressed file, I had 2GB in use.

After the installation of gcc, make and after compilation (make and make modules), now I have 13GB in use.

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.