source: BOOK/bootable/x86_64-64/lilo.xml@ 3c67a00

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 3c67a00 was 968933d, checked in by Chris Staub <chris@…>, 16 years ago

Text updates

  • Property mode set to 100644
File size: 5.7 KB
RevLine 
[48b28ab]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[48b28ab]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-bootable-lilo">
9 <?dbhtml filename="lilo.html"?>
10
[fb40919]11 <title>Making the CLFS System Bootable</title>
[48b28ab]12
13 <indexterm zone="ch-bootable-lilo">
14 <primary sortas="a-Lilo">Lilo</primary>
15 <secondary>configuring</secondary>
16 </indexterm>
17
[fb40919]18 <para os="a">Your shiny new CLFS system is almost complete. One of the
[968933d]19 last things to do is to ensure that the system can be properly booted. The
20 instructions below apply only to computers using Lilo, which in the
21 context of this book means x86_64 Pure64 systems. Information on
22 <quote>boot loading</quote> for other architectures should be available in
23 the usual resource-specific locations for those architectures.</para>
[48b28ab]24
25 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
26 href="../x86/grub.xml"
27 xpointer="xpointer(//*[@os='b'])"/>
28
[968933d]29 <para os="c">If you have multiple systems on your machine using a different
30 bootloader such as GRUB, you may prefer to use that instead - consult the
31 appropriate documentation. The rest of this section assumes you are going
32 to use Lilo.</para>
[48b28ab]33
34 <para os="d">Earlier, we compiled and installed the Lilo boot loader
[968933d]35 software in preparation for this step. The procedure involves writing a
36 boot image to a specific location on the hard drive. We highly recommend
37 using <command>mkrescue</command> to create a Lilo boot CD (using e.g.
38 <command>dvdrecord</command> from dvdrtools) as a backup (this requires
39 loopback block device support in the kernel).</para>
40
41 <para os="e">Normally, you interact with Lilo by using the cursor and
42 <literal>enter</literal> keys to select from the available option(s), but
43 sometimes it is necessary to add other boot options, such as e.g.
44 'init=/bin/bash' to debug boot failures. The more your keyboard layout
45 differs from the US qwerty layout, the harder it becomes to type boot
46 options unless Lilo knows about your keyboard layout. So, we will create a
47 key table for Lilo (.ktl) file - at one point in the documentation these
48 are referred to as .klt files, which may be a typo, but has been followed
49 by some distros. The name, and location, are not important but it is
50 conventional to put these in <filename class="directory">/boot</filename>
51 with the name representing the key layout. For a British keyboard layout,
52 the following command will achieve this:</para>
[48b28ab]53
54<screen os="f" role="nodump"><userinput>keytab-lilo.pl uk >/boot/uk.ktl</userinput></screen>
55
[968933d]56 <para os="g">The argument to the command is the name of the keymap, or if
57 necessary you can specify the full path to the keymap. Use whatever is
58 appropriate for your keyboard.</para>
[48b28ab]59
[968933d]60 <para os="h">When the x86 CLFS book used to include Lilo, it advised
61 against running it from chroot in case the MBR became corrupted.
62 Provided you have <filename class="directory">/proc</filename> mounted
63 and have device special files for the disks, it seems to be safe to run
64 recent versions of Lilo in chroot, although it is always possible that
65 an updated bootloader, or defective configuration file, may render the
66 system unbootable.</para>
[48b28ab]67
[968933d]68 <para os="i">The next step is to create
69 <filename>/etc/lilo.conf</filename>:</para>
[48b28ab]70
71<screen os="j" role="nodump"><userinput>cat &gt; /etc/lilo.conf &lt;&lt; "EOF"
72<literal># Begin /etc/lilo.conf
73# lilo.conf
74#
75# global options
76boot=/dev/&lt;bootdisk&gt;
77keytable=/boot/&lt;keytable&gt;
78lba32
79map=/boot/map
80prompt
81
82# set the name of the default image to boot
[3f76cac]83default=clfs
[48b28ab]84
85# define an image
[3f76cac]86image=/boot/clfskernel
87 label=clfs
[48b28ab]88 root=/dev/&lt;partition&gt;
89 read-only
90# optionally add parameters to pass, e.g.
91# append="video=radeonfb:1024x768-16@70"
92
93# repeat for any other kernel images
94
95# optionally, add legacy operating systems
96# see man lilo.conf for examples
97EOF</literal></userinput></screen>
98
99
100 <para os="k">Replace &lt;bootdisk&gt; with the name of the disk (or
[968933d]101 partition) on which the boot sector is to be written, e.g. sda.
102 Replace &lt;keytable&gt; with the name of the keytable file you
103 created, and &lt;partition&gt; with the name of the root partition
104 for the new system.
[48b28ab]105 </para>
106
107 <warning os="l">
108 <para>The following command will overwrite the current boot loader.
109 Do not run the command if this is not desired.</para>
110 </warning>
111
112 <para os="m">Run Lilo:</para>
113
114<screen os="n" role="nodump"><userinput>/sbin/lilo -v</userinput></screen>
115
116 <note os='o'>
[968933d]117 <para>People who have been used to GRUB need to be aware that Lilo works
118 differently - in particular, you cannot edit the available choices as you
119 can in the <command>grub</command> shell, and Lilo records the block
120 addresses of the kernels into the boot blocks each time
121 <command>/sbin/lilo</command> is run. This means that when you compile a
122 new kernel, you have to add it to <filename>/etc/lilo.conf</filename> and
123 rerun <command>/sbin/lilo</command>. It also means that if you recompile
124 an existing kernel and save it to the same name you still have to rerun
125 <command>/sbin/lilo</command> in case it now occupies different blocks on
126 the filesystem.</para>
[48b28ab]127 </note>
128
[968933d]129 <para os="p">If you are running multiple systems on this box and using
130 Lilo, it is a good idea to ensure that each system is running the same
131 version of Lilo, otherwise an old version may not be able to overwrite
132 the bootloader from a newer version. You will also need to ensure that the
133 copies of <filename>/etc/lilo.conf</filename> on each system are kept
134 synchronised.</para>
[48b28ab]135
136</sect1>
Note: See TracBrowser for help on using the repository browser.