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