LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-16-2021, 03:41 AM   #1
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 349

Rep: Reputation: 60
Query about LFS packages.


Hi,


I would like to know - what are the minimum number of packages that go into a LFS project to get a bare minimum runnable system.

I ask this because the LFS docs specify a lot of packages, whereas on the other hand I've seen linux distros as small as 11mb (Tinycore) etc.

I just want a runnable system for a start, to which I intend to keep adding on functionality to, over time.

thanks.
 
Old 06-16-2021, 05:12 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,563
Blog Entries: 19

Rep: Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445
Very tiny distros typically use different software. For example they use busybox instead of coreutils and something like uclibc instead of glibc.

LFS used to provide very much the sort of system you have in mind, but that's no longer possible. Keep in mind the fact that LFS doesn't just provide a barebones runnable system; it also necessarily has to provide the tools for building everything else that you need. Modern build methods are much more complex than the old ones; for example a lot of builds now use meson/ninja rather then autotools, which means that you need Python3. Modern graphical software has a lot more dependencies too.

That's why I don't use LFS nowadays. The fun's gone out of it.
 
Old 06-16-2021, 07:27 AM   #3
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
You can compare the amount of packages on older LFS against newer versions.
Meson and ninja speed up the compilation of many packages you might need for a complete desktop.
You could build something like LFS-7.3 and upgrade gcc to 6.X and it still builds most stuff you might need and can be a base for a more recent LFS.
I have a lfs-6.8 aboriginal bootstrap I used to build lfs-7.3 with and upgraded it, my more recent builds are build on those or from their offsprings.
Once your system works, you only just began!
 
Old 06-16-2021, 08:06 AM   #4
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 349

Original Poster
Rep: Reputation: 60
Thanks for the input.


Quote:
The fun's gone out of it.
Ouch, sorry for that.

But adding more and more packages will make the system kind of bit bloated right ?
Can adding unnecessary packages be avoided in any way ?

I just want my LFS system to work in cli anyway.
 
Old 06-16-2021, 08:08 AM   #5
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
Just build a recent LFS and add what you need from BLFS, dependencies are listed in BLFS. If for some reason you find it to be bloated, do some research.
 
Old 06-16-2021, 08:12 AM   #6
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 349

Original Poster
Rep: Reputation: 60
Quote:
Just build a recent LFS and add what you need from BLFS, dependencies are listed in BLFS. If for some reason you find it to be bloated, do some research.
cool , okay.
 
Old 06-16-2021, 10:28 AM   #7
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
I saw two things: You want a system with only CLI and you want to avoid "bloat".

First. If you only want a cli system you can try out "busybox" which is a very small set of utilities for a functional system. Apart from that you will two other things: a linux kernel and a very small script file for booting the system. Those are three components that you need for your system. By creating a custom busybox, linux kernel and init script you should be very close to a few MB. I made one system like that and it weights less than 20MB.

Second. Even though the term "bloat" is objective, since it is considered to be "unnecessary software", what a user may consider so is not consistent across the users. You will need to find out what "bloat" is for you because if you would have already known what it is for you you would have already avoided it.

... And just as an extra: You can create such small system using LFS, but you need to know what software you need. In other words, read the LFS book and see what you need. At least a c library (glibc), a linux kernel, a compiler, and a set of utilities to control the system functions (util-linux, coreutils, etc).
 
Old 06-16-2021, 10:34 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,563
Blog Entries: 19

Rep: Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445
If you want really small space, don't use glibc. It's quite large and there are some less well-known alternatives. I think Debian use uclibc on their initrd images.
 
Old 06-16-2021, 12:14 PM   #9
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 349

Original Poster
Rep: Reputation: 60
@slac, you got that right. Since I am just starting out on LFS, I am presuming that I will be able to build a system which will be as trimmed down as it can be.

I happened to come across this link.

I intend to go about something similar in nature.

I was just looking forward for some advice, that's all.

I will go through the LFS book once again.

Thanks again.
 
Old 06-17-2021, 07:14 AM   #10
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
There are many ways you can create a system. Shared, static or hybrid. In the case of the default LFS system it has mostly built programs with shared libraries, that is the reason why you need a c library to compile the programs against. As another user already told you can, you can avoid glibc which is pretty big for other (uclibc).

By the way, it all comes down to how you plan to maintain your system. If you plan to maintain your system from within the system itself you will end up having the entire packages set from the LFS, that is the minimum for building most of the packages. It is not bloated, it is fairly well made for most of the cases. Just take a look at gcc if you plan to build software from such system, I think that is the biggest package from the LFS book.

If you create your system from another system (or toolchain) then I think you will do better.

The link that you shared is good, there are things there that I did not follow to create my system because they were not needed at all. But it is a good start, I can say that.

Goood luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
non Recursive query and Recursive query prashsharma Linux - Server 1 06-27-2007 09:33 AM
help with mysql query: return nth rows in query hawarden Programming 2 07-31-2006 06:36 PM
QUERY: is LFS LFS? kevingpo Linux From Scratch 7 09-23-2005 12:15 PM
LFS 3.2 book, but LFS packages 3.0 CragStar Linux From Scratch 2 04-07-2002 03:15 PM

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

All times are GMT -5. The time now is 06:04 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