Linux From Scratch

Linux From Scratch
Developer Gerard Beekmans et al.
OS family Unix-like
Working state Current
Source model Open source
Initial release December 1999
Latest release 7.9 / 8 March 2016 (2016-03-08)[1]
Update method Source-based
Package manager None (source-based)
Platforms IA-32, x86-64[2]
Kernel type Monolithic
Default user interface Bash
License Creative Commons licenses and MIT License
Official website www.linuxfromscratch.org

Linux From Scratch (LFS) is a type of a Linux installation and the name of a book written by Gerard Beekmans, among others. The book gives readers instructions on how to build a Linux system from source. The book is available freely from the Linux From Scratch site and is currently in version 7.9.[1]

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-compiled Linux distribution. According to the Linux 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.[3]

To keep LFS small and focused, the book Beyond 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 networking, X, sound, printer and scanner support. Since Release 5.0, the BLFS book version matches the LFS book version.[4]

The book Cross Linux from Scratch (CLFS) focuses on cross compiling, including compiling for headless or embedded systems that can run Linux, but lack the resources needed to compile Linux. CLFS supports a broad range of processors and addresses advanced techniques not included in the LFS book such as cross-build toolchains, multilibrary support (32 & 64-bit libraries side-by-side), and alternative instruction set architectures such as Itanium, SPARC, MIPS, and Alpha.

The book Hardened Linux From Scratch (HLFS) focuses on security enhancements such as hardened kernel patches, mandatory access control policies, stack-smashing protection, and address space layout randomization. Besides its main purpose of creating a security-focused operating system, HLFS has the secondary goal of being a security teaching tool.

Automated Linux From Scratch (ALFS) is a project designed to automate the process of creating an LFS system. 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. 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.

Requirements and procedure

A clean partition and a working Linux system with a compiler and some essential 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.[5] 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.[5] 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.[6]

First, a toolchain must be compiled consisting of the tools used to compile LFS, like GCC, glibc, binutils and other necessary utilities. Then, the root directory must be changed, (using chroot), to the toolchain's partition to start building the final system. One of the first packages to compile is glibc; after that, the toolchain's linker must be adjusted to 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'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 LFS 7.9 software

