Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Linux from Scratch

From Wikipedia, the free encyclopedia
Type of Linux installation
This articlerelies excessively onreferences toprimary sources. Please improve this article by addingsecondary or tertiary sources.
Find sources: "Linux from Scratch" – news ·newspapers ·books ·scholar ·JSTOR
(October 2013) (Learn how and when to remove this message)

Operating system
Linux From Scratch
DeveloperGerard Beekmans et al.
OS familyUnix-like
Working stateCurrent
Source modelOpen source
Initial releaseDecember 1999; 25 years ago (1999-12)
Latest release12.4[1] Edit this on Wikidata / 1 September 2025; 2 months ago (1 September 2025)
Update methodSource-based
Package managerNone (source-based)
Supported platformsIA-32,x86-64,PowerPC,ARM[2]
Kernel typeMonolithic
Default
user interface
CLI
LicenseCreative Commons licenses Mainly CC BY-NC-SA[3] andMIT License
Official websitelinuxfromscratch.org

Linux From Scratch (LFS) is a type ofLinux installation, and the name of a book written byGerard Beekmans, and as of May 2021, mainly maintained by Bruce Dubbs. The book gives readers instructions on how to build a Linux system fromsource. The book is available freely from the Linux From Scratch site.[4]

Projects under LFS

[edit]

Linux From Scratch is a way to install a working Linux system by building all components of it manually. This is, naturally, a longer process than installing a pre-compiledLinux distribution. According to theLinux From Scratch site, the advantages to this method are a compact, flexible and secure system and a greater understanding of the internal workings of the Linux-based operating systems.[5]

To keep LFS small and focused, the bookBeyond Linux From Scratch (BLFS) was created, which presents instructions on how to further develop the basic Linux system that was created in LFS. It introduces and guides the reader through additions to the system including theX Window System,desktop environments (KDE,GNOME,Xfce,LXDE),productivity software,web browsers,programming languages and tools,multimedia software, andnetwork management andsystem administration tools. Since Release 7.4, the BLFS book version matches the LFS book version.[6]

The bookCross Linux From Scratch (CLFS) focuses oncross compiling, including compiling forheadless orembedded systems that canrun Linux, but lack the resources needed tocompile Linux.[7] CLFS supports a broad range ofprocessors and addresses advanced techniques not included in the LFS book such as cross-buildtoolchains, multilibrary support (32 & 64-bitlibraries side-by-side), and alternativeinstruction set architectures such asItanium,SPARC,MIPS, andAlpha. The project is archived and was last updated in August 2017.[7]

The Linux from Scratch project, likeBitBake, also supports cross-compiling Linux forARM embedded systems such as theRaspberry Pi andBeagleBone.[8][9]

The bookHardened Linux From Scratch (HLFS) focuses on security enhancements such ashardened kernel patches, mandatoryaccess control policies,stack-smashing protection, andaddress space layout randomization.[10] Besides its main purpose of creating asecurity-focused operating system, HLFS had the secondary goal of being a security teaching tool. It has not been updated since 2011. As of 17 February 2025, the HLFS book has disappeared from the LFS web site.

Automated Linux From Scratch (ALFS) is a project designed to automate the process of creating an LFS system.[11] It is aimed at users who have gone through the LFS and BLFS books several times and wish to reduce the amount of work involved.[12] A secondary goal is to act as a test of the LFS and BLFS books by directly extracting and running instructions from the XML sources of the LFS and BLFS books.

Other subprojects:

As of 9 September 2025[11]
NameDescription
MLFSMultilib-LFS is a variant of LFS that builds a system which is able to execute 32-bit binaries.
GLFSGaming Linux From Scratch is based on BLFS and helps user install gaming support software likeSteam orWine on a new LFS or MLFS system.
HintsCollection of documents that explain how to enhance LFS system in ways that are not included in the LFS or BLFS books.
PatchesCentral repository for all patches useful to an LFS user.
LFS Editor's GuideA document that describes the LFS development process.
MuseumCopies of ancient LFS and BLFS versions.

Requirements and procedure

[edit]

A cleanpartition and a working Linux system with a compiler and some essentialsoftware 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.[13] 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) anXfce GUI environment to work in. The official LFS Live CD is no longer maintained, and cannot be used to build the LFS version 7 or later.[13] 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.[14]

