lilo.xml 2.0 KB

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