lilo.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <sect1 id="ch08-lilo">
  2. <title>Making the LFS system bootable</title>
  3. <para>In order to be 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>Also note that if you are using reiserfs for your root partition,
  25. the line <userinput>read-only</userinput> should be changed to
  26. <userinput>read-write</userinput>.</para>
  27. <para>Now the boot loader gets updated by running:</para>
  28. <para><screen><userinput>/sbin/lilo</userinput></screen></para>
  29. <para>The last step is syncing the host system lilo config. files with the
  30. LFS system:</para>
  31. <para><screen><userinput>cp /etc/lilo.conf $LFS/etc &amp;&amp;</userinput>
  32. <userinput>cp &lt;kernel images&gt; $LFS/boot</userinput></screen></para>
  33. <para>To find out which kernel images files are being used, look at the
  34. /etc/lilo.conf file and find the lines starting with
  35. <emphasis>image=</emphasis>. If your host system has kernel files in
  36. other places than the /boot directory, make sure you update the paths
  37. in the $LFS/etc/lilo.conf file so that it does look for them in the
  38. /boot directory.</para>
  39. </sect1>