2001-01-24 00:31:17 +00:00
|
|
|
<sect1 id="ch08-lilo">
|
2001-04-14 23:23:28 +01:00
|
|
|
<title>Making the LFS system bootable</title>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-06 12:44:37 +01:00
|
|
|
<para>In order to be able to boot the LFS system, we need to update our
|
2001-04-14 23:23:28 +01:00
|
|
|
bootloader. We're assuming that your host system is using Lilo (since
|
2001-07-22 20:45:10 +01:00
|
|
|
that's the most commonly used boot loader at the moment).</para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>We will not be running the lilo program inside chroot. Running lilo
|
2001-06-30 04:34:11 +01:00
|
|
|
inside chroot can have fatal side-effects which render your MBR useless
|
2001-04-14 23:23:28 +01:00
|
|
|
and you'd need a boot disk to be able to start any Linux system (either
|
2001-07-22 20:45:10 +01:00
|
|
|
the host system or the LFS system).</para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>First we'll exit chroot and copy the lfskernel file to the host
|
|
|
|
system:</para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><screen><userinput>logout</userinput>
|
2001-08-23 23:38:49 +01:00
|
|
|
<userinput>cp -f $LFS/boot/lfskernel /boot</userinput></screen></para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>The next step is adding an entry to /etc/lilo.conf so that we can
|
|
|
|
choose LFS when booting the computer:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><screen><userinput>cat >> /etc/lilo.conf << "EOF"</userinput>
|
2001-07-10 16:06:31 +01:00
|
|
|
image=/boot/lfskernel
|
|
|
|
label=lfs
|
|
|
|
root=<partition>
|
|
|
|
read-only
|
2001-07-22 20:45:10 +01:00
|
|
|
<userinput>EOF</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><partition> must be replaced by the LFS
|
|
|
|
partition's designation.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-24 23:41:25 +01:00
|
|
|
<para>Also note that if you are using reiserfs for your root partition,
|
|
|
|
the line <userinput>read-only</userinput> should be changed to
|
|
|
|
<userinput>read-write</userinput>.</para>
|
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Now the boot loader gets updated by running:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><screen><userinput>/sbin/lilo</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>The last step is syncing the host system lilo config. files with the
|
|
|
|
LFS system:</para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-08-23 23:38:49 +01:00
|
|
|
<para><screen><userinput>cp -f /etc/lilo.conf $LFS/etc &&</userinput>
|
|
|
|
<userinput>cp -f <kernel images> $LFS/boot</userinput></screen></para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>To find out which kernel images files are being used, look at the
|
2001-04-14 23:23:28 +01:00
|
|
|
/etc/lilo.conf file and find the lines starting with
|
|
|
|
<emphasis>image=</emphasis>. If your host system has kernel files in
|
|
|
|
other places than the /boot directory, make sure you update the paths
|
|
|
|
in the $LFS/etc/lilo.conf file so that it does look for them in the
|
2001-07-22 20:45:10 +01:00
|
|
|
/boot directory.</para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect1>
|
|
|
|
|