Linux From Scratch

Linux From Scratch
Linux From Scratch
Company / developer Gerard Beekmans et al.
OS family Unix-like
Working state Current
Source model Open source / Free Software
Initial release -
Latest stable release 7.0 / 2011-10-29
Latest unstable release 7.0 RC2 / 2011-10-13
Update method Source-based
Package manager None (source-based)
Supported platforms IA-32, x86-64
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 website and is currently in version 7.0.[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 website, 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.[2]

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

In addition to the LFS and BLFS books, Cross Linux from Scratch (CLFS) describes cross compiling and Hardened Linux From Scratch (HLFS) focuses on security enhancements like the use of Stack-smashing protection, PaX and Address space layout randomization using grsecurity. Cross Linux from Scratch provides the necessary instructions to build a base, command line only Linux distribution. While LFS is limited to the x86 architecture, CLFS supports a broader range of processors. CLFS 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 x86-64, Itanium, SPARC, MIPS, and Alpha. Hardened Linux From Scratch focuses on creating a more secure version of the original Linux From Scratch as its main purpose, including embedded systems.


Contents

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 (e.g., the Linux From Scratch Live CD[4]). The 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.

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 software

This is a list of the packages included in LFS version 6.7:

Component Description License Version
Autoconf Tool for producing configure scripts for C, C++, Fortran, Fortran 77, Erlang, Objective-C software on Unix-like computer systems. GNU GPL 2.67
Automake A programming tool that produces portable makefiles for use by the make program, used in compiling software. GNU GPL 1.11.1
Bash A free software Unix shell written for the GNU Project GNU GPL 4.1
Binutils A collection of programming tools for the manipulation of object code in various object file formats. GNU GPL 2.20.1
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 2.4.3
Bzip2 A free and open source lossless data compression algorithm and program developed by Julian Seward. GNU GPL 1.0.5
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.5
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.4.4
Diffutils A file comparison utility that outputs the differences between two files. GNU GPL 3.0
E2fsprogs e2fsprogs (sometimes called the e2fs programs) is a set of utilities for maintaining the ext2, ext3 and ext4 file systems. GNU GPL 1.41.12
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.44.1.15
File 5.04
Findutils 4.4.2
Flex flex (fast lexical analyzer generator) is a free software alternative to lex. BSD license 2.5.35
Gawk Gawk is a programming language that is designed for processing text-based data, either in files or data streams GNU GPL 3.1.8
GCC The GNU Compiler Collection (usually shortened to GCC) is a compiler system produced by the GNU Project supporting various programming languages GNU GPL 4.5.2
GDBM GDBM simple database engines GNU GPL 1.8.3
Gettext Gettext is the GNU internationalization and localization (i18n) library. GNU GPL 0.18.1.1
Glibc The GNU C Library, commonly known as glibc, is the C standard library released by the GNU Project. GNU GPL 2.12.1
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 5.0.1
Grep grep is a command line text search utility originally written for Unix. GNU GPL 2.6.3
Groff Groff is the GNU replacement for the troff and nroff text formatters. GNU GPL 1.20.1
GRUB GNU GRUB (short for GNU GRand Unified Bootloader) is a boot loader package from the GNU Project. GNU GPL 1.98
Gzip Gzip is a software application used for file compression. gzip is short for GNU zip GNU GPL 1.4
Iana-Etc. 2.30
Inetutils 1.8
IPRoute2 2.6.35
Kbd 1.15.2
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 436
LFS-Bootscripts 6.7 (20100627)
Libtool GNU Libtool is a GNU programming tool from the GNU build system used for creating portable compiled libraries. GNU GPL 2.2.10
Linux kernel The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. GNU GPL 2.6.35.4
GNU m4 GNU m4 is the GNU version of the m4 macro preprocessor. GNU GPL 1.4.14
Make Make is a utility for automatically building executable programs and libraries from source code. GNU GPL 3.82
Man-DB 2.5.7
Man-pages 3.25
Module-Init-Tools 3.12
MPC 0.8.2
MPFR 3.0.0
ncurses a programming library for writing text user interfaces in a terminal-independent manner 5.7
Patch 2.6.1
Perl 5.12.1
Pkg-config 0.25
Procps 3.2.8
Psmisc 22.12
Readline GNU readline is a software library created and maintained by the GNU Project. GNU GPL 6.1
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.1
Shadow 4.1.4.2
Sysklogd 1.5
Sysvinit 2.88dsf
tar 1.23
Tcl 8.5.8
Texinfo 4.13a
Udev 161
Udev Configuration Tarball 6.6 (20100128)
Util-linux-ng 2.18
Vim 7.3
Vim language files (optional) 7.3
Zlib Zlib is a software library used for data compression. zlib license 1.2.5

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.

  • Grep 2.5.3
  • Groff 1.19.2
  • GRUB 0.97
  • Gzip 1.3.12
  • Hfsutils 3.2.6 (PowerPC and PowerPC64 only)
  • Iana-Etc. 2.20
  • Inetutils 1.5
  • IPRoute2 2.6.23
  • Kbd 1.13
  • Less 418
  • LILO 22.8 (x86_64 non-multilib only)
  • Libtool 1.5.26
  • Linux 2.6.24.7
  • GNU m4 1.4.10
  • Make 3.81
  • Man 1.6e
  • Man-pages 3.01
  • Mktemp 1.5
  • Module-Init-Tools 3.4
  • Ncurses 5.6
  • Parted 1.8.8 (PowerPC and PowerPC64 only)
  • Patch 2.5.9
  • Perl 5.8.8
  • PowerPC Utils 1.1.3 (PowerPC and PowerPC64 only)
  • Procps 3.2.7
  • Psmisc 22.6
  • Readline 5.2
  • Sed 4.1.5
  • Shadow 4.1.2
  • Silo 1.4.13 (Sparc and Sparc64 only)
  • Sysklogd 1.5
  • Sysvinit 2.86
  • tar 1.20
  • Tcl 8.4.16
  • Texinfo 4.11
  • Tree 1.5.1.1
  • Udev 124
  • Util-linux-ng 2.14
  • Vim 7.1
  • Vim 7.1 language files (optional)
  • Yaboot 1.3.13 (PowerPC and PowerPC64 only)
  • Zlib 1.2.3

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 length of time required to build an LFS system, and the desire of many of 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 9.5 SBUs). The unit is not a concrete description, and must be interpreted as an approximation; many various and unrelated factors influence the wall-clock time that a package requires to build.

See also

External links

References

  1. ^ Gerard Beekmans: Linux from Scratch (Iuniverse Inc, December 2000) ISBN 0595137652 ISBN 978-0595137657
  2. ^ http://www.linuxfromscratch.org/lfs/
  3. ^ Gerard Beekmans: Beyond Linux From Scratch, Version 6.3 (August 2008)
  4. ^ http://www.linuxfromscratch.org/livecd/
  1. "LFS Project Homepage". Linux From Scratch. Gerard Beekmans. 17 March 2008. http://www.linuxfromscratch.org/lfs/. Retrieved 17 March 2008. 

Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Linux From Scratch — o LFS es un tipo de instalación del sistema operativo GNU/Linux y el nombre de un libro escrito por Gerard Beekmans junto a otros. El libro es una colección de documentos que indican los pasos para desarrollar un sistema GNU/Linux desde cero, a… …   Wikipedia Español

  • Linux From Scratch — Basisdaten Entwickler Linux From Scratch Team[1] Sprache(n) Englisch und Deutsch Version …   Deutsch Wikipedia

  • Linux from Scratch — Entwickler Linux From Scratch Team Version 6.4 (23. November 2008) Lizenz …   Deutsch Wikipedia

  • Linux From Scratch — Famille Systèmes Unix Licence Licence Creative Commons et Licence MIT Dernière version stable …   Wikipédia en Français

  • Linux From Scratch — o LFS es una metadistribución de GNU/Linux. El proyecto se diferencia de otras distribuciones en que no consta de paquetes y scripts preensamblados para una instalación automática del sistema, sino que sus usuarios son provistos simplemente con… …   Enciclopedia Universal

  • Linux From Scratch — Разработчик Li …   Википедия

  • Cross Linux From Scratch — Linux From Scratch Entwickler Linux From Scratch Team Version 6.4 (23. November 2008) Lizenz …   Deutsch Wikipedia

  • Hardened Linux From Scratch — HLFS, sigle de Hardened Linux From Scratch, est le nom du livre qui traite de Linux From Scratch. Le projet est basé sur Linux From Scratch et il va aussi intégrer des éléments de Beyond Linux From Scratch. Comparé à ses camarades BLFS est plutôt …   Wikipédia en Français

  • Beyond Linux From Scratch — BLFS, sigle de Beyond Linux From Scratch, est le nom du livre qui traite de Linux From Scratch. C est la suite du livre Linux From Scratch, il introduit et guide également le lecteur à travers les programmes additionnels comme les logiciels… …   Wikipédia en Français

  • Linux from Scratch — …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”