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.
I've just started chapter 6. I decided I'll install dpkg/apt instead of coming up with my own system. Should I do that now or when everything is in place? I'm using this hint, but specific tips or instructions would be helpful too.
Package managers such as dpkg or RPM keep a database of installed packages. Based on my experience playing around with packages managers on my CLFS systems, the base system packages need to be in that database or the package manager attempts to pull them in later to satisfy dependencies. Scanning the hint, it looks like the intent is to install dpkg after building the base system. However, it also looks like the intent is really to create your own deb files rather than use pre-built deb packages from the internet. There may be a discussion about convincing dpkg that base system packages are installed. I just may not have seen it.
I guess you're going to make me read the entire hint. When you're finished with the LFS book, you have a base system. At this point implement the hint. When you're finished with the hint, you can start installing packages from BLFS using dpkg to create .debs.
Sorry, it's not that I want to make you read the entire hint, it's just that I didn't exactly understand what "base system" meant. Thanks for your help.
Sorry, it's not that I want to make you read the entire hint, it's just that I didn't exactly understand what "base system" meant. Thanks for your help.
I usually do this at the start of chapter 6 have you have charooted into the $LFS system, I install pkgtool though, I love it so much! but lets not go into package manager wars.
I do this at the beginning of chapter 6 because it allows me to build a database of even the base system, so it i need to change one minor thing its easy to rebuild a known package cause i can just uninstall that one and not worry about what flags i used to build it with.
I don't think you need to finish LFS, that's a matter of taste. You can start installing pkgtool as soon as you chrooted. I'd rather have a stable and checked base system (weibullguy's answer) before adding anything else though.
Remember to add (e)glibc, gcc and such to your package manager "ignore" list, importing a prebuilt c library into a LFS system defeats the purpose of building your own
thats what i did. tho mainly because i couldn't decide how to implement it. Most (but not all) of the packages have the ability to be uninstalled if you still have the source.
as its LFS you will need the source code to install anything anyway...
thats what i did. tho mainly because i couldn't decide how to implement it. Most (but not all) of the packages have the ability to be uninstalled if you still have the source.
as its LFS you will need the source code to install anything anyway...
This is true, but if you wanted to build your own distro off of LFS then you will still require a package manager.
When I try to install apt using dpkg, I get that the package architecture doesn't match the system's (I don't have the exact message right now). I'm sure the package and the system are both i386, but the odd thing is that the error message didn't say my system arch. It said something like this:
OK, I found out that I can use --force-architecture and install dpkg through dpkg and then the problem should be solved. But it seems that it doesn't recognize the libraries I installed from source. For example, it tells me that it needs coreutils installed, and it's obviously installed, just not from a .deb. How to solve this?
Like *all* package managers dpkg keeps a database of installed packages. I believe dpkg uses a text file for this purpose. Like I said in my other post, you need to add the base system packages to this database so dpkg doesn't try to pull in these for dependencies. I don't use dpkg, never have, and probably never will. I'm sure if use the great Google, you'll be bale to find a discussion of how to edit this database.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.