1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="ch-bootable-grub">
|
---|
9 | <?dbhtml filename="grub.html"?>
|
---|
10 |
|
---|
11 | <title>Making the CLFS System Bootable</title>
|
---|
12 |
|
---|
13 | <indexterm zone="ch-bootable-grub">
|
---|
14 | <primary sortas="a-GRUB">GRUB</primary>
|
---|
15 | <secondary>configuring</secondary>
|
---|
16 | </indexterm>
|
---|
17 |
|
---|
18 | <para os="a">Your shiny new CLFS system is almost complete. One of the last
|
---|
19 | things to do is to ensure that the system can be properly booted. The
|
---|
20 | instructions below apply only to computers of x86 and x86_64 architecture,
|
---|
21 | meaning mainstream PCs. Information on <quote>boot loading</quote> for
|
---|
22 | other architectures should be available in the usual resource-specific
|
---|
23 | locations for those architectures.</para>
|
---|
24 |
|
---|
25 | <para os="b">Boot loading can be a complex area, so a few cautionary words
|
---|
26 | are in order. Be familiar with the current boot loader and any other
|
---|
27 | operating systems present on the hard drive(s) that need to be bootable.
|
---|
28 | Make sure that an emergency boot disk is ready to <quote>rescue</quote>
|
---|
29 | the computer if the computer becomes unusable (un-bootable).</para>
|
---|
30 |
|
---|
31 | <para os="c">The first thing we need to do is generate a configuration for
|
---|
32 | GRUB. In previous versions of grub we could create the configuration manually
|
---|
33 | here, but with GRUB2 we can generate <filename>grub.cfg</filename>
|
---|
34 | automatically. You can do this with the following command:</para>
|
---|
35 |
|
---|
36 | <screen os="d"><userinput>grub-mkconfig -o /boot/grub/grub.cfg</userinput></screen>
|
---|
37 |
|
---|
38 | <warning os="w1">
|
---|
39 | <para>The following command will overwrite the current boot loader.
|
---|
40 | Do not run the command if this is not desired, for example, if using
|
---|
41 | a third party boot manager to manage the Master Boot Record (MBR).
|
---|
42 | In this scenario, it would make more sense to install GRUB into the
|
---|
43 | <quote>boot sector</quote> of the CLFS partition. In this case, this
|
---|
44 | next command would become <userinput>grub-install /dev/sda2</userinput>
|
---|
45 | .</para>
|
---|
46 | </warning>
|
---|
47 |
|
---|
48 | <para os="e">Instruct GRUB to install itself int othe MBR of
|
---|
49 | <filename class="partition">sda</filename>:</para>
|
---|
50 |
|
---|
51 | <screen os="f"><userinput>grub-install /dev/sda</userinput></screen>
|
---|
52 |
|
---|
53 | </sect1>
|
---|