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-09-26 01:35:10 +01:00
|
|
|
<?dbhtml filename="lilo.html" dir="chapter08"?>
|
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-28 21:50:57 +01:00
|
|
|
<userinput>cp $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-08-29 21:01:45 +01:00
|
|
|
<para><partition> must be replaced with the LFS
|
2001-07-22 20:45:10 +01:00
|
|
|
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-08-29 21:01:45 +01:00
|
|
|
<para>Now, update the boot loader by running:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2002-02-10 17:35:24 +00:00
|
|
|
<para><screen><userinput>/sbin/lilo -v</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-29 21:01:45 +01:00
|
|
|
<para>The last step is synchronizing the host system's lilo
|
|
|
|
configuration files with the LFS system's:</para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2002-03-10 00:23:00 +00:00
|
|
|
<para><screen><userinput>cp /etc/lilo.conf $LFS/etc &&
|
2002-03-10 02:02:15 +00:00
|
|
|
cp $(grep "image.*=" /etc/lilo.conf | cut -f 2 -d "=") $LFS/boot</userinput></screen></para>
|
2001-04-14 23:23:28 +01:00
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect1>
|
|
|
|
|