LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 10-28-2016, 01:36 PM   #1
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
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?
 
Old 10-28-2016, 08:53 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,446
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
LFS Derailing from it's goals?

The kernel source is pretty big now... upward of 600 megs.
 
Old 10-29-2016, 09:14 PM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.
 
Old 10-30-2016, 05:33 PM   #4
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
LFS learns you to build a system.
After you've build it, you can trim it down.
But it is true that it all got bigger the last few years.
 
Old 10-30-2016, 06:54 PM   #5
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Original Poster
Rep: Reputation: 167Reputation: 167
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.
 
Old 10-30-2016, 08:56 PM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,446
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
You can gzip man pages, which may help save even more space.

You could probably also remove most of the stuff under /usr/share/locale.

Your post above made me curious, so I investigated...

On my system (a stock, full Slackware installation):

- /usr/doc is almost 1 gig
- /usr/share/locale is also almost 1 gig
- /usr/man is 92 megs
- There are 978 copies of the GPL2 under /usr/doc!
 
Old 11-01-2016, 05:32 AM   #7
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
Quote:
Originally Posted by Luridis View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 members derailing the thread with trolling behavior nec207 LQ Suggestions & Feedback 13 07-26-2011 07:10 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
What are your goals in Linux? bartonski General 29 10-15-2009 12:50 AM
LFS help with understanding LPI goals crAckZ Linux - Certification 2 09-05-2005 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration