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.
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.
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
LFS Derailing from it's goals?
Quote:
Building LFS produces a very compact Linux system
When you install a regular distribution, you often end up installing a lot of programs that you would probably never use. They're just sitting there taking up (precious) disk space. It's not hard to get an LFS system installed under 100 MB. Does that still sound like a lot? A few of us have been working on creating a very small embedded LFS system. We installed a system that was just enough to run the Apache web server; total disk space usage was approximately 8 MB. With further stripping, that can be brought down to 5 MB or less. Try that with a regular distribution.
I'm currently wrapping up a 7.10 build. I noticed that the virtual disk image is 1.8GB and decided to see if that was just due to source inflates. I ran:
Code:
du /{bin,sbin,usr,etc,lib} -h -c
The total was 709MB. What on earth is causing so much bloat?
Not only this, but systemd's inclusion left a few parts in the main LFS section. You could probably trim them out and it'll be below size, plus if you can trim the kernel correctly and remove bloat drivers you don't need and move things modular it might be smaller, though you might need an initramfs.
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Original Poster
Rep:
It appears to be docs. I tend to keep my sources on a separate partition until the system is complete. 300MB is in /usr/share/doc. I guess I need to dig into man pages and see how it actually works. (I currently do not.) All I actually want on the system is the man pages. API docs are pointless to me in these days. I'd rather go look at the official project site for API docs, or github itself if necessary.
I'm currently wrapping up a 7.10 build. I noticed that the virtual disk image is 1.8GB and decided to see if that was just due to source inflates. I ran:
Code:
du /{bin,sbin,usr,etc,lib} -h -c
The total was 709MB. What on earth is causing so much bloat?
I just finished installing most major BLFS packages, and my disk usage of the dirs you referred to stands at 2.8 GiB. The base CLFS install, plus some extra packages from BLFS, adds up to 710MiB. I must add, though, that I don't include some CLFS packages and add some of my own, so it isn't a vanilla install. /usr/src/kernel (4.4.27) itself is over 1 GiB, while I have KDE, QT, Firefox, Chromium, JDK, GNOME, a non-PIE/non-stack-protector install of GCC with go, fortran, obj-c,c++, etc. in /opt, which is hell of a lot more. Yes, base installs take up a lot more disk space now, but I think that is to be expected.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.