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.
This chapter shows how to build a minimal Linux system. This system will contain just enough tools to start constructing the final LFS system in Chapter 6 and allow a working environment with more user convenience than a minimum environment would.
From Chapter 5:
Quote:
The overall goal of Chapter 5 is to provide a temporary environment that can be chrooted into and from which can be produced a clean, trouble-free build of the target LFS system in Chapter 6. Along the way, we separate the new system from the host system as much as possible, and in doing so, build a self-contained and self-hosted toolchain. It should be noted that the build process has been designed to minimize the risks for new readers and provide maximum educational value at the same time.
From Chapter 6:
Quote:
In this chapter, we enter the building site and start constructing the LFS system in earnest. That is, we chroot into the temporary mini Linux system, make a few final preparations, and then begin installing the packages.
When you finish chapter 5 you have all the necessary components for building LFS in chapter 6 totally independent from your host system... look at it this way:
in chapter 5 you built bash 3.2 with the tools gcc, make, and others which are installed in your host system in /usr/bin or equivalent... but remember that you used ./configure --prefix=/tools right??
That means that when you chroot into /tools in chapter 6 when you issue bash, it will not open /usr/bin/bash in your host but in the mini linux that you created...
that way when you create your LFS you dont do it with the tools of your host but from your mini-linux that you created in chapter 5...
in short:
Quote:
Along the way, we separate the new system from the host system as much as possible, and in doing so, build a self-contained and self-hosted toolchain.
from chapter 6:
Quote:
From this point on, there is no need to use the LFS variable anymore, because all work will be restricted to the LFS file system. This is because the Bash shell is told that $LFS is now the root (/) directory.
let me add that bash will now look for all the executables in $LFS/tools/bin BY DEFAULT now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.