First, atoolchain must be compiled consisting of the tools used to compile LFS, likeGCC,glibc,binutils, and other necessary utilities. Then, theroot directory must be changed, (usingchroot), to the toolchain'spartition to start building the final system. One of the first packages to compile is glibc; after that, the toolchain'slinker must be adjusted tolink 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 thechroot phase,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.

List of packages in LFS

[edit]
As of 9 September 2025[15]
ComponentDescriptionLicense
AclAn access control list (ACL), with respect to a computer file system, is a list of permissions attached to an object.GNU GPL
AttrCommands for Manipulating Filesystem Extended Attributes.
AutoconfTool for producingconfigure scripts forC,C++,Fortran, Fortran 77,Erlang,Objective-C software onUnix-like computer systems.
AutomakeAprogramming tool that produces portablemakefiles for use by themake program, used in compiling software.
BashAfree softwareUnix shell written for theGNU Project
bcbc is a basic calculator (often referred to as bench calculator), is "an arbitrary precision calculator language" with syntax similar to theC programming language.
BinutilsA collection ofprogramming tools for the manipulation ofobject code in various object file formats.
BisonAparser generator that is part of theGNU Project. Bison converts agrammar description for acontext-free grammar into source code for aC,C++ orJava parser.
Bzip2Afree andopen sourcelossless data compressionalgorithm and program developed byJulian Seward.BSD-like License
CheckA unit testing framework forC.GNU GPL
CoreutilsApackage ofGNUsoftware containing many of the basic tools, such ascat,ls, andrm, needed forUnix-likeoperating systems.
DejaGnuA framework for testing other programs. It has a main script called runtest that goes through a directory looking at configuration files and then runs some tests with given criteria.
DiffutilsAdata comparison utility that outputs the differences between two files.
E2fsprogse2fsprogs (sometimes called the e2fs programs) is a set of utilities for maintaining theext2,ext3 andext4file systems.
ElfutilsA collection of utilities and libraries to read, create and modify ELF binary files.GNU GPL andGNU LGPL
EudevA fork ofudev to avoid dependency on the systemd architecture. The resulting fork is called eudev and it makes udev functionality available withoutsystemd.GNU GPL
ExpatAstream-orientedXML 1.0 parserlibrary, written inC.MIT License
ExpectExpect is aUnix automation and testing tool as an extension to theTcl scripting language, for interactiveapplications such astelnet,ftp,passwd,fsck,rlogin,tip,ssh, and others.Public domain
Filefile command is a standard Unix program for recognizing the type of data contained in a computer file.BSD-like License
FindutilsTheGNU Find Utilities are the basic directory searching utilities of the GNU operating system.GNU GPL
Flexflex (fastlexical analyzer generator) is afree software alternative tolex.BSD license
GawkGawk is aprogramming language that is designed for processing text-based data, either in files or data streamsGNU GPL
GCCThe GNU Compiler Collection (usually shortened to GCC) is acompiler system produced by theGNU Project supporting variousprogramming languages
GDBMGDBM simpledatabase engines
GettextGettext is theGNUinternationalization and localization (i18n) library.
GlibcThe GNUC Library, commonly known as glibc, is theC standard library released by theGNU Project.
GMPThe GNU Multiple-Precision Library, also known as GMP, is afree library forarbitrary-precision arithmetic, operating on signedintegers,rational numbers, andfloating point numbers.
GperfA perfect hash function generator. For a given list of strings, it produces a hash function and hash table, in form ofC orC++ code, for looking up a value depending on the input string. The hash function is perfect, which means that the hash table has no collisions, and the hash table lookup needs a single string comparison only.
Grepgrep is acommand line text search utility originally written forUnix.
GroffGroff is theGNU replacement for thetroff andnrofftext formatters.
GRUBGNU GRUB (short for GNU GRand Unified Bootloader) is aboot loader package from theGNU Project.
GzipGzip is asoftware application used forfile compression. gzip is short for GNU zip
iana-etc.iana-etc. installs services and protocols using data from theInternet Assigned Numbers Authority. Included are snapshots of the data from the IANA, scripts to transform that data into the needed formats, and scripts to fetch the latest data.Open Software License
InetutilsA collection of network tools, including:telnet,ftp, andrsh.GNU GPL
IntltoolA set of tools to centralize translation of many different file formats using GNU gettext-compatible PO files.
iproute2A collection ofuserspace utilities for controlling and monitoring various aspects ofnetworking in theLinux kernel, includingrouting, network interfaces, tunnels,traffic control, and network-relateddevice drivers.
KbdA package contains tools for managing the Linux console (Linux console, virtual terminals on it, keyboard, etc.). Mainly, what they do is loading console fonts and keyboard maps. Also this package contains a set of various fonts and keyboard maps.
KmodA multi-call binary which implements the programs used to control Linux Kernel modules.
lessless is aterminal pagerprogram onUnix,Windows andUnix-like systems used to view (but not change) the contents of atext file one screen at a time.Dual: eitherGPL orBSD-like License
LFS-BootscriptsThe LFS-Bootscripts package contains a set of scripts to start/stop the LFS system at bootup/shutdown. The configuration files and procedures needed to customize the boot process are described in the following sections.Creative Commons licenses andMIT License
LibcapAn alternative to the superuser model of privilege under Linux.BSD-3-Clause orGPL-2.0-only[16]
LibelfThe elfutils project provides libraries and tools for ELF files and DWARF data. Most utilities in this package are available in other packages, but the library is needed to build the Linux kernel using the default (and most efficient) configuration.dualGPLv2+/LGPLv3+[17]
LibffiA Portable Foreign Function Interface Library.MIT License
LibpipelineLibpipeline is a C library for manipulating pipelines of subprocesses in a flexible and convenient way.GNU GPL
LibtoolGNU Libtool is aGNUprogramming tool from theGNU build system used for creating portable compiledlibraries.
LibxcryptPackage that provides the libcrypt library needed by various packages (notably, Shadow) for hashing passwords. It replaces the obsolete libcrypt implementation in Glibc.GNULGPLv2.1[18]
Linux kernelThe Linux kernel is an operating systemkernel used by theLinux family ofUnix-likeoperating systems.GNU GPL
GNU m4GNU m4 is theGNU version of them4 macro preprocessor.
makeMake is autility forautomatically building executable programs and libraries fromsource code.
Man-DBMan-DB is an implementation of the standard Unix documentation system accessed using the man command. It uses a Berkeley DB database in place of the traditional flat-text whatis databases.
Man-pagesA man page (short for manual page) is a form of online software documentation usually found on aUnix orUnix-like operating system.Multiple Licenses.[19]
Mesonan open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.Apache License
MPCA C library for the arithmetic of complex numbers witharbitrarily high precisionGNU LGPL
MPFRGNU C library for multiple-precision floating-point computations with correct rounding.GNU LGPL andGNU GPL for special exception part of the source code
ncursesA programming library for writing text user interfaces in a terminal-independent mannerX11 License[20]
NinjaA small build system with a focus on speed.Apache License
OpenSSLA softwarelibrary for applications that provide secure communications overcomputer networks against eavesdropping, and identify the party at the other end. It is widely used byInternetservers, including the majority ofHTTPSwebsites.Apache License 1.0 and four-clauseBSD License
PatchA computer tool forUnixprograms that updates text files according to instructions contained in a separate file, called apatch file.GNU GPL
PerlA dynamic interpreted programming languageArtistic License 1.0[21][22] orGNU GPL[23]
PkgconfA computer program that provides a unified interface for querying installedlibraries for the purpose ofcompiling software from itssource code.GNU GPL
Procps-NGA set of command line and full-screen utilities that provide information out of the pseudo-filesystem most commonly located at/proc. This filesystem provides a simple interface to the kernel data structures. The programs of procps generally concentrate on the structures that describe the processes running on the system.GNU GPL andGNU LGPL
PsmiscA set of some small useful utilities that use theproc filesystem.GNU GPL
PythonAn open source interpreted high-level programming language for general-purpose programmingPython Software Foundation License
Python DocumentationPackage contains the Python development environment.
ReadlineGNU readline is asoftware library created and maintained by theGNU Project.GNU GPL
sedsed (stream editor) is aUnix utility that (a) parses text files and (b) implements aprogramming language which can apply textual transformations to such files.
ShadowA tool on mostUnix andUnix-like operating systems used to change a user'spassword. The password entered by the user is run through akey derivation function to create ahashed version of the new password, which is saved. Only the hashed version is stored; the entered password is not saved for security reasons.Artistic License orBSD-like License
SysklogdA Kernel and system loggingdaemons that provides two system utilities which provide support for system logging and kernel message trapping. Support of both internet and unix domain sockets enables this utility package to support both local and remote logging.GNU GPL
SysvinitSystem V style init programs that control the booting and shutdown system.
tartar is a program that provides the ability to create tar archives, as well as various other kinds of manipulation.
TclTool Command Language is a dynamicscripting language.BSD-like License[24]
TexinfoA typesetting syntax used for generating documentation in both on-line also printed form and the official documentation format of the GNU project.GNU GPL
tzdataThe public-domain time zone database contains code and data that represent the history of local time for many representative locations around the globe.Public domain andBSD
Udev Configuration TarballThe Udev package contains programs for dynamic creation of device nodes. The development of udev has been merged with systemd, but most of systemd is incompatible with LFS. Here we build and install just the needed udev files.Creative Commons licenses andMIT License
util-linuxThe Util-linux package contains miscellaneous utility programs. Among them are utilities for handling file systems, consoles, partitions, and messages.GNU GPL
VimA text editor built to create and change any kind of text.Free software (Vim License[25]),charityware
WheelThis library is the reference implementation of the Python wheel packaging standard, as defined in PEP 427.MIT
XML::ParserPerl module that interfaces withExpatArtistic License 2.0[26]
XZ UtilsA general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.GNU GPL andGNU LGPL
ZlibZlib is asoftware library used fordata compression.zlib license
zstdzstd a fast lossless compression algorithm and data compression tool. Compress or decompress .zst files.BSD + GPLv2 dual license.[27][28]

