lilo.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <sect1 id="ch08-lilo">
  2. <title>Making the LFS system bootable</title>
  3. <?dbhtml filename="lilo.html" dir="chapter08"?>
  4. <para>In order to be 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).</para>
  7. <para>We will not be running the lilo program inside chroot. Running lilo
  8. inside chroot can have fatal side-effects which render your MBR useless
  9. and you'd need a boot disk to be able to start any Linux system (either
  10. the host system or the LFS system).</para>
  11. <para>First we'll exit chroot and copy the lfskernel file to the host
  12. system:</para>
  13. <para><screen><userinput>logout</userinput>
  14. <userinput>cp $LFS/boot/lfskernel /boot</userinput></screen></para>
  15. <para>The next step is adding an entry to /etc/lilo.conf so that we can
  16. choose LFS when booting the computer:</para>
  17. <para><screen><userinput>cat &gt;&gt; /etc/lilo.conf &lt;&lt; "EOF"</userinput>
  18. image=/boot/lfskernel
  19. label=lfs
  20. root=&lt;partition&gt;
  21. read-only
  22. <userinput>EOF</userinput></screen></para>
  23. <para>&lt;partition&gt; must be replaced with the LFS
  24. partition's designation.</para>
  25. <para>Also note that if you are using reiserfs for your root partition,
  26. the line <userinput>read-only</userinput> should be changed to
  27. <userinput>read-write</userinput>.</para>
  28. <para>Now, update the boot loader by running:</para>
  29. <para><screen><userinput>/sbin/lilo -v</userinput></screen></para>
  30. <para>The last step is synchronizing the host system's lilo
  31. configuration files with the LFS system's:</para>
  32. <para><screen><userinput>cp /etc/lilo.conf $LFS/etc &amp;&amp;</userinput>
  33. <userinput>cp &lt;kernel images&gt; $LFS/boot</userinput></screen></para>
  34. <para>To find out which kernel images files are being used, look at the
  35. /etc/lilo.conf file and look for the lines starting with
  36. <emphasis>image=</emphasis>. If your host system has kernel files in
  37. other places than the /boot directory, make sure you update the paths
  38. in the $LFS/etc/lilo.conf file so that it does look for them in the
  39. /boot directory.</para>
  40. </sect1>