Compiling the Linux kernel, how much size is needed?
On my recent AMD64 build of 4.4.0-57 on Ubuntu 16.04, I needed about 14.5 GB of space for the build outputs.
That seems a a lot and it seems that is mostly transiently needed files (e.g., .o
files resulting from compiling a .c
file).
Refer to this link >> https://ubuntuforums.org/showthread.php?t=2266609
I compiled/made linux kernel 4.0.0-rc1 on my HP Stream 13 (2GB RAM, dual core Intel Celeron N2840) based on the clear instruction on https://wiki.ubuntu.com/KernelTeam/GitKernelBuild, and this is my experience:
After the "git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" the disk in use in the separate kernel directory: 1691 MB
During the make/compile, the disk space in use went up to 15674 MB. So: more than 15GB ...
Total compile time was: 299 minutes, or 5 hours. Quite long, probably caused by my slow CPU and slow disk.
From Guide,
NOTE: If you do not have lot of disk space in /usr/src then you can unpack the kernel source package on any partition where you have free disk space (like /home). Because kernel compile needs lot of disk space for object files like *.o. For this reason the /usr/src/linux MUST be a soft link pointing to your source directory.