how.xml 5.4 KB

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