lilo.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <sect1 id="ch08-lilo">
  2. <title>Making the LFS system bootable</title>
  3. <para>
  4. In order to being able to boot the LFS system, we need to update our
  5. bootloader. We're assuming that your host system is using Lilo (since
  6. that's the most commonly used boot loader at the moment).
  7. </para>
  8. <para>
  9. We will not be running the lilo program inside chroot. Running lilo
  10. inside chroot can have fatal side-effects which render your MBR useles
  11. and you'd need a boot disk to be able to start any Linux system (either
  12. the host system or the LFS system).
  13. </para>
  14. <para>
  15. First we'll exit chroot and copy the lfskernel file to the host system:
  16. </para>
  17. <blockquote><literallayout>
  18. <userinput>logout &amp;&amp;</userinput>
  19. <userinput>cp $LFS/boot/lfskernel /boot
  20. &amp;&amp;</userinput>
  21. </literallayout></blockquote>
  22. <para>
  23. The next step is adding an entry to /etc/lilo.conf so that we can
  24. choose LFS when booting the computer:
  25. </para>
  26. <literallayout>
  27. <userinput>cat &gt;&gt; /etc/lilo.conf &lt;&lt; "EOF"</userinput>
  28. image=/boot/lfskernel
  29. label=lfs
  30. root=&lt;partition&gt;
  31. read-only
  32. <userinput>EOF</userinput>
  33. </literallayout>
  34. <para>
  35. &lt;partition&gt; must be replaced by the LFS partition's designation.
  36. </para>
  37. <para>
  38. Now the boot loader gets updated by running:
  39. </para>
  40. <blockquote><literallayout>
  41. <userinput>/sbin/lilo</userinput>
  42. </literallayout></blockquote>
  43. <para>
  44. The last step is syncing the host system lilo config. files with the
  45. LFS system:
  46. </para>
  47. <blockquote><literallayout>
  48. <userinput>cp /etc/lilo.conf $LFS/etc &amp;&amp;</userinput>
  49. <userinput>cp &lt;kernel images&gt; $LFS/boot</userinput>
  50. </literallayout></blockquote>
  51. <para>
  52. To find out which kernel images files are being used, look at the
  53. /etc/lilo.conf file and find the lines starting with
  54. <emphasis>image=</emphasis>. If your host system has kernel files in
  55. other places than the /boot directory, make sure you update the paths
  56. in the $LFS/etc/lilo.conf file so that it does look for them in the
  57. /boot directory.
  58. </para>
  59. </sect1>