Component Description License Version
Acl An access control list (ACL), with respect to a computer file system, is a list of permissions attached to an object. GNU GPL 2.2.52
Attr Commands for Manipulating Filesystem Extended Attributes. GNU GPL 2.4.47
Autoconf Tool for producing configure scripts for C, C++, Fortran, Fortran 77, Erlang, Objective-C software on Unix-like computer systems. GNU GPL 2.69
Automake A programming tool that produces portable makefiles for use by the make program, used in compiling software. GNU GPL 1.15
Bash A free software Unix shell written for the GNU Project GNU GPL 4.3.30
Bc bc is a basic calculator (often referred to as bench calculator), is "an arbitrary precision calculator language" with syntax similar to the C programming language. GNU GPL 1.06.95
Binutils A collection of programming tools for the manipulation of object code in various object file formats. GNU GPL 2.26
Bison A parser generator that is part of the GNU Project. Bison converts a grammar description for a context-free grammar into source code for a C, C++ or Java parser. GNU GPL 3.0.4
Bzip2 A free and open source lossless data compression algorithm and program developed by Julian Seward. GNU GPL 1.0.6
Check A a unit testing framework for C. GNU GPL 0.10.0
Coreutils A package of GNU software containing many of the basic tools, such as cat, ls, and rm, needed for Unix-like operating systems. GNU GPL 8.25
DejaGNU A 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. GNU GPL 1.5.3
Diffutils A data comparison utility that outputs the differences between two files. GNU GPL 3.3
Eudev A a fork of udev in order to avoid dependency on the systemd architecture. The resulting fork is called eudev and it makes udev functionality available without systemd. GNU GPL 3.1.5
E2fsprogs e2fsprogs (sometimes called the e2fs programs) is a set of utilities for maintaining the ext2, ext3 and ext4 file systems. GNU GPL 1.42.13
Expat A stream-oriented XML 1.0 parser library, written in C. MIT License 2.1.0
Expect Expect is a Unix automation and testing tool as an extension to the Tcl scripting language, for interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, ssh, and others. Public domain 5.45
File file command is a standard Unix program for recognizing the type of data contained in a computer file. 5.14
Findutils 4.4.2
Flex flex (fast lexical analyzer generator) is a free software alternative to lex. BSD license 2.5.37
Gawk Gawk is a programming language that is designed for processing text-based data, either in files or data streams GNU GPL 4.1.3
GCC The GNU Compiler Collection (usually shortened to GCC) is a compiler system produced by the GNU Project supporting various programming languages GNU GPL 5.3.0
GDBM GDBM simple database engines GNU GPL 1.11
Gettext Gettext is the GNU internationalization and localization (i18n) library. GNU GPL 0.19.7
Glibc The GNU C Library, commonly known as glibc, is the C standard library released by the GNU Project. GNU GPL 2.23
GMP The GNU Multiple-Precision Library, also known as GMP, is a free library for arbitrary-precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. GNU GPL 6.1.0
Gperf A perfect hash function generator. For a given list of strings, it produces a hash function and hash table, in form of C or C++ 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. GNU GPL 3.0.4
Grep grep is a command line text search utility originally written for Unix. GNU GPL 2.23
Groff Groff is the GNU replacement for the troff and nroff text formatters. GNU GPL 1.22.3
GRUB GNU GRUB (short for GNU GRand Unified Bootloader) is a boot loader package from the GNU Project. GNU GPL 2.02~beta2
Gzip Gzip is a software application used for file compression. gzip is short for GNU zip GNU GPL 1.6
Iana-Etc. 2.30
Inetutils 1.9.4
Intltool 0.51.0
IPRoute2 4.4.0
Kbd 2.0.3
Kmod 22
Less less is a terminal pager program on Unix, Windows and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. Dual: either GPL or BSD-like License 458
LFS-Bootscripts 7.9 (20150222)
Libcap 2.25
Libpipeline 1.4.1
Libtool GNU Libtool is a GNU programming tool from the GNU build system used for creating portable compiled libraries. GNU GPL 2.4.6
Linux kernel The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. GNU GPL 4.4.2
GNU m4 GNU m4 is the GNU version of the m4 macro preprocessor. GNU GPL 1.4.17
Make Make is a utility for automatically building executable programs and libraries from source code. GNU GPL 4.1
Man-DB 2.7.5
Man-pages A man page (short for manual page) is a form of online software documentation usually found on a Unix or Unix-like operating system. 4.04
MPC (C library) 1.0.3
MPFR GNU C library for multiple-precision floating-point computations with correct rounding. 3.1.3
ncurses A programming library for writing text user interfaces in a terminal-independent manner 6.0
Patch 2.7.5
Perl A dynamic interpreted programming languages 5.22.1
Pkg-config 0.29
Procps 3.3.11
Psmisc 22.21
Readline GNU readline is a software library created and maintained by the GNU Project. GNU GPL 6.3
Sed sed (stream editor) is a Unix utility that (a) parses text files and (b) implements a programming language which can apply textual transformations to such files. GNU GPL 4.2.2
Shadow 4.2.1
Sysklogd 1.5.1
Sysvinit 2.88dsf
tar 1.28
Tcl 8.6.4
Texinfo 6.1
tzdata 2016a
Udev Configuration Tarball udev-lfs-20140408
Util-linux-ng 2.27.1
Vim language files (optional) 7.4
XML::Parser 2.44
XZ Utils 5.2.2
Zlib Zlib is a software library used for data compression. zlib license 1.2.8

[7] 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.

Standard build unit

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 6.3, the first package built by the user is GNU binutils. When building it, users are encouraged to time that build process using shell constructs and dub that time that 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 the GNU C Library (rated at 17.1 SBUs) and the GNU Compiler Collection (rated at 55.6 SBUs). The unit must be interpreted as an approximation; various factors influence the actual time required to build a package.

See also

References

  1. "LFS Project Homepage". Linux From Scratch. Gerard Beekmans. 17 March 2008. Retrieved 17 March 2008. 

External links

This article is issued from Wikipedia - version of the Thursday, May 05, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.