LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS base and package manager (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-base-and-package-manager-4175711089/)

qasim799 04-21-2022 05:43 PM

LFS base and package manager
 
Hello everyone, i am planning to build LFS and it's my first time so i have no experience kindly clear out some things.
1- what is the base of LFS or lfs itself is a base does it depends on your host distro? Like if i use ubuntu then it will be deb based?
2- which package managers can be installed in LFS like apt, pacman or snap? How softwares are installed in .deb or arch method?

wiigelec 04-22-2022 10:20 AM

1 - lfs is the base
2 - packages are installed by compiling from source, which is the whole point of lfs. if you’re looking for a package management system then look elsewhere

https://www.linuxfromscratch.org/lfs...08/pkgmgt.html

boughtonp 04-22-2022 10:20 AM


 
LFS is From Scratch - i.e. there is no base. The host system just provides the starting tools.

Your second question is answered in the FAQ: https://www.linuxfromscratch.org/lfs/faq.html#why-not-package-management


Given those questions, what you state in your other thread is incredibly optimistic:
Quote:

Originally Posted by qasim799 (Post 6346513)
Thanks for your help, Yes we are doing alot more than LFS, LFS is just a base we gonna add a lot more features, apps , DE integration and optimize it so it gives better performance than current distros

Following LFS to create your own OS is one thing. Creating a Linux distribution is a huge amount more work than just doing that.

Likewise, depending on what you mean with "optimize so it gives better performance" - well tweaking config to match your hardware is fine; if your plan is to compete with the likes of Red Hat... that is over-ambitious, given your apparent current experience/skillset. :/

Ambition is fine, but learn to walk before you start planning multiple ultramarathons.


hazel 04-22-2022 10:25 AM

Some LFS devs have created package managers to help update their system. There's a chapter in the Book about it, which you might want to read.

qasim799 04-22-2022 11:03 AM

Quote:

Originally Posted by boughtonp (Post 6347948)
LFS is From Scratch - i.e. there is no base. The host system just provides the starting tools.

Your second question is answered in the FAQ: https://www.linuxfromscratch.org/lfs/faq.html#why-not-package-management


Given those questions, what you state in your other thread is incredibly optimistic:


Following LFS to create your own OS is one thing. Creating a Linux distribution is a huge amount more work than just doing that.

Likewise, depending on what you mean with "optimize so it gives better performance" - well tweaking config to match your hardware is fine; if your plan is to compete with the likes of Red Hat... that is over-ambitious, given your apparent current experience/skillset. :/

Ambition is fine, but learn to walk before you start planning multiple ultramarathons.


Actually it's my Bachelors in IT degree project and i have 1 year to do this so i have plenty of time for learning required skillset, right now i am just planning things. Basically the project aim is to recreate a linux distro for low spec PCs which is lightweight and gives better performance metrics.
Talking about distro there's another approach called remastering an existing distribution using tools like suse studio, linux respin. Is that a better way to create a lightweight distro which gives better performance (memory ,I/O operations, Cpu and GPU benchmark scores) than other distros like ubuntu, if i debloat it, remove packages as much as possible, use xfce and optimize kernel of an existing distro like debian/ubuntu instead of using lfs approach?

wiigelec 04-22-2022 11:09 AM

distros are a tradeoff between “debloat” and the ability to run on multiple hardware systems, you have to pick one or the other. the tradeoff with lfs is that it is specifically tailored to run on one hardware system.

qasim799 04-22-2022 11:50 AM

Quote:

Originally Posted by wiigelec (Post 6347957)
distros are a tradeoff between “debloat” and the ability to run on multiple hardware systems, you have to pick one or the other. the tradeoff with lfs is that it is specifically tailored to run on one hardware system.

Quote:

Originally Posted by hazel (Post 6347949)
Some LFS devs have created package managers to help update their system. There's a chapter in the Book about it, which you might want to read.

What would be better for my case in your opinion? LFS or remastering?
I think it's hard to integrate apt in lfs cause it will give massive errors of dependencies and integrating app store like snap seems impossible. And after doing all hectic lfs building it may not give the performance metrics I'm hoping for

qasim799 04-22-2022 11:51 AM

Quote:

Originally Posted by wiigelec (Post 6347957)
distros are a tradeoff between “debloat” and the ability to run on multiple hardware systems, you have to pick one or the other. the tradeoff with lfs is that it is specifically tailored to run on one hardware system.


What would be better for my case in your opinion?

boughtonp 04-22-2022 11:56 AM

Quote:

Originally Posted by qasim799 (Post 6347955)
Actually it's my Bachelors in IT degree project and i have 1 year to do this so i have plenty of time for learning required skillset

Yeah, I made the mistake of thinking I had plenty of time too, and my project was significantly simpler than what you're proposing.

Remember that your research/writeup of what you do/discover is at least as important as the software itself, that you'll have other work to do during the year, and may well have random unexpected interruptions.

Talk to your project tutor and take heed of their advice - they (hopefully) know your capabilities better than anyone here, and should help you with setting an appropriate scope for the project. Also, if you don't understand/agree with them, make sure you talk about it until you're both on the same page.


Quote:

Basically the project aim is to recreate a linux distro for low spec PCs which is lightweight and gives better performance metrics.
...distros like ubuntu
You need to spend more time researching lightweight distros - you should not be considering Ubuntu, you should be comparing with AntiX, TinyCore, Alpine, Damn Small Linux, etc.

