aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/lilo.xml
blob: 3c1d29157d729420168dca9d509e3a56ea0246a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<sect1 id="ch08-lilo">
<title>Making the LFS system bootable</title>

<para>
In order to being able to boot the LFS system, we need to update our
bootloader. We're assuming that your host system is using Lilo (since
that's the most commonly used boot loader at the moment).
</para>

<para>
We will not be running the lilo program inside chroot. Running lilo
inside chroot can have fatal side-effects which render your MBR useles
and you'd need a boot disk to be able to start any Linux system (either
the host system or the LFS system).
</para>

<para>
First we'll exit chroot and copy the lfskernel file to the host system:
</para>

<blockquote><literallayout>

	<userinput>logout &amp;&amp;</userinput>
	<userinput>cp $LFS/boot/lfskernel /boot
		&amp;&amp;</userinput>

</literallayout></blockquote>

<para>
The next step is adding an entry to /etc/lilo.conf so that we can
choose LFS when booting the computer:
</para>

<literallayout>

	<userinput>cat &gt;&gt; /etc/lilo.conf &lt;&lt; "EOF"</userinput>
		image=/boot/lfskernel
		label=lfs
		root=&lt;partition&gt;
		read-only
	<userinput>EOF</userinput>

</literallayout>

<para>
&lt;partition&gt; must be replaced by the LFS partition's designation.
</para>

<para>
Now the boot loader gets updated by running:
</para>

<blockquote><literallayout>

	<userinput>/sbin/lilo</userinput>

</literallayout></blockquote>

<para>
The last step is syncing the host system lilo config. files with the
LFS system:
</para>

<blockquote><literallayout>

	<userinput>cp /etc/lilo.conf $LFS/etc &amp;&amp;</userinput>
	<userinput>cp &lt;kernel images&gt; $LFS/boot</userinput>

</literallayout></blockquote>

<para>
To find out which kernel images files are being used, look at the
/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
/boot directory.
</para>

</sect1>