[SOLVED] I want to build linux from scratch.how many space is suitable? 3.5G?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to build linux from scratch.how many space is suitable? 3.5G?
Recently,I am building my linux system from scratch. Now,I am going to build a temporary system.But my lfs partition only have 3.5G.
I want to know should I enlarge this partition?
how many space is suitable?
Chapter 2 would appear to answer your question ... as LFS requires you to follow instructions closely, I would suggest you start at the beginning:
Quote:
A minimal system requires a partition of around 4 gigabytes (GB). This is enough to store all the source tarballs and compile the packages. However, if the LFS system is intended to be the primary Linux system, additional software will probably be installed which will require additional space. A 10 GB partition is a reasonable size to provide for growth. The LFS system itself will not take up this much room. A large portion of this requirement is to provide sufficient free temporary storage. Compiling packages can require a lot of disk space which will be reclaimed after the package is installed.
When I do gentoo installs I end up with about 12GB of usage by the time that I have X and a window manager. The /usr/share/doc/ folder is probably 4GB of that. So it will likely depend on how much of a system you want to have. On my debian systems I do about 40GB, but I edit audio files that can be 4GB in size (hour long concerts at high sampling rates). And applications like audacity makes copies of the original and each edit (undo history) in /tmp/. So even 40GB with 30GB free can be quite tight in some cases. As in export every two edits so you can close and reload with the edited file and have a shorter undo history.
grail's post deserves a big asterisk. I have not tried LFS, but I have read the book. It answers all such questions before they are asked. It is a very good idea to read the entire book at least once before beginning.
I compile kernel, games, programs, and libraries.
Even with all that source code present simultaneously, plus my own work on some 10+ projects and some hundred copies of that source code, I only use about 32GB. That is consistent.
With 3.5GB you could still give it a try.
If it runs out of space, it will stop compiling.
To get the space back
>> make clean
If anything got tight, just tar /usr/doc to a memory stick (probably can leave it there as most of it is boilerplate disclaimers and another copy of the same license document).
Look for internationalization files you don't use. Unless you plan on learning a foreign lanugage most of them can go.
Cut your logs down to one recent copy.
Free up /tmp memory. Many programs leave junk there.
Investigate caches in KDE and other programs. These will be wasting the most space.
All caches can be cleared or deleted.
Create a new user to do the compiling and never have that user start an X-window program.
Then tar all the other users (and their program caches in .xxx directories) out to a memory stick for the duration of the compiling.
It is not that compiling uses so much disk space, it is all the developers that waste your disk space for their program.
Last edited by selfprogrammed; 08-03-2014 at 09:30 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.