Understand what the focus/differences of those are, as well as the similarities, and see if there may be a meaningful niche you can fit into.

Ideally you should have a basic understanding of those before you talk to your tutor.


wiigelec 04-22-2022 12:00 PM

since it’s a bachelors project, i personally would be looking to duplicate something that already exists rather than create something that developers with decades of experience struggle with.

personally i would look to create a basic linux installation with a base system, a window manager, and a web browser, then build a live usb iso that works on a couple similar hardware configurations. lfs will work great for this and you’ll learn much about the inner workings of the system and some of the tradeoffs involved in developing a distro.

but that’s just what i would do knowing what i know now, and i haven’t been in college for over twenty years so i can’t really say what you should do. what does your advisor say?

qasim799 04-22-2022 12:18 PM

Quote:

Originally Posted by wiigelec (Post 6347970)
since it’s a bachelors project, i personally would be looking to duplicate something that already exists rather than create something that developers with decades of experience struggle with.

personally i would look to create a basic linux installation with a base system, a window manager, and a web browser, then build a live usb iso that works on a couple similar hardware configurations. lfs will work great for this and you’ll learn much about the inner workings of the system and some of the tradeoffs involved in developing a distro.

but that’s just what i would do knowing what i know now, and i haven’t been in college for over twenty years so i can’t really say what you should do. what does your advisor say?

Advisor is not restricting me to lfs, she's allowing to follow any approach but it should fullfil the objectives which is a lightweight linux distro with basic functionalies like OS should respond to system calls for programming IDEs like visual code, having minimal apps, an app store and smooth lightweight UI (XFCE) good CPU usage, less ram intensive. To make it useful for 4-5th gen potato lab PCs so students can perform programming/learning tasks replacing the windows and heavy distros like ubuntu, pop, manjaro

qasim799 04-22-2022 12:26 PM

Quote:

Originally Posted by boughtonp (Post 6347969)
Yeah, I made the mistake of thinking I had plenty of time too, and my project was significantly simpler than what you're proposing.

Remember that your research/writeup of what you do/discover is at least as important as the software itself, that you'll have other work to do during the year, and may well have random unexpected interruptions.

Talk to your project tutor and take heed of their advice - they (hopefully) know your capabilities better than anyone here, and should help you with setting an appropriate scope for the project. Also, if you don't understand/agree with them, make sure you talk about it until you're both on the same page.



You need to spend more time researching lightweight distros - you should not be considering Ubuntu, you should be comparing with AntiX, TinyCore, Alpine, Damn Small Linux, etc.

Understand what the focus/differences of those are, as well as the similarities, and see if there may be a meaningful niche you can fit into.

Ideally you should have a basic understanding of those before you talk to your tutor.


Yes you pointed me to right direction about ubuntu, now I'm thinking to remaster debian as it will fulfill my project objective rather than struggling with lfs which can be troublesome since it's only for the PC you build it on and can't be made into a bootable iso for other hardware also it will require alot of working for basic functionalies like a package manager and app store, so starting from something having a strong base like debian seems to be a good way

boughtonp 04-22-2022 04:36 PM


 
Debian can be a reasonable base, but not its default Gnome Desktop Environment which is relatively heavy.

AntiX is a Debian derivative with just a Window Manager (or even no X/GUI at all), systemd removed, and some other changes.

MXLinux is a Debian/AntiX derivative that uses Xfce.

Both MX Linux and AntiX can use MX Snapshot which can remaster the running session into a new ISO - potentially useful for creating something specific to install on the lab PCs.


qasim799 04-23-2022 01:43 AM

Quote:

Originally Posted by boughtonp (Post 6348013)
Debian can be a reasonable base, but not its default Gnome Desktop Environment which is relatively heavy.

AntiX is a Debian derivative with just a Window Manager (or even no X/GUI at all), systemd removed, and some other changes.

MXLinux is a Debian/AntiX derivative that uses Xfce.

Both MX Linux and AntiX can use MX Snapshot which can remaster the running session into a new ISO - potentially useful for creating something specific to install on the lab PCs.


Do you know any good methodologies and tools for remastering? Like which packages can be removed safely.
Yes gnome is pretty heavy, If i use debian I'll choose xfce, and don't you think so starting from antiX would not be considered as work done from my side since it's already debloated and lightweight i mean which things i have to change if respin antiX

boughtonp 04-23-2022 06:52 AM

Quote:

Originally Posted by qasim799 (Post 6348088)
Do you know any good methodologies and tools for remastering? Like which packages can be removed safely.

Nope, it's something I've considered a few times but not actually done yet. That might be something worth raising a distinct topic to ask - either in antiX / MX Linux section, or in a non-distro-specific forums to increase the exposure.

Quote:

don't you think so starting from antiX would not be considered as work done from my side since it's already debloated and lightweight i mean which things i have to change if respin antiX
Well that's the challenge, if you pretend it doesn't exist, you'd probably get marked down for insufficient research, but you probably wont get marks for just copying/duplicating effort either, and I don't know if there's any/enough generalized things in AntiX/MX that you could optimize for your target environment.

Maybe a project that sets out what the aims are, then explores/analyses the different potential base distros, what the pros/cons of each would be, describing how you determine the suitability, and so on - but I don't know if that could be made "meaty" enough.



All times are GMT -5. The time now is 08:40 PM.