Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
LFS: Error during Linux-3.5.2 kernel compilation (LFS 7.2, Section 8.3)
I'm having a problem while compiling the kernel. I configured it, and closed as many options as I could (at least I think so). But when I try to build it I get an error that there isn't enough space. I have allocated about 4GB space for my LFS, because I read that just 2.8GB would be enough, but unfortunately I can't compile it. I attached some screenshots, just in order for you to see my problem. Please note that I'm using /mnt/lfs-full directory for my LFS. Also note that in my source directory I have deleted all the untarred folder, so the only untarred folder there is linux-3.5.2, the one of the kernel. Picture with Gparted shows the available space before compiling the kernel.
What if I compile the kernel in my host machine and then just copy the needed files over to my LFS directory?
Yes, after installing the tools, I remove the untared folder. At the moment the only untared folder is linux-3.5.2. If you also look at the picture with Gparted, there you can see the free space I have when linux-3.5.2 is untared. But I don't know why it takes that much space while compiling.
Distribution: Linux From Scratch, Slackware64, Partedmagic
I just had a look at my kernel folder after compilation and without doing a make clean ( so all the object files are still there ) the folder size is 779,780 bytes, looks like something is haywire, maybe some sort of recursion? Delete the unarchived folder and preferably the archive itself and try again ( you might want to keep the config file ).
The linux 3.5.2 build is +/- 5.8 Gb after a make (using defaults gathered by running make mrproper and starting and save/stopping make menuconfig).
The book mentions the size to be anywhere between 540 and 800 Mb, which is wrong.
You might consider the following to reduce the size of the kernel build and create extra disk space:
- unsetting the kernel options that you don't need,
- make the options static instead of modular,
- deleting all, but the linux package from your sources directory. After untarring the linux package, also delete this file.
Not sure if you are going to get it done with the amount of disk-space you have available.....
If the size of linux kernel is about 5.8GBs, I will never be able to get it. I have about 2.2GB of free space initially, even if I delete the packages in my source directory they will save about ~400MB. I also unsetted a lof of the options that I don't need. I even put it in my host machines /usr/src directory and did "make bzImage" command, and the created kernel image was about 3.4MBs. I will try the above mentioned methods and let you know. Thanks.