This is a list of the packages included in CLFS version 1.1.0. Unless otherwise noted, this list is applicable to all supported architectures.

As of 9 September 2025[29]

Standard build unit

[edit]

A "standard build unit" ("SBU") is a term used during initial bootstrapping of the system, and represents the amount of time required to build the first package in LFS on a given computer. Its creation was prompted by the long time required to build an LFS system, and the desire of many users to know how long a source tarball will take to build ahead of time.

As of Linux From Scratch version 10.1, the first package built by the user is GNU binutils. When building it, users are encouraged to measure the build process using shell constructs and dub that time the system's "standard build unit". Once this number is known, an estimate of the time required to build later packages is expressed relative to the known SBU.

Several packages built during compilation take much longer to build than binutils, including theGNU C Library (rated at 4.2 SBUs) and theGNU Compiler Collection (rated at 11 SBUs). The unit must be interpreted as an approximation; various factors influence the actual time required to build a package.

Reception

[edit]

LWN.net reviewed LFS in 2004:[30]

Linux From Scratch is a wonderful project. It should become a compulsory reading material for all Linux training courses, and something that every Linux enthusiast should complete at least once. This would also create another interesting side effect: people who tend to be quick in expressing dissatisfaction on the distributions' mailing lists and forums would probably show a lot more respect for the developers. Installing a ready-made distribution is a trivial task. Building up a set of 4 CDs containing a stable, secure and reliable operating system, plus thousands of applications, is most definitely not.

