Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Linux from Scratch
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Requirements and procedure== A clean [[Disk partitioning|partition]] and a working Linux system with a compiler and some essential [[Library (computing)|software libraries]] are required to build LFS. Instead of installing from an existing Linux system, one can also use a Live CD to build an LFS system. The project formerly maintained the Linux From Scratch Live CD.<ref name="linuxfromscratch.org">{{cite web|url=http://www.linuxfromscratch.org/livecd/|title=LFS LiveCD Project Homepage|website=www.linuxfromscratch.org|access-date=25 May 2018}}</ref> LFS Live CD contains all the source packages (in the full version of the Live CD only), the LFS book, automated building tools and (except for the minimal Live CD version) an [[Xfce]] GUI environment to work in. The official LFS Live CD is no longer maintained, and cannot be used to build the LFS version7 or later.<ref name="linuxfromscratch.org"/> There are, however, two unofficial builds that can be used to build a 32-bit or 64-bit kernel and userspace respectively for LFS 7.x.<ref>{{cite web|url=http://clfs.org/~kb0iic/livecdupd/|title=Index of /~kb0iic/livecdupd|website=clfs.org|access-date=25 May 2018}}</ref> First, a [[toolchain]] must be compiled consisting of the tools used to compile LFS, like [[GNU Compiler Collection|GCC]], [[glibc]], [[binutils]], and other necessary utilities. Then, the [[root directory]] must be changed, (using [[chroot]]), to the toolchain's [[Disk partitioning|partition]] to start building the final system. One of the first packages to compile is glibc; after that, the toolchain's [[Linker (computing)|linker]] must be adjusted to [[Library (computing)|link]] against the newly built glibc, so that all other packages that will make up the finished system can be linked against it as well. During the [[chroot]] phase, [[Bash (Unix shell)|bash]]'s hashing feature is turned off and the temporary toolchain's bin directory moved to the end of PATH. This way the newly compiled programs come first in PATH and the new system builds on its own new components.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)