source: chapter01/how.xml@ 8559174

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 8559174 was 8559174, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Typo

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@6124 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-scatter-how">
7<title>How to Build an LFS System</title>
8<?dbhtml filename="how.html"?>
9
10<para>The LFS system will be built by using an existing running
11Linux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This
12existing Linux system (the host) will be used as a starting point to
13provide necessary programs, including a compiler, linker, and shell,
14to build the new system. Select the <quote>development</quote> option
15during the distribution installation to be able to access these
16tools.</para>
17
18<para>As an alternative to installing an entire separate
19distribution onto your machine, you may wish to use the Linux From
20Scratch LiveCD. The CD works well as a host system, providing all
21the tools you need to successfully follow the instructions in this
22book. Additionally, it contains all the source packages, patches and
23a copy of this book. So once you have the CD, no network connection or
24additional downloads are necessary. For more information about the LFS
25LiveCD or to download a copy, visit
26<ulink url="http://linuxfromscratch.org/~jhuntwork/livecd/"/></para>
27
28<para><xref linkend="chapter-partitioning"/> of this book describes how
29to create a new Linux native partition and file system, the place
30where the new LFS system will be compiled and installed. <xref
31linkend="chapter-getting-materials"/> explains which packages and
32patches need to be downloaded to build an LFS system and how to store
33them on the new file system. <xref linkend="chapter-final-preps"/>
34discusses the setup for an appropriate work environment. Please read
35<xref linkend="chapter-final-preps"/> carefully as it explains several
36important issues the developer should be aware of before beginning to
37work through <xref linkend="chapter-temporary-tools"/> and
38beyond.</para>
39
40<para><xref linkend="chapter-temporary-tools"/> explains the
41installation of a number of packages that will form the basic
42development suite (or toolchain) which is used to build the actual
43system in <xref linkend="chapter-building-system"/>. Some of these
44packages are needed to resolve circular dependencies&mdash;for example,
45to compile a compiler, you need a compiler.</para>
46
47<para><xref linkend="chapter-temporary-tools"/> also shows the user how
48to build a first pass of the toolchain, including Binutils and GCC
49(first pass basically means these two core packages will be
50re-installed a second time). The next step is to build Glibc, the C library.
51Glibc will be compiled by the toolchain programs built in the first pass. Then,
52a second pass of the toolchain will be built. This time, the toolchain will be
53dynamically linked against the newly built Glibc. The remaining
54<xref linkend="chapter-temporary-tools"/> packages are built using this second
55pass toolchain. When this is done, the LFS installation process will no longer
56depend on the host distribution, with the exception of the running kernel.
57</para>
58
59<para>While this may initially seem like a lot of work to get away
60from a host distribution, a full technical explanation is provided at
61the beginning of <xref linkend="chapter-temporary-tools"/>.</para>
62
63<para>In <xref linkend="chapter-building-system"/>, the full LFS system is
64built. The chroot (change root) program is used to enter a virtual
65environment and start a new shell whose root directory will be set to
66the LFS partition. This is very similar to rebooting and instructing
67the kernel to mount the LFS partition as the root partition. The
68system does not actually reboot, but instead chroots because creating a
69bootable system requires additional work which is not necessary just
70yet. The major advantage is that <quote>chrooting</quote> allows the
71builder to continue using the host while LFS is being built. While
72waiting for package compilation to complete, a user can switch to a
73different virtual console (VC) or X desktop and continue using the
74computer as normal.</para>
75
76<para>To finish the installation, the bootscripts are set up in <xref
77linkend="chapter-bootscripts"/>, and the kernel and boot loader are set
78up in <xref linkend="chapter-bootable"/>. <xref
79linkend="chapter-finalizing"/> contains information on furthering the
80LFS experience beyond this book. After the steps in this book have
81been implemented, the computer will be ready to reboot into the new
82LFS system.</para>
83
84<para>This is the process in a nutshell. Detailed information on each
85step is discussed in the following chapters and package descriptions.
86Items that may seem complicated will be clarified, and everything will
87fall into place as the developer embarks on the LFS adventure.</para>
88
89</sect1>
90
Note: See TracBrowser for help on using the repository browser.