Tux Machines wrote a review about Linux From Scratch 6.1 in 2005:[31]

Now on to BLFS. Unfortunately Beyond Linux From Scratch is always a book behind it seems. To me it's not a real install until one can log into a window manager.

Tux Machines also has a second[32] and a third part[33] of the review.

See also

[edit]

Other source-based Linux distributions:

References

[edit]
  1. ^"Version 12.4". 1 September 2025. Retrieved1 September 2025.
  2. ^"iii. LFS Target Architectures".www.linuxfromscratch.org. Retrieved17 July 2025.
  3. ^"Appendix D. LFS Licenses".www.linuxfromscratch.org. Retrieved9 August 2023.
  4. ^"Download LFS". www.linuxfromscratch.org. Retrieved11 March 2025.
  5. ^"What is Linux From Scratch?".www.linuxfromscratch.org. Retrieved11 March 2025.
  6. ^"Who Would Want to Read this Book".www.linuxfromscratch.org. Retrieved9 September 2025.
  7. ^ab"CLFS Trac".trac.clfs.org. Retrieved9 September 2025.
  8. ^"Cross-Compiled Linux From Scratch – Embedded".clfs.org. Retrieved11 March 2025..
  9. ^Horan, Brendan (12 June 2013).Practical Raspberry Pi. Berkeley, CA: Apress. p. 105.doi:10.1007/978-1-4302-4972-6.ISBN 978-1-4302-4972-6.OCLC 848747530.OL 27082156M.
  10. ^"HLFS Project Homepage".www.linuxfromscratch.org. Retrieved9 September 2025.
  11. ^ab"Welcome to Linux From Scratch!".www.linuxfromscratch.org. Retrieved9 September 2025.
  12. ^"ALFS Project Homepage".www.linuxfromscratch.org. Retrieved9 September 2025.
  13. ^ab"LFS LiveCD Project Homepage".www.linuxfromscratch.org. Retrieved25 May 2018.
  14. ^"Index of /~kb0iic/livecdupd".clfs.org. Archived fromthe original on 6 January 2016. Retrieved25 May 2018.
  15. ^"Rationale for Packages in the Book".www.linuxfromscratch.org. Retrieved9 September 2025.
  16. ^"index : libcap/libcap.git".git.kernel.org. Retrieved9 September 2025.
  17. ^"The elfutils project".sourceware.org. Retrieved9 September 2025.
  18. ^besser82."libxcrypt/licensing at develop · besser82/libxcrypt".GitHub. Retrieved9 September 2025.
  19. ^"Licenses for manual pages".www.kernel.org. Archived fromthe original on 6 January 2018. Retrieved25 May 2018.
  20. ^"ncurses – Licensing".invisible-island.net. Retrieved9 July 2013.
  21. ^"The "Artistic License" – dev.perl.org".dev.perl.org. Retrieved25 May 2018.
  22. ^"perl5.git.perl.org Git".perl5.git.perl.org.Archived from the original on 12 April 2025. Retrieved8 September 2025.
  23. ^"Perl Licensing". dev.perl.org. Retrieved8 January 2011.
  24. ^"Tcl/Tk Licensing Terms".tcl.tk. Retrieved8 January 2011.
  25. ^"vim/license at master · vim/vim".GitHub. Retrieved8 September 2025.
  26. ^"toddr / XML-Parser-2.47 / LICENSE".metacpan.org. Retrieved9 September 2025.
  27. ^Cyan4973."New license by Cyan4973 · Pull Request #801 · facebook/zstd".GitHub. Retrieved8 September 2025.
  28. ^"zstd/license at dev · facebook/zstd".GitHub. Retrieved8 September 2025.
  29. ^"list: /lfs/downloads/stable/wget-list"(txt).www.linuxfromscratch.org. Retrieved9 September 2025.
  30. ^Bodnar, Ladislav (19 May 2004)."Learning with Linux From Scratch".lwn.net. Retrieved28 March 2020.
  31. ^srlinuxx (11 July 2005)."Linux From Scratch 6.1 (part 1?) | Tux Machines".www.tuxmachines.org. Retrieved28 March 2020.
  32. ^srlinuxx (11 July 2005)."Linux From Scratch 6.1 – Part 2 – BLFS | Tux Machines".www.tuxmachines.org. Retrieved28 March 2020.
  33. ^srlinuxx (5 September 2005)."Beyond Beyond Linux from Scratch (lfs – part3) | Tux Machines".www.tuxmachines.org. Retrieved28 March 2020.

External links

[edit]
Android
LineageOS
Arch
Debian
Ubuntu
Fedora
CentOS
Stream
Gentoo
Mandrake
Mandriva
Slackware
SUSE
Other
Discontinued
Android
Arch
Debian
Gentoo
Red Hat,
Fedora
Slackware
SUSE
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=Linux_from_Scratch&oldid=1318410361"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp