Out of space while bulding Linux kernel

Posted on

Problem :

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-2.6.39.3# 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

Solution :

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

— ( 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.