1 |
<?xml version='1.0' encoding='UTF-8'?> |
2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
3 |
|
4 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
5 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
6 |
|
7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-bootloader.xml,v 1.22 2008/10/26 18:58:52 nightmorph Exp $ --> |
8 |
|
9 |
<sections> |
10 |
|
11 |
<version>10.0</version> |
12 |
<date>2010-07-18</date> |
13 |
|
14 |
<section> |
15 |
<title>Making your Choice</title> |
16 |
<subsection> |
17 |
<title>Introduction</title> |
18 |
<body> |
19 |
|
20 |
<p> |
21 |
Now that your kernel is configured and compiled and the necessary system |
22 |
configuration files are filled in correctly, it is time to install a |
23 |
program that will fire up your kernel when you start the system. Such a |
24 |
program is called a <e>bootloader</e>. |
25 |
</p> |
26 |
|
27 |
<p> |
28 |
Several bootloaders exist for Linux/Alpha. You must choose one of the supported |
29 |
bootloaders, not all. You have the choice between <uri link="#aboot">aBoot</uri> |
30 |
and <uri link="#milo">MILO</uri>. |
31 |
</p> |
32 |
|
33 |
</body> |
34 |
</subsection> |
35 |
</section> |
36 |
<section id="aboot"> |
37 |
<title>Default: Using aboot</title> |
38 |
<body> |
39 |
|
40 |
<note> |
41 |
<c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b> |
42 |
partitions. |
43 |
</note> |
44 |
|
45 |
<p> |
46 |
We first install aboot on our system. Of course we use <c>emerge</c> to |
47 |
do so: |
48 |
</p> |
49 |
|
50 |
<pre caption="Installing aboot"> |
51 |
# <i>emerge aboot</i> |
52 |
</pre> |
53 |
|
54 |
<p> |
55 |
The next step is to make our bootdisk bootable. This will start |
56 |
<c>aboot</c> when you boot your system. We make our bootdisk bootable by |
57 |
writing the <c>aboot</c> bootloader to the start of the disk. |
58 |
</p> |
59 |
|
60 |
<pre caption="Making your bootdisk bootable"> |
61 |
# <i>swriteboot -f3 /dev/sda /boot/bootlx</i> |
62 |
# <i>abootconf /dev/sda 2</i> |
63 |
</pre> |
64 |
|
65 |
<note> |
66 |
If you use a different partitioning scheme than the one we use |
67 |
throughout this chapter, you have to change the commands accordingly. |
68 |
Please read the appropriate manual pages (<c>man 8 swriteboot</c> and |
69 |
<c>man 8 abootconf</c>). Also, if your root filesystem is ran using the JFS |
70 |
filesystem, make sure it gets mounted read-only at first by adding <c>ro</c> as |
71 |
a kernel option. |
72 |
</note> |
73 |
|
74 |
<p> |
75 |
Additionally, you can make Gentoo boot automatically by setting up the |
76 |
aboot configuration file and some SRM variables. You can try setting |
77 |
these variables from Linux, but it may be easier to do so from the SRM |
78 |
console itself. |
79 |
</p> |
80 |
|
81 |
<pre caption="Automatically booting Gentoo"> |
82 |
# <i>echo '0:2/boot/vmlinux.gz root=/dev/sda2' > /etc/aboot.conf</i> |
83 |
# <i>cd /proc/srm_environment/named_variables</i> |
84 |
# <i>echo -n 0 > boot_osflags</i> |
85 |
# <i>echo -n '' > boot_file</i> |
86 |
# <i>echo -n 'BOOT' > auto_action</i> |
87 |
# <i>echo -n 'dkc100' > bootdef_dev</i> |
88 |
<comment>(Substitute dkc100 with whatever your boot device is)</comment> |
89 |
</pre> |
90 |
|
91 |
<p> |
92 |
If you need to get into the SRM console again in the future (to recover |
93 |
your Gentoo install, play with some variables, or whatever), just hit |
94 |
CTRL+C to abort the automatic loading process. |
95 |
</p> |
96 |
|
97 |
<p> |
98 |
If you're installing using a serial console, don't forget to include |
99 |
the serial console boot flag in <path>aboot.conf</path>. See |
100 |
<path>/etc/aboot.conf.example</path> for some further information. |
101 |
</p> |
102 |
|
103 |
<p> |
104 |
Aboot is now configured and ready to use. Continue with <uri |
105 |
link="#reboot">Rebooting the System</uri>. |
106 |
</p> |
107 |
|
108 |
</body> |
109 |
</section> |
110 |
<section id="milo"> |
111 |
<title>Alternative: Using MILO</title> |
112 |
<body> |
113 |
|
114 |
<p> |
115 |
Before continuing, you should decide on how to use MILO. In this |
116 |
section, we will assume that you want to make a MILO boot floppy. If you |
117 |
are going to boot from an MS-DOS partition on your hard disk, you should |
118 |
amend the commands appropriately. |
119 |
</p> |
120 |
|
121 |
<p> |
122 |
To install MILO, we use <c>emerge</c>. |
123 |
</p> |
124 |
|
125 |
<pre caption="Installing MILO"> |
126 |
# <i>emerge milo</i> |
127 |
</pre> |
128 |
|
129 |
<p> |
130 |
After MILO has been installed, the MILO images should be in |
131 |
<path>/opt/milo</path>. The commands below make a bootfloppy for use |
132 |
with MILO. Remember to use the correct image for your Alpha-system. |
133 |
</p> |
134 |
|
135 |
<pre caption="Installing MILO on a floppy"> |
136 |
<comment>(First insert a blank floppy)</comment> |
137 |
# <i>fdformat /dev/fd0</i> |
138 |
# <i>mformat a:</i> |
139 |
# <i>mcopy /opt/milo/milo-2.4-18-gentoo-ruffian a:\milo</i> |
140 |
# <i>mcopy /opt/milo/linload.exe a:\linload.exe</i> |
141 |
<comment>(Only if you have a Ruffian:</comment> |
142 |
# <i>mcopy /opt/milo/ldmilo.exe a:\ldmilo.exe</i> |
143 |
<comment>)</comment> |
144 |
# <i>echo -ne '\125\252' | dd of=/dev/fd0 bs=1 seek=510 count=2</i> |
145 |
</pre> |
146 |
|
147 |
<p> |
148 |
Your MILO boot floppy is now ready to boot Gentoo Linux. You may need to |
149 |
set environment variables in your ARCS Firmware to get MILO to start; |
150 |
this is all explained in the <uri |
151 |
link="http://tldp.org/HOWTO/MILO-HOWTO/">MILO-HOWTO</uri> with some examples |
152 |
on common systems, and examples of the commands to use in interactive mode. |
153 |
</p> |
154 |
|
155 |
<p> |
156 |
Not reading the <uri link="http://tldp.org/HOWTO/MILO-HOWTO/">MILO-HOWTO</uri> |
157 |
is a <e>bad</e> idea. |
158 |
</p> |
159 |
|
160 |
<p> |
161 |
Now continue with <uri link="#reboot">Rebooting the System</uri>. |
162 |
</p> |
163 |
|
164 |
</body> |
165 |
</section> |
166 |
<section id="reboot"> |
167 |
<title>Rebooting the System</title> |
168 |
<subsection> |
169 |
<body> |
170 |
|
171 |
<p> |
172 |
Exit the chrooted environment and unmount all mounted partitions. Then type in |
173 |
that one magical command you have been waiting for: <c>reboot</c>. |
174 |
</p> |
175 |
|
176 |
<pre caption="Exiting the chroot, unmounting all partitions and rebooting"> |
177 |
# <i>exit</i> |
178 |
cdimage ~# <i>cd</i> |
179 |
cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i> |
180 |
cdimage ~# <i>reboot</i> |
181 |
</pre> |
182 |
|
183 |
<p> |
184 |
Of course, don't forget to remove the bootable CD, otherwise the CD will be |
185 |
booted again instead of your new Gentoo system. |
186 |
</p> |
187 |
|
188 |
<p> |
189 |
Once rebooted in your Gentoo installation, finish up with <uri |
190 |
link="?part=1&chap=11">Finalizing your Gentoo Installation</uri>. |
191 |
</p> |
192 |
|
193 |
</body> |
194 |
</subsection> |
195 |
</section> |
196 |
|
197 |
</sections> |