how.xml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <sect1 id="ch-scatter-how">
  2. <title>How things are going to be done</title>
  3. <?dbhtml filename="how.html" dir="chapter01"?>
  4. <para>You are going to build your LFS system by using a previously installed
  5. Linux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This existing
  6. Linux system (the host) will be used as a starting point, because you will need
  7. programs like a compiler, linker and shell to build the new system. Normally
  8. all the required tools are available if you selected <quote>development</quote>
  9. as one of the options when you installed your distribution.</para>
  10. <para>In <xref linkend="chapter03"/> you will first create a new Linux native
  11. partition and file system, the place where your new LFS system will be compiled
  12. and installed. Then in <xref linkend="chapter04"/> you download all the
  13. packages and patches required to build an LFS system, and store them on the new
  14. file system.</para>
  15. <para><xref linkend="chapter05"/> then discusses the installation of a number
  16. of packages that will form the basic development suite (or toolchain) which is
  17. used to build the actual system in <xref linkend="chapter06"/>. Some of these
  18. packages are needed to resolve circular dependencies -- for example, to compile
  19. a compiler you need a compiler.</para>
  20. <para>The first thing to be done in <xref linkend="chapter05"/> is build a
  21. first pass of the toolchain, made up of Binutils and GCC. The programs from
  22. these packages will be linked statically in order for them to be usable
  23. independently of the host system. The second thing to do is build Glibc, the
  24. C library. Glibc will be compiled by the toolchain programs we just built in
  25. the first pass. The third thing to do is build a second pass of the toolchain.
  26. This time the toolchain will be dynamically linked against the newly built
  27. Glibc. The remaining <xref linkend="chapter05"/> packages are all built using
  28. this second pass toolchain and dynamically linked against the new
  29. host-independent Glibc. When this is done, the LFS installation process will no
  30. longer depend on the host distribution, with the exception of the running
  31. kernel.</para>
  32. <para>You may be thinking that <quote>this seems like a lot of work, just to
  33. get away from my host distribution</quote>. Well, a full technical explanation
  34. is provided at the start of <xref linkend="chapter05"/>, including some notes
  35. on the differences between statically and dynamically linked programs.</para>
  36. <para>In <xref linkend="chapter06"/> your real LFS system will be built. The
  37. chroot (change root) program is used to enter a virtual environment and start
  38. a new shell whose root directory will be set to the LFS partition. This is very
  39. similar to rebooting and instructing the kernel to mount the LFS partition as
  40. the root partition. The reason that you don't actually reboot, but instead
  41. chroot, is that creating a bootable system requires additional work which isn't
  42. necessary just yet. But the major advantage is that chrooting allows you to
  43. continue using the host while LFS is being built. While waiting for package
  44. compilation to complete, you can simply switch to a different VC (Virtual
  45. Console) or X desktop and continue using the computer as you normally
  46. would.</para>
  47. <para>To finish the installation, the bootscripts are set up in
  48. <xref linkend="chapter07"/>, the kernel and bootloader are set up in
  49. <xref linkend="chapter08"/>, and <xref linkend="chapter09"/> contains some
  50. pointers to help you after you finish the book. Then, finally, you're ready to
  51. reboot your computer into your new LFS system.</para>
  52. <para>This is the process in a nutshell. Detailed information on the steps you
  53. will take are discussed in the chapters and package descriptions as you
  54. progress through them. If something isn't completely clear now, don't worry,
  55. everything will fall into place soon.</para>
  56. <para>Please read <xref linkend="chapter02"/> carefully as it explains a few
  57. important things you should be aware of before you begin to work through
  58. <xref linkend="chapter05"/> and beyond.</para>
  59. </sect1>