lilo.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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;
  33. cp $(grep "image.*=" /etc/lilo.conf | cut -f 2 -d "=") $LFS/boot</userinput></screen></para>
  34. </sect1>