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.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free.
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?
It seems your sources folder has taken all the space, after you untar an archive and build and install it are you removing the untared folder? if not this would help.
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.
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.
Really? That big? - Wow never noticed as I always use a big old partition just in case! You live and learn!
If you activate all the available options and make them modular there's a whole lot that needs to be build nowadays
I did mention that the book was wrong, but I do wonder if the authors had a reasonably tuned kernel in mind. Building a lean and mean kernel is part of the LFS build after all
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.