1 |
nightmorph 06/08/13 08:43:00 |
2 |
|
3 |
Added: hb-install-about.xml |
4 |
hb-install-x86+amd64-bootloader.xml |
5 |
hb-install-x86+amd64-disk.xml |
6 |
hb-install-x86+amd64-kernel.xml |
7 |
hb-install-x86+amd64-medium.xml |
8 |
Log: |
9 |
Added some x86/amd64 files to the networked /draft/ dir in prep for the release, updated too |
10 |
|
11 |
Revision Changes Path |
12 |
1.29 xml/htdocs/doc/en/handbook/draft/hb-install-about.xml |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-about.xml?rev=1.29&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-about.xml?rev=1.29&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-about.xml?r1=1.28&r2=1.29 |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml |
22 |
|
23 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml?rev=1.1&view=markup |
24 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml?rev=1.1&content-type=text/plain |
25 |
|
26 |
Index: hb-install-x86+amd64-bootloader.xml |
27 |
=================================================================== |
28 |
<?xml version='1.0' encoding='UTF-8'?> |
29 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
30 |
|
31 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
32 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
33 |
|
34 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ --> |
35 |
|
36 |
<sections> |
37 |
|
38 |
<version>3.0</version> |
39 |
<date>2006-08-13</date> |
40 |
|
41 |
<section> |
42 |
<title>Making your Choice</title> |
43 |
<subsection> |
44 |
<title>Introduction</title> |
45 |
<body> |
46 |
|
47 |
<p> |
48 |
Now that your kernel is configured and compiled and the necessary system |
49 |
configuration files are filled in correctly, it is time to install a |
50 |
program that will fire up your kernel when you start the system. Such a |
51 |
program is called a <e>bootloader</e>. |
52 |
</p> |
53 |
|
54 |
<p test="func:keyval('arch')='x86'"> |
55 |
For x86, Gentoo Linux provides <uri |
56 |
link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>. |
57 |
</p> |
58 |
|
59 |
<p> |
60 |
But before we install the bootloader, we inform you how to configure |
61 |
framebuffer (assuming you want it of course). With framebuffer you can run the |
62 |
Linux command line with (limited) graphical features (such as using the nice |
63 |
bootsplash image Gentoo provides). |
64 |
</p> |
65 |
|
66 |
</body> |
67 |
</subsection> |
68 |
<subsection> |
69 |
<title>Optional: Framebuffer</title> |
70 |
<body> |
71 |
|
72 |
<p> |
73 |
<e>If</e> you have configured your kernel with framebuffer support (or you used |
74 |
<c>genkernel</c> default kernel configuration), you can activate it by adding a |
75 |
<c>vga</c> and/or a <c>video</c> statement to your bootloader configuration |
76 |
file. |
77 |
</p> |
78 |
|
79 |
<p test="func:keyval('arch')='x86'"> |
80 |
First of all, you need to know what type of framebuffer device you're using. If |
81 |
you use a Gentoo patched kernel tree (such as <c>gentoo-sources</c>) you will |
82 |
have had the possibility of selecting <c>vesafb-tng</c> as the <e>VESA driver |
83 |
type</e> (which is default for these kernel sources). If this is the case, you |
84 |
are using <c>vesafb-tng</c> and <e>do not need</e> to set a <c>vga</c> |
85 |
statement. Otherwise you are using the <c>vesafb</c> driver and <e>need</e> to |
86 |
set the <c>vga</c> statement. |
87 |
</p> |
88 |
|
89 |
<p test="func:keyval('arch')='AMD64'"> |
90 |
64-bit systems must use the the <c>vesafb</c> driver, and need the <c>vga</c> |
91 |
statement. |
92 |
</p> |
93 |
|
94 |
<p> |
95 |
The <c>vga</c> statement controls the resolution and color depth of your |
96 |
framebuffer screen for <c>vesafb</c>. As stated in |
97 |
<path>/usr/src/linux/Documentation/fb/vesafb.txt</path> (which gets installed |
98 |
when you install a kernel source package), you need to pass the VESA number |
99 |
corresponding to the requested resolution and color depth to it. |
100 |
</p> |
101 |
|
102 |
<p> |
103 |
The following table lists the available resolutions and color depths and |
104 |
matches those against the value that you need to pass on to the <c>vga</c> |
105 |
statement. |
106 |
</p> |
107 |
|
108 |
<table> |
109 |
<tr> |
110 |
<ti></ti> |
111 |
<th>640x480</th> |
112 |
<th>800x600</th> |
113 |
<th>1024x768</th> |
114 |
<th>1280x1024</th> |
115 |
</tr> |
116 |
<tr> |
117 |
<th>256</th> |
118 |
<ti>0x301</ti> |
119 |
<ti>0x303</ti> |
120 |
<ti>0x305</ti> |
121 |
<ti>0x307</ti> |
122 |
</tr> |
123 |
<tr> |
124 |
<th>32k</th> |
125 |
<ti>0x310</ti> |
126 |
<ti>0x313</ti> |
127 |
<ti>0x316</ti> |
128 |
<ti>0x319</ti> |
129 |
</tr> |
130 |
<tr> |
131 |
<th>64k</th> |
132 |
<ti>0x311</ti> |
133 |
<ti>0x314</ti> |
134 |
<ti>0x317</ti> |
135 |
<ti>0x31A</ti> |
136 |
</tr> |
137 |
<tr> |
138 |
<th>16M</th> |
139 |
<ti>0x312</ti> |
140 |
<ti>0x315</ti> |
141 |
<ti>0x318</ti> |
142 |
<ti>0x31B</ti> |
143 |
</tr> |
144 |
</table> |
145 |
|
146 |
<p> |
147 |
The <c>video</c> statement controls framebuffer display options. It needs to be |
148 |
given the framebuffer driver (<c>vesafb</c> for 2.6 kernels, or <c>vesa</c> for |
149 |
2.4 kernels) followed by the control statements you wish to enable. All |
150 |
variables are listed in |
151 |
<path>/usr/src/linux/Documentation/fb/vesafb.txt</path>. The most-used options |
152 |
are: |
153 |
</p> |
154 |
|
155 |
<table> |
156 |
<tr> |
157 |
<th>Control</th> |
158 |
<th>Description</th> |
159 |
</tr> |
160 |
<tr> |
161 |
<ti>ywrap</ti> |
162 |
<ti> |
163 |
Assume that the graphical card can wrap around its memory (i.e. continue at |
164 |
the beginning when it has approached the end) |
165 |
</ti> |
166 |
</tr> |
167 |
<tr> |
168 |
<ti>mtrr:n</ti> |
169 |
<ti> |
170 |
Setup MTRR registers. <c>n</c> can be:<br/> |
171 |
0 - disabled<br/> |
172 |
1 - uncachable<br/> |
173 |
2 - write-back<br/> |
174 |
3 - write-combining<br/> |
175 |
4 - write-through |
176 |
</ti> |
177 |
</tr> |
178 |
<tr test="func:keyval('arch')='x86'"> |
179 |
<ti><c>mode</c></ti> |
180 |
<ti> |
181 |
(<c>vesafb-tng</c> only)<br/> |
182 |
Set up the resolution, color depth and refresh rate. For instance, |
183 |
<c>1024x768-32@85</c> for a resolution of 1024x768, 32 bit color depth and a |
184 |
refresh rate of 85 Hz. |
185 |
</ti> |
186 |
</tr> |
187 |
</table> |
188 |
|
189 |
</body> |
190 |
<body test="func:keyval('arch')='AMD64'"> |
191 |
|
192 |
<p> |
193 |
The result of those two statements could be something like <c>vga=0x318 |
194 |
video=vesafb:mtrr:3,ywrap</c>. Write this setting down; you will need it |
195 |
shortly. |
196 |
</p> |
197 |
|
198 |
<p> |
199 |
While LILO does work on AMD64, Gentoo only supports using GRUB. Now continue by |
200 |
its <uri link="#grub">installation</uri>. |
201 |
</p> |
202 |
|
203 |
</body> |
204 |
<body test="func:keyval('arch')='x86'"> |
205 |
|
206 |
<p> |
207 |
The result of those two statements could be something like <c>vga=0x318 |
208 |
video=vesafb:mtrr:3,ywrap</c> or |
209 |
<c>video=vesafb:mtrr:3,ywrap,1024x768-32@85</c>. Write this setting down; you |
210 |
will need it shortly. |
211 |
</p> |
212 |
|
213 |
<p> |
214 |
Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri |
215 |
link="#lilo">LILO</uri>. |
216 |
</p> |
217 |
|
218 |
</body> |
219 |
</subsection> |
220 |
</section> |
221 |
<section id="grub"> |
222 |
<title>Default: Using GRUB</title> |
223 |
<subsection> |
224 |
<title>Understanding GRUB's terminology</title> |
225 |
<body> |
226 |
|
227 |
<p> |
228 |
The most critical part of understanding GRUB is getting comfortable with how |
229 |
GRUB refers to hard drives and partitions. Your Linux partition |
230 |
<path>/dev/hda1</path> (for IDE drives) or <path>/dev/sda1</path> (for |
231 |
SATA/SCSI drives) will most likely be called <path>(hd0,0)</path> under GRUB. |
232 |
Notice the parentheses around the <path>hd0,0</path> - they are required. |
233 |
</p> |
234 |
|
235 |
<p> |
236 |
Hard drives count from zero rather than "a" and partitions start at zero |
237 |
rather than one. Be aware too that with the hd devices, only hard drives are |
238 |
counted, not atapi-ide devices such as cdrom players and burners. Also, the |
239 |
same construct is used with SCSI drives. (Normally they get higher numbers |
240 |
than IDE drives except when the BIOS is configured to boot from SCSI devices.) |
241 |
When you ask the BIOS to boot from a different hard disk (for instance your |
242 |
primary slave), <e>that</e> harddisk is seen as <path>hd0</path>. |
243 |
</p> |
244 |
|
245 |
<p> |
246 |
Assuming you have a hard drive on <path>/dev/hda</path>, a cdrom player on |
247 |
<path>/dev/hdb</path>, a burner on <path>/dev/hdc</path>, a second hard drive |
248 |
on <path>/dev/hdd</path> and no SCSI hard drive, <path>/dev/hdd7</path> gets |
249 |
translated to <path>(hd1,6)</path>. It might sound tricky and tricky it is |
250 |
indeed, but as we will see, GRUB offers a tab completion mechanism |
251 |
that comes handy for those of you having a lot of hard drives and |
252 |
partitions and who are a little lost in the GRUB numbering scheme. |
253 |
</p> |
254 |
|
255 |
<p> |
256 |
Having gotten the feel for that, it is time to install GRUB. |
257 |
</p> |
258 |
|
259 |
</body> |
260 |
</subsection> |
261 |
<subsection> |
262 |
<title>Installing GRUB</title> |
263 |
<body> |
264 |
|
265 |
<p> |
266 |
To install GRUB, let's first emerge it: |
267 |
</p> |
268 |
|
269 |
<pre caption="Installing GRUB"> |
270 |
# <i>emerge grub</i> |
271 |
</pre> |
272 |
|
273 |
<p> |
274 |
Although GRUB is now installed, we still need to write up a |
275 |
configuration file for it and place GRUB in our MBR so that GRUB automatically |
276 |
boots your newly created kernel. Create <path>/boot/grub/grub.conf</path> with |
277 |
<c>nano</c> (or, if applicable, another editor): |
278 |
</p> |
279 |
|
280 |
<pre caption="Creating /boot/grub/grub.conf"> |
281 |
# <i>nano -w /boot/grub/grub.conf</i> |
282 |
</pre> |
283 |
|
284 |
<p> |
285 |
Now we are going to write up a <path>grub.conf</path>. Below you'll find two |
286 |
possible <path>grub.conf</path> for the partitioning example we use in this |
287 |
guide. We've only extensively commented the first <path>grub.conf</path>. Make |
288 |
sure you use <e>your</e> kernel image filename and, if appropriate, <e>your</e> |
289 |
initrd image filename. |
290 |
</p> |
291 |
|
292 |
<ul> |
293 |
<li> |
294 |
The first <path>grub.conf</path> is for people who have not used |
295 |
<c>genkernel</c> to build their kernel |
296 |
</li> |
297 |
<li> |
298 |
The second <path>grub.conf</path> is for people who have used |
299 |
<c>genkernel</c> to build their kernel |
300 |
</li> |
301 |
</ul> |
302 |
|
303 |
<note> |
304 |
If your root filesystem is JFS, you <e>must</e> add " ro" to the <c>kernel</c> |
305 |
line since JFS needs to replay its log before it allows read-write mounting. |
306 |
</note> |
307 |
|
308 |
<pre caption="grub.conf for non-genkernel users"> |
309 |
<comment># Which listing to boot as default. 0 is the first, 1 the second etc.</comment> |
310 |
default 0 |
311 |
<comment># How many seconds to wait before the default listing is booted.</comment> |
312 |
timeout 30 |
313 |
<comment># Nice, fat splash-image to spice things up :) |
314 |
# Comment out if you don't have a graphics card installed</comment> |
315 |
splashimage=(hd0,0)/boot/grub/splash.xpm.gz |
316 |
|
317 |
title=Gentoo Linux <keyval id="kernel-version"/> |
318 |
<comment># Partition where the kernel image (or operating system) is located</comment> |
319 |
root (hd0,0) |
320 |
kernel /boot/<keyval id="kernel-name"/> root=/dev/hda3 |
321 |
|
322 |
<comment># The next four lines are only if you dualboot with a Windows system.</comment> |
323 |
<comment># In this case, Windows is hosted on /dev/hda6.</comment> |
324 |
title=Windows XP |
325 |
rootnoverify (hd0,5) |
326 |
makeactive |
327 |
chainloader +1 |
328 |
</pre> |
329 |
|
330 |
<pre caption="grub.conf for genkernel users"> |
331 |
default 0 |
332 |
timeout 30 |
333 |
splashimage=(hd0,0)/boot/grub/splash.xpm.gz |
334 |
|
335 |
title=Gentoo Linux <keyval id="kernel-version"/> |
336 |
root (hd0,0) |
337 |
kernel /boot/<keyval id="genkernel-name"/> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev |
338 |
initrd /boot/<keyval id="genkernel-initrd"/> |
339 |
|
340 |
<comment># Only in case you want to dual-boot</comment> |
341 |
title=Windows XP |
342 |
rootnoverify (hd0,5) |
343 |
makeactive |
344 |
chainloader +1 |
345 |
</pre> |
346 |
|
347 |
<note> |
348 |
The <c>udev</c> mentioned at the end of the kernel line is needed to work around |
349 |
a bug in some genkernel versions <e>if</e> you use udev in the first place |
350 |
(which is the default behaviour). |
351 |
</note> |
352 |
|
353 |
<p> |
354 |
If you used a different partitioning scheme and/or kernel image, adjust |
355 |
accordingly. However, make sure that anything that follows a GRUB-device (such |
356 |
as <path>(hd0,0)</path>) is relative to the mountpoint, not the root. In other |
357 |
words, <path>(hd0,0)/grub/splash.xpm.gz</path> is in reality |
358 |
<path>/boot/grub/splash.xpm.gz</path> since <path>(hd0,0)</path> is |
359 |
<path>/boot</path>. |
360 |
</p> |
361 |
|
362 |
<p> |
363 |
Besides, if you chose to use a different partitioning scheme and did not put |
364 |
<path>/boot</path> in a separate partition, the <path>/boot</path> prefix used |
365 |
in the above code samples is really <e>required</e>. If you followed our |
366 |
suggested partitioning plan, the <path>/boot</path> prefix it not required, but |
367 |
a <path>boot</path> symlink makes it work. In short, the above examples should |
368 |
work whether you defined a separate <path>/boot</path> partition or not. |
369 |
</p> |
370 |
|
371 |
<p> |
372 |
If you need to pass any additional options to the kernel, simply add |
373 |
them to the end of the kernel command. We're already passing one option |
374 |
(<c>root=/dev/hda3</c> or <c>real_root=/dev/hda3</c>), but you can pass others |
375 |
as well, such as the <c>video</c> and/or <c>vga</c> statements for framebuffer |
376 |
as we discussed previously. |
377 |
</p> |
378 |
|
379 |
<p> |
380 |
If you're using a 2.6.7 or higher kernel and you jumpered your harddrive |
381 |
because the BIOS can't handle large harddrives you'll need to append |
382 |
<c>hdx=stroke</c>. |
383 |
</p> |
384 |
|
385 |
<p> |
386 |
<c>genkernel</c> users should know that their kernels use the same boot options |
387 |
as is used for the Installation CD. For instance, if you have SCSI devices, you |
388 |
should add <c>doscsi</c> as kernel option. |
389 |
</p> |
390 |
|
391 |
<p> |
392 |
Now save the <path>grub.conf</path> file and exit. You still need to install |
393 |
GRUB in the MBR (Master Boot Record) so that GRUB is automatically executed when |
394 |
you boot your system. |
395 |
</p> |
396 |
|
397 |
<p> |
398 |
The GRUB developers recommend the use of <c>grub-install</c>. However, if for |
399 |
some reason <c>grub-install</c> fails to work correctly you still have the |
400 |
option to manually install GRUB. |
401 |
</p> |
402 |
|
403 |
<p> |
404 |
Continue with <uri link="#grub-install-auto">Default: Setting up GRUB using |
405 |
grub-install</uri> or <uri link="#grub-install-manual">Alternative: Setting up |
406 |
GRUB using manual instructions</uri>. |
407 |
</p> |
408 |
|
409 |
</body> |
410 |
</subsection> |
411 |
<subsection id="grub-install-auto"> |
412 |
<title>Default: Setting up GRUB using grub-install</title> |
413 |
<body> |
414 |
|
415 |
<p> |
416 |
To install GRUB you will need to issue the <c>grub-install</c> command. |
417 |
However, <c>grub-install</c> won't work off-the-shelf since we are inside a |
418 |
chrooted environment. We need to create <path>/etc/mtab</path> which lists all |
419 |
mounted filesystems. Fortunately, there is an easy way to accomplish this - |
420 |
just copy over <path>/proc/mounts</path> to <path>/etc/mtab</path>, excluding |
421 |
the <c>rootfs</c> line if you haven't created a separate boot partition. The |
422 |
following command will work in both cases: |
423 |
</p> |
424 |
|
425 |
<pre caption="Creating /etc/mtab"> |
426 |
# <i>grep -v rootfs /proc/mounts > /etc/mtab</i> |
427 |
</pre> |
428 |
|
429 |
<p> |
430 |
Now we can install GRUB using <c>grub-install</c>: |
431 |
</p> |
432 |
|
433 |
<pre caption="Running grub-install"> |
434 |
# <i>grub-install /dev/hda</i> |
435 |
</pre> |
436 |
|
437 |
<p> |
438 |
If you have more questions regarding GRUB, please consult the <uri |
439 |
link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the |
440 |
<uri link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>. |
441 |
</p> |
442 |
|
443 |
<p> |
444 |
Continue with <uri link="#reboot">Rebooting the System</uri>. |
445 |
</p> |
446 |
|
447 |
</body> |
448 |
</subsection> |
449 |
<subsection id="grub-install-manual"> |
450 |
<title>Alternative: Setting up GRUB using manual instructions</title> |
451 |
<body> |
452 |
|
453 |
<p> |
454 |
To start configuring GRUB, you type in <c>grub</c>. You'll be presented |
455 |
with the <path>grub></path> grub command-line prompt. Now, you need to type |
456 |
in the right commands to install the GRUB boot record onto your hard drive. |
457 |
</p> |
458 |
|
459 |
<pre caption="Starting the GRUB shell"> |
460 |
# <i>grub</i> |
461 |
</pre> |
462 |
|
463 |
<note> |
464 |
If your system does not have any floppy drives, add the <c>--no-floppy</c> |
465 |
option to the above command to prevent grub from probing the (non-existing) |
466 |
floppy drives. |
467 |
</note> |
468 |
|
469 |
<p> |
470 |
In the example configuration we want to install GRUB so that it reads its |
471 |
information from the boot partition <path><keyval id="/boot"/></path>, and |
472 |
installs the GRUB boot record on the hard drive's MBR (master boot record) so |
473 |
that the first thing we see when we turn on the computer is the GRUB prompt. Of |
474 |
course, if you haven't followed the example configuration during the |
475 |
installation, change the commands accordingly. |
476 |
</p> |
477 |
|
478 |
<p> |
479 |
The tab completion mechanism of GRUB can be used from within GRUB. |
480 |
For instance, if you type in "<c>root (</c>" followed by a TAB, you will |
481 |
be presented with a list of devices (such as <path>hd0</path>). If you |
482 |
type in "<c>root (hd0,</c>" followed by a TAB, you will receive a list |
483 |
of available partitions to choose from (such as <path>hd0,0</path>). |
484 |
</p> |
485 |
|
486 |
<p> |
487 |
By using the tab completion, setting up GRUB should be not that hard. |
488 |
Now go on, configure GRUB, shall we? :-) |
489 |
</p> |
490 |
|
491 |
<pre caption="Installing GRUB in the MBR"> |
492 |
grub> <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment> |
493 |
grub> <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment> |
494 |
grub> <i>quit</i> <comment>(Exit the GRUB shell)</comment> |
495 |
</pre> |
496 |
|
497 |
<note> |
498 |
If you want to install GRUB in a certain partition instead of the MBR, |
499 |
you have to alter the <c>setup</c> command so it points to the right |
500 |
partition. For instance, if you want GRUB installed in |
501 |
<path>/dev/hda3</path>, then the command becomes <c>setup (hd0,2)</c>. |
502 |
Few users however want to do this. |
503 |
</note> |
504 |
|
505 |
<p> |
506 |
If you have more questions regarding GRUB, please consult the <uri |
507 |
link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri |
508 |
link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>. |
509 |
</p> |
510 |
|
511 |
<p> |
512 |
Continue with <uri link="#reboot">Rebooting the System</uri>. |
513 |
</p> |
514 |
|
515 |
</body> |
516 |
</subsection> |
517 |
</section> |
518 |
<section id="lilo" test="func:keyval('arch')='x86'"> |
519 |
<title>Alternative: Using LILO</title> |
520 |
<subsection> |
521 |
<title>Installing LILO</title> |
522 |
<body> |
523 |
|
524 |
<p> |
525 |
LILO, the LInuxLOader, is the tried and true workhorse of Linux |
526 |
bootloaders. However, it lacks some features that GRUB has (which is |
527 |
also the reason why GRUB is currently gaining popularity). The reason |
528 |
why LILO is still used is that, on some systems, GRUB doesn't work and |
529 |
LILO does. Of course, it is also used because some people know LILO and |
530 |
want to stick with it. Either way, Gentoo supports both, and apparently |
531 |
you have chosen to use LILO. |
532 |
</p> |
533 |
|
534 |
<p> |
535 |
Installing LILO is a breeze; just use <c>emerge</c>. |
536 |
</p> |
537 |
|
538 |
<pre caption="Installing LILO"> |
539 |
# <i>emerge lilo</i> |
540 |
</pre> |
541 |
|
542 |
</body> |
543 |
</subsection> |
544 |
<subsection> |
545 |
<title>Configuring LILO</title> |
546 |
<body> |
547 |
|
548 |
<p> |
549 |
To configure LILO, you must create <path>/etc/lilo.conf</path>. Fire up |
550 |
your favorite editor (in this handbook we use <c>nano</c> for |
551 |
consistency) and create the file. |
552 |
</p> |
553 |
|
554 |
<pre caption="Creating /etc/lilo.conf"> |
555 |
# <i>nano -w /etc/lilo.conf</i> |
556 |
</pre> |
557 |
|
558 |
<p> |
559 |
Some sections ago we have asked you to remember the kernel-image name |
560 |
you have created. In the next example <path>lilo.conf</path> we use the |
561 |
example partitioning scheme. There are two separate parts: |
562 |
</p> |
563 |
|
564 |
<ul> |
565 |
<li> |
566 |
One for those who have not used <c>genkernel</c> to build their kernel |
567 |
</li> |
568 |
<li> |
569 |
One for those who have used <c>genkernel</c> to build their kernel |
570 |
</li> |
571 |
</ul> |
572 |
|
573 |
<p> |
574 |
Make sure you use <e>your</e> kernel image filename and, if appropriate, |
575 |
<e>your</e> initrd image filename. |
576 |
</p> |
577 |
|
578 |
<note> |
579 |
If your root filesystem is JFS, you <e>must</e> add a <c>append="ro"</c> |
580 |
line after each boot item since JFS needs to replay its log before it allows |
581 |
read-write mounting. |
582 |
</note> |
583 |
|
584 |
<pre caption="Example /etc/lilo.conf"> |
585 |
boot=/dev/hda <comment># Install LILO in the MBR</comment> |
586 |
prompt <comment># Give the user the chance to select another section</comment> |
587 |
timeout=50 <comment># Wait 5 (five) seconds before booting the default section</comment> |
588 |
default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment> |
589 |
|
590 |
<comment># For non-genkernel users</comment> |
591 |
image=/boot/<keyval id="kernel-name"/> |
592 |
label=gentoo <comment># Name we give to this section</comment> |
593 |
read-only <comment># Start with a read-only root. Do not alter!</comment> |
594 |
root=/dev/hda3 <comment># Location of the root filesystem</comment> |
595 |
|
596 |
<comment># For genkernel users</comment> |
597 |
image=/boot/<keyval id="genkernel-name"/> |
598 |
label=gentoo |
599 |
read-only |
600 |
root=/dev/ram0 |
601 |
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev" |
602 |
initrd=/boot/<keyval id="genkernel-initrd"/> |
603 |
|
604 |
<comment># The next two lines are only if you dualboot with a Windows system.</comment> |
605 |
<comment># In this case, Windows is hosted on /dev/hda6.</comment> |
606 |
other=/dev/hda6 |
607 |
label=windows |
608 |
</pre> |
609 |
|
610 |
<note> |
611 |
The <c>udev</c> mentioned at the end of the append line is needed to work around |
612 |
a bug in some genkernel versions <e>if</e> you use udev in the first place |
613 |
(which is the default behaviour). |
614 |
</note> |
615 |
|
616 |
<note> |
617 |
If you use a different partitioning scheme and/or kernel image, adjust |
618 |
accordingly. |
619 |
</note> |
620 |
|
621 |
<p> |
622 |
If you need to pass any additional options to the kernel, add an |
623 |
<c>append</c> statement to the section. As an example, we add the |
624 |
<c>video</c> statement to enable framebuffer: |
625 |
</p> |
626 |
|
627 |
<pre caption="Using append to add kernel options"> |
628 |
image=/boot/<keyval id="kernel-name"/> |
629 |
label=gentoo |
630 |
read-only |
631 |
root=/dev/hda3 |
632 |
<i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i> |
633 |
</pre> |
634 |
|
635 |
<p> |
636 |
If you're using a 2.6.7 or higher kernel and you jumpered your harddrive |
637 |
because the BIOS can't handle large harddrives you'll need to append |
638 |
<c>hdx=stroke</c>. |
639 |
</p> |
640 |
|
641 |
<p> |
642 |
<c>genkernel</c> users should know that their kernels use the same boot options |
643 |
as is used for the Installation CD. For instance, if you have SCSI devices, you |
644 |
should add <c>doscsi</c> as kernel option. |
645 |
</p> |
646 |
|
647 |
<p> |
648 |
Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so |
649 |
LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install |
650 |
itself on the disk). Keep in mind that you'll also have to run |
651 |
<c>/sbin/lilo</c> every time you install a new kernel or make any changes to |
652 |
the menu. |
653 |
</p> |
654 |
|
655 |
<pre caption="Finishing the LILO installation"> |
656 |
# <i>/sbin/lilo</i> |
657 |
</pre> |
658 |
|
659 |
<p> |
660 |
If you have more questions regarding LILO, please consult its <uri |
661 |
link="http://en.wikipedia.org/wiki/LILO_(boot_loader)">wikipedia page</uri>. |
662 |
</p> |
663 |
|
664 |
<p> |
665 |
You can now continue with <uri link="#reboot">Rebooting the System</uri>. |
666 |
</p> |
667 |
|
668 |
</body> |
669 |
</subsection> |
670 |
</section> |
671 |
<section id="reboot"> |
672 |
<title>Rebooting the System</title> |
673 |
<subsection> |
674 |
<body> |
675 |
|
676 |
<p> |
677 |
Exit the chrooted environment and unmount all mounted partitions. Then type in |
678 |
that one magical command you have been waiting for: <c>reboot</c>. |
679 |
</p> |
680 |
|
681 |
<pre caption="Unmounting all partitions and rebooting"> |
682 |
# <i>exit</i> |
683 |
cdimage ~# <i>cd</i> |
684 |
cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i> |
685 |
cdimage ~# <i>reboot</i> |
686 |
</pre> |
687 |
|
688 |
<p> |
689 |
Of course, don't forget to remove the bootable CD, otherwise the CD will be |
690 |
booted again instead of your new Gentoo system. |
691 |
</p> |
692 |
|
693 |
<p> |
694 |
Once rebooted in your Gentoo installation, finish up with <uri |
695 |
link="?part=1&chap=11">Finalizing your Gentoo Installation</uri>. |
696 |
</p> |
697 |
|
698 |
</body> |
699 |
</subsection> |
700 |
</section> |
701 |
</sections> |
702 |
|
703 |
|
704 |
|
705 |
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml |
706 |
|
707 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml?rev=1.1&view=markup |
708 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml?rev=1.1&content-type=text/plain |
709 |
|
710 |
Index: hb-install-x86+amd64-disk.xml |
711 |
=================================================================== |
712 |
<?xml version='1.0' encoding='UTF-8'?> |
713 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
714 |
|
715 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
716 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
717 |
|
718 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ --> |
719 |
|
720 |
<sections> |
721 |
|
722 |
<version>2.6</version> |
723 |
<date>2006-08-13</date> |
724 |
|
725 |
<section> |
726 |
<title>Introduction to Block Devices</title> |
727 |
<subsection> |
728 |
<title>Block Devices</title> |
729 |
<body> |
730 |
|
731 |
<p> |
732 |
We'll take a good look at disk-oriented aspects of Gentoo Linux |
733 |
and Linux in general, including Linux filesystems, partitions and block devices. |
734 |
Then, once you're familiar with the ins and outs of disks and filesystems, |
735 |
you'll be guided through the process of setting up partitions and filesystems |
736 |
for your Gentoo Linux installation. |
737 |
</p> |
738 |
|
739 |
<p> |
740 |
To begin, we'll introduce <e>block devices</e>. The most famous block device is |
741 |
probably the one that represents the first IDE drive in a Linux system, namely |
742 |
<path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your |
743 |
first hard drive would be <path>/dev/sda</path>. |
744 |
</p> |
745 |
|
746 |
<p> |
747 |
The block devices above represent an abstract interface to the disk. User |
748 |
programs can use these block devices to interact with your disk without worrying |
749 |
about whether your drives are IDE, SCSI or something else. The program can |
750 |
simply address the storage on the disk as a bunch of contiguous, |
751 |
randomly-accessible 512-byte blocks. |
752 |
</p> |
753 |
|
754 |
</body> |
755 |
</subsection> |
756 |
<subsection> |
757 |
<title>Partitions</title> |
758 |
<body> |
759 |
|
760 |
<p> |
761 |
Although it is theoretically possible to use a full disk to house your Linux |
762 |
system, this is almost never done in practice. Instead, full disk block devices |
763 |
are split up in smaller, more manageable block devices. On <keyval id="arch"/> |
764 |
systems, these are called <e>partitions</e>. |
765 |
</p> |
766 |
|
767 |
<p> |
768 |
Partitions are divided in three types: |
769 |
<e>primary</e>, <e>extended</e> and <e>logical</e>. |
770 |
</p> |
771 |
|
772 |
<p> |
773 |
A <e>primary</e> partition is a partition which has its information stored in |
774 |
the MBR (master boot record). As an MBR is very small (512 bytes) only four |
775 |
primary partitions can be defined (for instance, <path>/dev/hda1</path> to |
776 |
<path>/dev/hda4</path>). |
777 |
</p> |
778 |
|
779 |
<p> |
780 |
An <e>extended</e> partition is a special primary partition (meaning the |
781 |
extended partition must be one of the four possible primary partitions) which |
782 |
contains more partitions. Such a partition didn't exist originally, but as |
783 |
four partitions were too few, it was brought to life to extend the formatting |
784 |
scheme without losing backward compatibility. |
785 |
</p> |
786 |
|
787 |
<p> |
788 |
A <e>logical</e> partition is a partition inside the extended partition. Their |
789 |
definitions aren't placed inside the MBR, but are declared inside the extended |
790 |
partition. |
791 |
</p> |
792 |
|
793 |
</body> |
794 |
</subsection> |
795 |
<subsection> |
796 |
<title>Advanced Storage</title> |
797 |
<body> |
798 |
|
799 |
<p> |
800 |
The <keyval id="arch"/> Installation CDs provide support for EVMS and LVM2. |
801 |
EVMS and LVM2 increase the flexibility offered by your partitioning setup. |
802 |
During the installation instructions, we will focus on "regular" partitions, |
803 |
but it is still good to know EVMS and LVM2 are supported as well. |
804 |
</p> |
805 |
|
806 |
</body> |
807 |
</subsection> |
808 |
</section> |
809 |
<section> |
810 |
<title>Designing a Partitioning Scheme</title> |
811 |
<subsection> |
812 |
<title>Default Partitioning Scheme</title> |
813 |
<body> |
814 |
|
815 |
<p> |
816 |
If you are not interested in drawing up a partitioning scheme for your system, |
817 |
you can use the partitioning scheme we use throughout this book: |
818 |
</p> |
819 |
|
820 |
<table> |
821 |
<tr> |
822 |
<th>Partition</th> |
823 |
<th>Filesystem</th> |
824 |
<th>Size</th> |
825 |
<th>Description</th> |
826 |
</tr> |
827 |
<tr> |
828 |
<ti><path>/dev/hda1</path></ti> |
829 |
<ti>ext2</ti> |
830 |
<ti>32M</ti> |
831 |
<ti>Boot partition</ti> |
832 |
</tr> |
833 |
<tr> |
834 |
<ti><path>/dev/hda2</path></ti> |
835 |
<ti>(swap)</ti> |
836 |
<ti>512M</ti> |
837 |
<ti>Swap partition</ti> |
838 |
</tr> |
839 |
<tr> |
840 |
<ti><path>/dev/hda3</path></ti> |
841 |
<ti>ext3</ti> |
842 |
<ti>Rest of the disk</ti> |
843 |
<ti>Root partition</ti> |
844 |
</tr> |
845 |
</table> |
846 |
|
847 |
<p> |
848 |
If you are interested in knowing how big a partition should be, or even how |
849 |
many partitions you need, read on. Otherwise continue now with partitioning |
850 |
your disk by reading <uri link="#fdisk">Using fdisk to Partition your |
851 |
Disk</uri>. |
852 |
</p> |
853 |
|
854 |
</body> |
855 |
</subsection> |
856 |
<subsection> |
857 |
<title>How Many and How Big?</title> |
858 |
<body> |
859 |
|
860 |
<p> |
861 |
The number of partitions is highly dependent on your environment. For instance, |
862 |
if you have lots of users, you will most likely want to have your |
863 |
<path>/home</path> separate as it increases security and makes backups easier. |
864 |
If you are installing Gentoo to perform as a mailserver, your |
865 |
<path>/var</path> should be separate as all mails are stored inside |
866 |
<path>/var</path>. A good choice of filesystem will then maximise your |
867 |
performance. Gameservers will have a separate <path>/opt</path> as most gaming |
868 |
servers are installed there. The reason is similar for <path>/home</path>: |
869 |
security and backups. You will definitely want to keep <path>/usr</path> big: |
870 |
not only will it contain the majority of applications, the Portage tree alone |
871 |
takes around 500 Mbyte excluding the various sources that are stored in it. |
872 |
</p> |
873 |
|
874 |
<p> |
875 |
As you can see, it very much depends on what you want to achieve. Separate |
876 |
partitions or volumes have the following advantages: |
877 |
</p> |
878 |
|
879 |
<ul> |
880 |
<li> |
881 |
You can choose the best performing filesystem for each partition or volume |
882 |
</li> |
883 |
<li> |
884 |
Your entire system cannot run out of free space if one defunct tool is |
885 |
continuously writing files to a partition or volume |
886 |
</li> |
887 |
<li> |
888 |
If necessary, file system checks are reduced in time, as multiple checks can |
889 |
be done in parallel (although this advantage is more with multiple disks than |
890 |
it is with multiple partitions) |
891 |
</li> |
892 |
<li> |
893 |
Security can be enhanced by mounting some partitions or volumes read-only, |
894 |
nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. |
895 |
</li> |
896 |
</ul> |
897 |
|
898 |
<p> |
899 |
However, multiple partitions have one big disadvantage: if not configured |
900 |
properly, you might result in having a system with lots of free space on one |
901 |
partition and none on another. There is also a 15-partition limit for SCSI and |
902 |
SATA. |
903 |
</p> |
904 |
|
905 |
<p> |
906 |
As an example partitioning, we show you one for a 20GB disk, used as a |
907 |
demonstration laptop (containing webserver, mailserver, gnome, ...): |
908 |
</p> |
909 |
|
910 |
<pre caption="Filesystem usage example"> |
911 |
$ <i>df -h</i> |
912 |
Filesystem Type Size Used Avail Use% Mounted on |
913 |
/dev/hda5 ext3 509M 132M 351M 28% / |
914 |
/dev/hda2 ext3 5.0G 3.0G 1.8G 63% /home |
915 |
/dev/hda7 ext3 7.9G 6.2G 1.3G 83% /usr |
916 |
/dev/hda8 ext3 1011M 483M 477M 51% /opt |
917 |
/dev/hda9 ext3 2.0G 607M 1.3G 32% /var |
918 |
/dev/hda1 ext2 51M 17M 31M 36% /boot |
919 |
/dev/hda6 swap 516M 12M 504M 2% <not mounted> |
920 |
<comment>(Unpartitioned space for future usage: 2 GB)</comment> |
921 |
</pre> |
922 |
|
923 |
<p> |
924 |
<path>/usr</path> is rather full (83% used) here, but once |
925 |
all software is installed, <path>/usr</path> doesn't tend to grow that much. |
926 |
Although allocating a few gigabytes of disk space for <path>/var</path> may |
927 |
seem excessive, remember that Portage uses this partition by default for |
928 |
compiling packages. If you want to keep <path>/var</path> at a more reasonable |
929 |
size, such as 1GB, you will need to alter your <c>PORTAGE_TMPDIR</c> variable |
930 |
in <path>/etc/make.conf</path> to point to the partition with enough free space |
931 |
for compiling extremely large packages such as OpenOffice. |
932 |
</p> |
933 |
|
934 |
</body> |
935 |
</subsection> |
936 |
</section> |
937 |
<section id="fdisk"> |
938 |
<title>Using fdisk to Partition your Disk</title> |
939 |
<subsection> |
940 |
<body> |
941 |
|
942 |
<p> |
943 |
The following parts explain how to create the example partition layout |
944 |
described previously, namely: |
945 |
</p> |
946 |
|
947 |
<table> |
948 |
<tr> |
949 |
<th>Partition</th> |
950 |
<th>Description</th> |
951 |
</tr> |
952 |
<tr> |
953 |
<ti><path>/dev/hda1</path></ti> |
954 |
<ti>Boot partition</ti> |
955 |
</tr> |
956 |
<tr> |
957 |
<ti><path>/dev/hda2</path></ti> |
958 |
<ti>Swap partition</ti> |
959 |
</tr> |
960 |
<tr> |
961 |
<ti><path>/dev/hda3</path></ti> |
962 |
<ti>Root partition</ti> |
963 |
</tr> |
964 |
</table> |
965 |
|
966 |
<p> |
967 |
Change your partition layout according to your own preference. |
968 |
</p> |
969 |
|
970 |
</body> |
971 |
</subsection> |
972 |
<subsection> |
973 |
<title>Viewing the Current Partition Layout</title> |
974 |
<body> |
975 |
|
976 |
<p> |
977 |
<c>fdisk</c> is a popular and powerful tool to split your disk into partitions. |
978 |
Fire up <c>fdisk</c> on your disk (in our example, we use |
979 |
<path>/dev/hda</path>): |
980 |
</p> |
981 |
|
982 |
<pre caption="Starting fdisk"> |
983 |
# <i>fdisk /dev/hda</i> |
984 |
</pre> |
985 |
|
986 |
<p> |
987 |
Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like this: |
988 |
</p> |
989 |
|
990 |
<pre caption="fdisk prompt"> |
991 |
Command (m for help): |
992 |
</pre> |
993 |
|
994 |
<p> |
995 |
Type <c>p</c> to display your disk's current partition configuration: |
996 |
</p> |
997 |
|
998 |
<pre caption="An example partition configuration"> |
999 |
Command (m for help): <i>p</i> |
1000 |
|
1001 |
Disk /dev/hda: 240 heads, 63 sectors, 2184 cylinders |
1002 |
Units = cylinders of 15120 * 512 bytes |
1003 |
|
1004 |
Device Boot Start End Blocks Id System |
1005 |
/dev/hda1 1 14 105808+ 83 Linux |
1006 |
/dev/hda2 15 49 264600 82 Linux swap |
1007 |
/dev/hda3 50 70 158760 83 Linux |
1008 |
/dev/hda4 71 2184 15981840 5 Extended |
1009 |
/dev/hda5 71 209 1050808+ 83 Linux |
1010 |
/dev/hda6 210 348 1050808+ 83 Linux |
1011 |
/dev/hda7 349 626 2101648+ 83 Linux |
1012 |
/dev/hda8 627 904 2101648+ 83 Linux |
1013 |
/dev/hda9 905 2184 9676768+ 83 Linux |
1014 |
|
1015 |
Command (m for help): |
1016 |
</pre> |
1017 |
|
1018 |
<p> |
1019 |
This particular disk is configured to house seven Linux filesystems (each with |
1020 |
a corresponding partition listed as "Linux") as well as a swap partition |
1021 |
(listed as "Linux swap"). |
1022 |
</p> |
1023 |
|
1024 |
</body> |
1025 |
</subsection> |
1026 |
<subsection> |
1027 |
<title>Removing all Partitions</title> |
1028 |
<body> |
1029 |
|
1030 |
<p> |
1031 |
We will first remove all existing partitions from the disk. Type <c>d</c> to |
1032 |
delete a partition. For instance, to delete an existing <path>/dev/hda1</path>: |
1033 |
</p> |
1034 |
|
1035 |
<pre caption="Deleting a partition"> |
1036 |
Command (m for help): <i>d</i> |
1037 |
Partition number (1-4): <i>1</i> |
1038 |
</pre> |
1039 |
|
1040 |
<p> |
1041 |
The partition has been scheduled for deletion. It will no longer show up if you |
1042 |
type <c>p</c>, but it will not be erased until your changes have been saved. If |
1043 |
you made a mistake and want to abort without saving your changes, type <c>q</c> |
1044 |
immediately and hit enter and your partition will not be deleted. |
1045 |
</p> |
1046 |
|
1047 |
<p> |
1048 |
Now, assuming that you do indeed want to wipe out all the partitions on your |
1049 |
system, repeatedly type <c>p</c> to print out a partition listing and then type |
1050 |
<c>d</c> and the number of the partition to delete it. Eventually, you'll end |
1051 |
up with a partition table with nothing in it: |
1052 |
</p> |
1053 |
|
1054 |
<pre caption="An empty partition table"> |
1055 |
Disk /dev/hda: 30.0 GB, 30005821440 bytes |
1056 |
240 heads, 63 sectors/track, 3876 cylinders |
1057 |
Units = cylinders of 15120 * 512 = 7741440 bytes |
1058 |
|
1059 |
Device Boot Start End Blocks Id System |
1060 |
|
1061 |
Command (m for help): |
1062 |
</pre> |
1063 |
|
1064 |
<p> |
1065 |
Now that the in-memory partition table is empty, we're ready to create the |
1066 |
partitions. We will use a default partitioning scheme as discussed previously. |
1067 |
Of course, don't follow these instructions to the letter if you don't want the |
1068 |
same partitioning scheme! |
1069 |
</p> |
1070 |
|
1071 |
</body> |
1072 |
</subsection> |
1073 |
<subsection> |
1074 |
<title>Creating the Boot Partition</title> |
1075 |
<body> |
1076 |
|
1077 |
<p> |
1078 |
We first create a small boot partition. Type <c>n</c> to create a new partition, |
1079 |
then <c>p</c> to select a primary partition, followed by <c>1</c> to select the |
1080 |
first primary partition. When prompted for the first cylinder, hit enter. When |
1081 |
prompted for the last cylinder, type <c>+32M</c> to create a partition 32 Mbyte |
1082 |
in size: |
1083 |
</p> |
1084 |
|
1085 |
<pre caption="Creating the boot partition"> |
1086 |
Command (m for help): <i>n</i> |
1087 |
Command action |
1088 |
e extended |
1089 |
p primary partition (1-4) |
1090 |
<i>p</i> |
1091 |
Partition number (1-4): <i>1</i> |
1092 |
First cylinder (1-3876, default 1): <comment>(Hit Enter)</comment> |
1093 |
Using default value 1 |
1094 |
Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): <i>+32M</i> |
1095 |
</pre> |
1096 |
|
1097 |
<p> |
1098 |
Now, when you type <c>p</c>, you should see the following partition printout: |
1099 |
</p> |
1100 |
|
1101 |
<pre caption="Created boot partition"> |
1102 |
Command (m for help): <i>p</i> |
1103 |
|
1104 |
Disk /dev/hda: 30.0 GB, 30005821440 bytes |
1105 |
240 heads, 63 sectors/track, 3876 cylinders |
1106 |
Units = cylinders of 15120 * 512 = 7741440 bytes |
1107 |
|
1108 |
Device Boot Start End Blocks Id System |
1109 |
/dev/hda1 1 14 105808+ 83 Linux |
1110 |
</pre> |
1111 |
|
1112 |
<p> |
1113 |
We need to make this partition bootable. Type <c>a</c> to toggle the bootable |
1114 |
flag on a partition and select <c>1</c>. If you press <c>p</c> again, you will |
1115 |
notice that an <path>*</path> is placed in the "Boot" column. |
1116 |
</p> |
1117 |
|
1118 |
</body> |
1119 |
</subsection> |
1120 |
<subsection> |
1121 |
<title>Creating the Swap Partition</title> |
1122 |
<body> |
1123 |
|
1124 |
<p> |
1125 |
Let's now create the swap partition. To do this, type <c>n</c> to create a new |
1126 |
partition, then <c>p</c> to tell fdisk that you want a primary partition. Then |
1127 |
type <c>2</c> to create the second primary partition, <path>/dev/hda2</path> in |
1128 |
our case. When prompted for the first cylinder, hit enter. When prompted for |
1129 |
the last cylinder, type <c>+512M</c> to create a partition 512MB in size. After |
1130 |
you've done this, type <c>t</c> to set the partition type, <c>2</c> to select |
1131 |
the partition you just created and then type in <c>82</c> to set the partition |
1132 |
type to "Linux Swap". After completing these steps, typing <c>p</c> should |
1133 |
display a partition table that looks similar to this: |
1134 |
</p> |
1135 |
|
1136 |
<pre caption="Partition listing after creating a swap partition"> |
1137 |
Command (m for help): <i>p</i> |
1138 |
|
1139 |
Disk /dev/hda: 30.0 GB, 30005821440 bytes |
1140 |
240 heads, 63 sectors/track, 3876 cylinders |
1141 |
Units = cylinders of 15120 * 512 = 7741440 bytes |
1142 |
|
1143 |
Device Boot Start End Blocks Id System |
1144 |
/dev/hda1 * 1 14 105808+ 83 Linux |
1145 |
/dev/hda2 15 81 506520 82 Linux swap |
1146 |
</pre> |
1147 |
|
1148 |
</body> |
1149 |
</subsection> |
1150 |
<subsection> |
1151 |
<title>Creating the Root Partition</title> |
1152 |
<body> |
1153 |
|
1154 |
<p> |
1155 |
Finally, let's create the root partition. To do this, type <c>n</c> to create a |
1156 |
new partition, then <c>p</c> to tell fdisk that you want a primary partition. |
1157 |
Then type <c>3</c> to create the third primary partition, <path>/dev/hda3</path> |
1158 |
in our case. When prompted for the first cylinder, hit enter. When prompted for |
1159 |
the last cylinder, hit enter to create a partition that takes up the rest of the |
1160 |
remaining space on your disk. After completing these steps, typing <c>p</c> |
1161 |
should display a partition table that looks similar to this: |
1162 |
</p> |
1163 |
|
1164 |
<pre caption="Partition listing after creating the root partition"> |
1165 |
Command (m for help): <i>p</i> |
1166 |
|
1167 |
Disk /dev/hda: 30.0 GB, 30005821440 bytes |
1168 |
240 heads, 63 sectors/track, 3876 cylinders |
1169 |
Units = cylinders of 15120 * 512 = 7741440 bytes |
1170 |
|
1171 |
Device Boot Start End Blocks Id System |
1172 |
/dev/hda1 * 1 14 105808+ 83 Linux |
1173 |
/dev/hda2 15 81 506520 82 Linux swap |
1174 |
/dev/hda3 82 3876 28690200 83 Linux |
1175 |
</pre> |
1176 |
|
1177 |
</body> |
1178 |
</subsection> |
1179 |
<subsection> |
1180 |
<title>Saving the Partition Layout</title> |
1181 |
<body> |
1182 |
|
1183 |
<p> |
1184 |
To save the partition layout and exit <c>fdisk</c>, type <c>w</c>. |
1185 |
</p> |
1186 |
|
1187 |
<pre caption="Save and exit fdisk"> |
1188 |
Command (m for help): <i>w</i> |
1189 |
</pre> |
1190 |
|
1191 |
<p> |
1192 |
Now that your partitions are created, you can now continue with <uri |
1193 |
link="#filesystems">Creating Filesystems</uri>. |
1194 |
</p> |
1195 |
|
1196 |
</body> |
1197 |
</subsection> |
1198 |
</section> |
1199 |
<section id="filesystems"> |
1200 |
<title>Creating Filesystems</title> |
1201 |
<subsection> |
1202 |
<title>Introduction</title> |
1203 |
<body> |
1204 |
|
1205 |
<p> |
1206 |
Now that your partitions are created, it is time to place a filesystem on them. |
1207 |
If you don't care about what filesystem to choose and are happy with what we use |
1208 |
as default in this handbook, continue with <uri |
1209 |
link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. |
1210 |
Otherwise read on to learn about the available filesystems... |
1211 |
</p> |
1212 |
|
1213 |
</body> |
1214 |
</subsection> |
1215 |
<subsection> |
1216 |
<title>Filesystems?</title> |
1217 |
<body> |
1218 |
|
1219 |
<p test="func:keyval('arch')='x86'"> |
1220 |
The Linux kernel supports various filesystems. We'll explain ext2, ext3, |
1221 |
ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux |
1222 |
systems. |
1223 |
</p> |
1224 |
|
1225 |
<p test="func:keyval('arch')='AMD64'"> |
1226 |
Several filesystems are available. Some of them are found stable on the amd64 |
1227 |
architecture, others aren't. The following filesystems are found to be stable: |
1228 |
ext2 and ext3. jfs and reiserfs may work but need more testing. If you're |
1229 |
really adventurous you can try the unsupported filesystems. |
1230 |
</p> |
1231 |
|
1232 |
<p> |
1233 |
<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
1234 |
journaling, which means that routine ext2 filesystem checks at startup time can |
1235 |
be quite time-consuming. There is now quite a selection of newer-generation |
1236 |
journaled filesystems that can be checked for consistency very quickly and are |
1237 |
thus generally preferred over their non-journaled counterparts. Journaled |
1238 |
filesystems prevent long delays when you boot your system and your filesystem |
1239 |
happens to be in an inconsistent state. |
1240 |
</p> |
1241 |
|
1242 |
<p> |
1243 |
<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
1244 |
journaling for fast recovery in addition to other enhanced journaling modes like |
1245 |
full data and ordered data journaling. ext3 is a very good and reliable |
1246 |
filesystem. It has an additional hashed b-tree indexing option that enables |
1247 |
high performance in almost all situations. You can enable this indexing by |
1248 |
adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an |
1249 |
excellent filesystem. |
1250 |
</p> |
1251 |
|
1252 |
<p> |
1253 |
<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall |
1254 |
performance and greatly outperforms both ext2 and ext3 when dealing with small |
1255 |
files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
1256 |
extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is |
1257 |
solid and usable as both general-purpose filesystem and for extreme cases such |
1258 |
as the creation of large filesystems, the use of many small files, very large |
1259 |
files and directories containing tens of thousands of files. |
1260 |
</p> |
1261 |
|
1262 |
<p> |
1263 |
<b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
1264 |
feature-set and is optimized for scalability. We only recommend using this |
1265 |
filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
1266 |
an uninterruptible power supply. Because XFS aggressively caches in-transit data |
1267 |
in RAM, improperly designed programs (those that don't take proper precautions |
1268 |
when writing files to disk and there are quite a few of them) can lose a good |
1269 |
deal of data if the system goes down unexpectedly. |
1270 |
</p> |
1271 |
|
1272 |
<p> |
1273 |
<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
1274 |
become production-ready and there hasn't been a sufficient track record to |
1275 |
comment positively nor negatively on its general stability at this point. |
1276 |
</p> |
1277 |
|
1278 |
</body> |
1279 |
</subsection> |
1280 |
<subsection id="filesystems-apply"> |
1281 |
<title>Applying a Filesystem to a Partition</title> |
1282 |
<body> |
1283 |
|
1284 |
<p> |
1285 |
To create a filesystem on a partition or volume, there are tools available for |
1286 |
each possible filesystem: |
1287 |
</p> |
1288 |
|
1289 |
<table> |
1290 |
<tr> |
1291 |
<th>Filesystem</th> |
1292 |
<th>Creation Command</th> |
1293 |
</tr> |
1294 |
<tr> |
1295 |
<ti>ext2</ti> |
1296 |
<ti><c>mke2fs</c></ti> |
1297 |
</tr> |
1298 |
<tr> |
1299 |
<ti>ext3</ti> |
1300 |
<ti><c>mke2fs -j -O dir_index</c></ti> |
1301 |
</tr> |
1302 |
<tr> |
1303 |
<ti>reiserfs</ti> |
1304 |
<ti><c>mkreiserfs</c></ti> |
1305 |
</tr> |
1306 |
<tr> |
1307 |
<ti>xfs</ti> |
1308 |
<ti><c>mkfs.xfs</c></ti> |
1309 |
</tr> |
1310 |
<tr> |
1311 |
<ti>jfs</ti> |
1312 |
<ti><c>mkfs.jfs</c></ti> |
1313 |
</tr> |
1314 |
</table> |
1315 |
|
1316 |
<p> |
1317 |
For instance, to have the boot partition (<path>/dev/hda1</path> in our |
1318 |
example) in ext2 and the root partition (<path>/dev/hda3</path> in our example) |
1319 |
in ext3 (as in our example), you would use: |
1320 |
</p> |
1321 |
|
1322 |
<pre caption="Applying a filesystem on a partition"> |
1323 |
# <i>mke2fs /dev/hda1</i> |
1324 |
# <i>mke2fs -j -O dir_index /dev/hda3</i> |
1325 |
</pre> |
1326 |
|
1327 |
<p> |
1328 |
Now create the filesystems on your newly created partitions (or logical |
1329 |
volumes). |
1330 |
</p> |
1331 |
|
1332 |
</body> |
1333 |
</subsection> |
1334 |
<subsection> |
1335 |
<title>Activating the Swap Partition</title> |
1336 |
<body> |
1337 |
|
1338 |
<p> |
1339 |
<c>mkswap</c> is the command that is used to initialize swap partitions: |
1340 |
</p> |
1341 |
|
1342 |
<pre caption="Creating a Swap signature"> |
1343 |
# <i>mkswap /dev/hda2</i> |
1344 |
</pre> |
1345 |
|
1346 |
<p> |
1347 |
To activate the swap partition, use <c>swapon</c>: |
1348 |
</p> |
1349 |
|
1350 |
<pre caption="Activating the swap partition"> |
1351 |
# <i>swapon /dev/hda2</i> |
1352 |
</pre> |
1353 |
|
1354 |
<p> |
1355 |
Create and activate the swap with the commands mentioned above. |
1356 |
</p> |
1357 |
|
1358 |
</body> |
1359 |
</subsection> |
1360 |
</section> |
1361 |
<section> |
1362 |
<title>Mounting</title> |
1363 |
<body> |
1364 |
|
1365 |
<p> |
1366 |
Now that your partitions are initialized and are housing a filesystem, it is |
1367 |
time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
1368 |
create the necessary mount directories for every partition you created. As an |
1369 |
example we mount the root and boot partition: |
1370 |
</p> |
1371 |
|
1372 |
<pre caption="Mounting partitions"> |
1373 |
# <i>mount /dev/hda3 /mnt/gentoo</i> |
1374 |
# <i>mkdir /mnt/gentoo/boot</i> |
1375 |
# <i>mount /dev/hda1 /mnt/gentoo/boot</i> |
1376 |
</pre> |
1377 |
|
1378 |
<note> |
1379 |
If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
1380 |
change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
1381 |
also holds for <path>/var/tmp</path>. |
1382 |
</note> |
1383 |
|
1384 |
<p> |
1385 |
We will also have to mount the proc filesystem (a virtual interface with the |
1386 |
kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. |
1387 |
</p> |
1388 |
|
1389 |
<p> |
1390 |
Continue with <uri link="?part=1&chap=5">Installing the Gentoo |
1391 |
Installation Files</uri>. |
1392 |
</p> |
1393 |
|
1394 |
</body> |
1395 |
</section> |
1396 |
</sections> |
1397 |
|
1398 |
|
1399 |
|
1400 |
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml |
1401 |
|
1402 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml?rev=1.1&view=markup |
1403 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml?rev=1.1&content-type=text/plain |
1404 |
|
1405 |
Index: hb-install-x86+amd64-kernel.xml |
1406 |
=================================================================== |
1407 |
<?xml version='1.0' encoding='UTF-8'?> |
1408 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
1409 |
|
1410 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
1411 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
1412 |
|
1413 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ --> |
1414 |
|
1415 |
<sections> |
1416 |
|
1417 |
<version>3.14</version> |
1418 |
<date>2006-08-13</date> |
1419 |
|
1420 |
<section> |
1421 |
<title>Timezone</title> |
1422 |
<body> |
1423 |
|
1424 |
<p> |
1425 |
You first need to select your timezone so that your system knows where it is |
1426 |
located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy |
1427 |
it to <path>/etc/localtime</path>. Please avoid the |
1428 |
<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
1429 |
indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. |
1430 |
</p> |
1431 |
|
1432 |
<pre caption="Setting the timezone information"> |
1433 |
# <i>ls /usr/share/zoneinfo</i> |
1434 |
<comment>(Suppose you want to use GMT)</comment> |
1435 |
# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i> |
1436 |
</pre> |
1437 |
|
1438 |
</body> |
1439 |
</section> |
1440 |
<section> |
1441 |
<title>Installing the Sources</title> |
1442 |
<subsection> |
1443 |
<title>Choosing a Kernel</title> |
1444 |
<body> |
1445 |
|
1446 |
<p> |
1447 |
The core around which all distributions are built is the Linux kernel. It is the |
1448 |
layer between the user programs and your system hardware. Gentoo provides its |
1449 |
users several possible kernel sources. A full listing with description is |
1450 |
available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel |
1451 |
Guide</uri>. |
1452 |
</p> |
1453 |
|
1454 |
<p test="func:keyval('arch')='x86'"> |
1455 |
For x86-based systems we have, amongst other kernels, <c>vanilla-sources</c> |
1456 |
(the default kernel source as developed by the linux-kernel developers), |
1457 |
<c>gentoo-sources</c> (kernel source patched with performance-enhancing |
1458 |
features), ... |
1459 |
</p> |
1460 |
|
1461 |
<p test="func:keyval('arch')='AMD64'"> |
1462 |
For AMD64-based systems we have <c>gentoo-sources</c> (kernel v2.6 source |
1463 |
patched with amd64 specific fixes for stability, performance and hardware |
1464 |
support). |
1465 |
</p> |
1466 |
|
1467 |
<p> |
1468 |
Choose your kernel source and install it using <c>emerge</c>. The |
1469 |
<c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other |
1470 |
dependencies at this point. <c>USE="symlink"</c> is not necessary for a new |
1471 |
install, but ensures proper creation of the <path>/usr/src/linux</path> |
1472 |
symlink. |
1473 |
</p> |
1474 |
|
1475 |
<pre caption="Installing a kernel source"> |
1476 |
# <i>USE="-doc symlink" emerge gentoo-sources</i> |
1477 |
</pre> |
1478 |
|
1479 |
<p> |
1480 |
When you take a look in <path>/usr/src</path> you should see a symlink called |
1481 |
<path>linux</path> pointing to your kernel source. In this case, the installed |
1482 |
kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>. |
1483 |
Your version may be different, so keep this in mind. |
1484 |
</p> |
1485 |
|
1486 |
<pre caption="Viewing the kernel source symlink"> |
1487 |
# <i>ls -l /usr/src/linux</i> |
1488 |
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-<keyval id="kernel-version"/> |
1489 |
</pre> |
1490 |
|
1491 |
<p> |
1492 |
Now it is time to configure and compile your kernel source. You can use |
1493 |
<c>genkernel</c> for this, which will build a generic kernel as used by the |
1494 |
Installation CD. We explain the "manual" configuration first though, as it is |
1495 |
the best way to optimize your environment. |
1496 |
</p> |
1497 |
|
1498 |
<p> |
1499 |
If you want to manually configure your kernel, continue now with <uri |
1500 |
link="#manual">Default: Manual Configuration</uri>. If you want to use |
1501 |
<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using |
1502 |
genkernel</uri> instead. |
1503 |
</p> |
1504 |
|
1505 |
</body> |
1506 |
</subsection> |
1507 |
</section> |
1508 |
<section id="manual"> |
1509 |
<title>Default: Manual Configuration</title> |
1510 |
<subsection> |
1511 |
<title>Introduction</title> |
1512 |
<body> |
1513 |
|
1514 |
<p> |
1515 |
Manually configuring a kernel is often seen as the most difficult procedure a |
1516 |
Linux user ever has to perform. Nothing is less true -- after configuring a |
1517 |
couple of kernels you don't even remember that it was difficult ;) |
1518 |
</p> |
1519 |
|
1520 |
<p> |
1521 |
However, one thing <e>is</e> true: you must know your system when you start |
1522 |
configuring a kernel manually. Most information can be gathered by emerging |
1523 |
pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now |
1524 |
be able to use <c>lspci</c> within the chrooted environment. You may safely |
1525 |
ignore any <e>pcilib</e> warnings (like pcilib: cannot open |
1526 |
/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run |
1527 |
<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same. |
1528 |
You can also run <c>lsmod</c> to see what kernel modules the Installation CD |
1529 |
uses (it might provide you with a nice hint on what to enable). |
1530 |
</p> |
1531 |
|
1532 |
<p> |
1533 |
Now go to your kernel source directory and execute <c>make menuconfig</c>. This |
1534 |
will fire up an ncurses-based configuration menu. |
1535 |
</p> |
1536 |
|
1537 |
<pre caption="Invoking menuconfig"> |
1538 |
# <i>cd /usr/src/linux</i> |
1539 |
# <i>make menuconfig</i> |
1540 |
</pre> |
1541 |
|
1542 |
<p> |
1543 |
You will be greeted with several configuration sections. We'll first list some |
1544 |
options you must activate (otherwise Gentoo will not function, or not function |
1545 |
properly without additional tweaks). |
1546 |
</p> |
1547 |
|
1548 |
</body> |
1549 |
</subsection> |
1550 |
<subsection> |
1551 |
<title>Activating Required Options</title> |
1552 |
<body> |
1553 |
|
1554 |
<p> |
1555 |
First of all, activate the use of development and experimental code/drivers. |
1556 |
You need this, otherwise some very important code/drivers won't show up: |
1557 |
</p> |
1558 |
|
1559 |
<pre caption="Selecting experimental code/drivers"> |
1560 |
Code maturity level options ---> |
1561 |
[*] Prompt for development and/or incomplete code/drivers |
1562 |
</pre> |
1563 |
|
1564 |
<p> |
1565 |
Make sure that every driver that is vital to the booting of your system (such as |
1566 |
SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module, |
1567 |
otherwise your system will not be able to boot completely. |
1568 |
</p> |
1569 |
|
1570 |
</body> |
1571 |
<body test="func:keyval('arch')='AMD64'"> |
1572 |
|
1573 |
<p> |
1574 |
We shall then select the exact processor type. The x86_64 kernel maintainer |
1575 |
strongly recommends users enable MCE features so that they are able to be |
1576 |
notified of any hardware problems. On x86_64, these errors are not printed to |
1577 |
<c>dmesg</c> like on other architectures, but to <path>/dev/mcelog</path>. This |
1578 |
requires the <c>app-admin/mcelog</c> package. |
1579 |
</p> |
1580 |
|
1581 |
<pre caption="Selecting processor type and features"> |
1582 |
Processor type and features ---> |
1583 |
[ ] Intel MCE Features |
1584 |
[ ] AMD MCE Features |
1585 |
Processor family (AMD-Opteron/Athlon64) ---> |
1586 |
( ) AMD-Opteron/Athlon64 |
1587 |
( ) Intel EM64T |
1588 |
( ) Generic-x86-64 |
1589 |
</pre> |
1590 |
|
1591 |
</body> |
1592 |
<body test="func:keyval('arch')='x86'"> |
1593 |
|
1594 |
<p> |
1595 |
Now select the correct processor family: |
1596 |
</p> |
1597 |
|
1598 |
<pre caption="Selecting correct processor family"> |
1599 |
Processor type and features ---> |
1600 |
<comment>(Change according to your system)</comment> |
1601 |
(<i>Athlon/Duron/K7</i>) Processor family |
1602 |
</pre> |
1603 |
|
1604 |
</body> |
1605 |
<body> |
1606 |
|
1607 |
<p> |
1608 |
Now go to <c>File Systems</c> and select support for the filesystems you use. |
1609 |
<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be |
1610 |
able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc |
1611 |
file system</c>. |
1612 |
</p> |
1613 |
|
1614 |
</body> |
1615 |
<body test="func:keyval('arch')='x86'"> |
1616 |
|
1617 |
<p> |
1618 |
If you are using a 2.4 kernel, you need to select <c>/dev file |
1619 |
system</c> as 2.4 kernels do not support <c>udev</c>. |
1620 |
</p> |
1621 |
|
1622 |
<pre caption="Selecting necessary file systems"> |
1623 |
<comment>(With a 2.4.x kernel)</comment> |
1624 |
File systems ---> |
1625 |
[*] Virtual memory file system support (former shm fs) |
1626 |
[*] /proc file system support |
1627 |
[*] /dev file system support (EXPERIMENTAL) |
1628 |
[*] automatically mount /dev at boot |
1629 |
[ ] /dev/pts file system for Unix98 PTYs |
1630 |
|
1631 |
<comment>(With a 2.6.x kernel)</comment> |
1632 |
File systems ---> |
1633 |
Pseudo Filesystems ---> |
1634 |
[*] /proc file system support |
1635 |
[*] Virtual memory file system support (former shm fs) |
1636 |
|
1637 |
<comment>(Select one or more of the following options as needed by your system)</comment> |
1638 |
<*> Reiserfs support |
1639 |
<*> Ext3 journalling file system support |
1640 |
<*> JFS filesystem support |
1641 |
<*> Second extended fs support |
1642 |
<*> XFS filesystem support |
1643 |
</pre> |
1644 |
|
1645 |
<p> |
1646 |
If your BIOS can't handle large hard drives and you jumpered the hard drive to |
1647 |
report a limited size you have to enable the following option to gain access to |
1648 |
your whole hard drive: |
1649 |
</p> |
1650 |
|
1651 |
<pre caption="Selecting autogeometry resizing support"> |
1652 |
<comment>(2.4.x kernel only)</comment> |
1653 |
ATA/IDE/MFM/RLL support ---> |
1654 |
IDE, ATA and ATAPI Block devices ---> |
1655 |
<*> Include IDE/ATA-2 DISK support |
1656 |
[ ] Use multi-mode by default |
1657 |
[*] Auto-Geometry Resizing support |
1658 |
</pre> |
1659 |
|
1660 |
</body> |
1661 |
<body test="func:keyval('arch')='AMD64'"> |
1662 |
|
1663 |
<pre caption="Selecting necessary file systems"> |
1664 |
File systems ---> |
1665 |
Pseudo Filesystems ---> |
1666 |
[*] /proc file system support |
1667 |
[*] Virtual memory file system support (former shm fs) |
1668 |
|
1669 |
<comment>(Select one or more of the following options as needed by your system)</comment> |
1670 |
<*> Reiserfs support |
1671 |
<*> Ext3 journalling file system support |
1672 |
<*> JFS filesystem support |
1673 |
<*> Second extended fs support |
1674 |
<*> XFS filesystem support |
1675 |
</pre> |
1676 |
|
1677 |
</body> |
1678 |
<body> |
1679 |
|
1680 |
<p> |
1681 |
Do not forget to enable DMA for your drives: |
1682 |
</p> |
1683 |
|
1684 |
<pre caption="Activating DMA"> |
1685 |
Device Drivers ---> |
1686 |
ATA/ATAPI/MFM/RLL support ---> |
1687 |
[*] Generic PCI bus-master DMA support |
1688 |
[*] Use PCI DMA by default when available |
1689 |
</pre> |
1690 |
|
1691 |
<p> |
1692 |
If you are using PPPoE to connect to the Internet or you are using a dial-up |
1693 |
modem, you will need the following options in the kernel: |
1694 |
</p> |
1695 |
|
1696 |
<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='AMD64'"> |
1697 |
Device Drivers ---> |
1698 |
Networking Support ---> |
1699 |
<*> PPP (point-to-point protocol) support |
1700 |
<*> PPP support for async serial ports |
1701 |
<*> PPP support for sync tty ports |
1702 |
</pre> |
1703 |
|
1704 |
<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='x86'"> |
1705 |
<comment>(With a 2.4.x kernel)</comment> |
1706 |
Network device support ---> |
1707 |
<*> PPP (point-to-point protocol) support |
1708 |
<*> PPP support for async serial ports |
1709 |
<*> PPP support for sync tty ports |
1710 |
|
1711 |
<comment>(With a 2.6.x kernel)</comment> |
1712 |
Device Drivers ---> |
1713 |
Networking support ---> |
1714 |
<*> PPP (point-to-point protocol) support |
1715 |
<*> PPP support for async serial ports |
1716 |
<*> PPP support for sync tty ports |
1717 |
</pre> |
1718 |
|
1719 |
<p> |
1720 |
The two compression options won't harm but are not definitely needed, neither |
1721 |
does the <c>PPP over Ethernet</c> option, that might only be used by |
1722 |
<c>rp-pppoe</c> when configured to do kernel mode PPPoE. |
1723 |
</p> |
1724 |
|
1725 |
<p> |
1726 |
If you require it, don't forget to include support in the kernel for your |
1727 |
ethernet card. |
1728 |
</p> |
1729 |
|
1730 |
<p test="func:keyval('arch')='x86'"> |
1731 |
If you have an Intel CPU that supports HyperThreading (tm), or you have a |
1732 |
multi-CPU system, you should activate "Symmetric multi-processing support": |
1733 |
</p> |
1734 |
|
1735 |
<p test="func:keyval('arch')='AMD64'"> |
1736 |
If you have a multi-CPU Opteron or a multi-core (e.g. AMD64 X2) system, you |
1737 |
should activate "Symmetric multi-processing support": |
1738 |
</p> |
1739 |
|
1740 |
<pre caption="Activating SMP support"> |
1741 |
Processor type and features ---> |
1742 |
[*] Symmetric multi-processing support |
1743 |
</pre> |
1744 |
|
1745 |
<note> |
1746 |
In multi-core systems, each core counts as one processor. |
1747 |
</note> |
1748 |
|
1749 |
<p> |
1750 |
If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable |
1751 |
those as well: |
1752 |
</p> |
1753 |
|
1754 |
<pre caption="Activating USB Support for Input Devices"> |
1755 |
Device Drivers ---> |
1756 |
USB Support ---> |
1757 |
<*> USB Human Interface Device (full HID) support |
1758 |
</pre> |
1759 |
|
1760 |
</body> |
1761 |
<body test="func:keyval('arch')='x86'"> |
1762 |
|
1763 |
<p> |
1764 |
Laptop-users who want PCMCIA support should <e>not</e> use the PCMCIA drivers if |
1765 |
they choose to use a 2.4 kernel. More recent drivers are available through the |
1766 |
<c>pcmcia-cs</c> package which will be installed later on. 2.6-kernel users |
1767 |
however should use the PCMCIA drivers from the kernel. |
1768 |
</p> |
1769 |
|
1770 |
<p> |
1771 |
Besides compiling in PCMCIA support in the 2.6 kernel, don't forget to enable |
1772 |
support for the PCMCIA card bridge present in your system: |
1773 |
</p> |
1774 |
|
1775 |
<pre caption="Enabling PCMCIA support for 2.6 kernels"> |
1776 |
Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> |
1777 |
PCCARD (PCMCIA/CardBus) support ---> |
1778 |
<*> PCCard (PCMCIA/CardBus) support |
1779 |
<comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment> |
1780 |
<*> 16-bit PCMCIA support |
1781 |
[*] 32-bit CardBus support |
1782 |
<comment>(select the relevant bridges below)</comment> |
1783 |
--- PC-card bridges |
1784 |
<*> CardBus yenta-compatible bridge support (NEW) |
1785 |
<*> Cirrus PD6729 compatible bridge support (NEW) |
1786 |
<*> i82092 compatible bridge support (NEW) |
1787 |
<*> i82365 compatible bridge support (NEW) |
1788 |
<*> Databook TCIC host bridge support (NEW) |
1789 |
</pre> |
1790 |
|
1791 |
<p> |
1792 |
When you've finished configuring the kernel, continue with <uri |
1793 |
link="#compiling">Compiling and Installing</uri>. |
1794 |
</p> |
1795 |
|
1796 |
</body> |
1797 |
</subsection> |
1798 |
<subsection id="compiling"> |
1799 |
<title>Compiling and Installing</title> |
1800 |
<body> |
1801 |
|
1802 |
<p> |
1803 |
Now that your kernel is configured, it is time to compile and install it. Exit |
1804 |
the configuration and start the compilation process: |
1805 |
</p> |
1806 |
|
1807 |
<pre caption="Compiling the kernel" test="func:keyval('arch')='x86'"> |
1808 |
<comment>(For 2.4 kernel)</comment> |
1809 |
# <i>make dep && make bzImage modules modules_install</i> |
1810 |
|
1811 |
<comment>(For 2.6 kernel)</comment> |
1812 |
# <i>make && make modules_install</i> |
1813 |
</pre> |
1814 |
|
1815 |
<pre caption="Compiling the kernel" test="func:keyval('arch')='AMD64'"> |
1816 |
# <i>make && make modules_install</i> |
1817 |
</pre> |
1818 |
|
1819 |
<p> |
1820 |
When the kernel has finished compiling, copy the kernel image to |
1821 |
<path>/boot</path>. Use whatever name you feel is appropriate for your kernel |
1822 |
choice and remember it as you will need it later on when you configure your |
1823 |
bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the |
1824 |
name and version of your kernel. |
1825 |
</p> |
1826 |
|
1827 |
<pre caption="Installing the kernel"> |
1828 |
# <i>cp arch/<keyval id="arch-sub"/>/boot/bzImage /boot/<keyval id="kernel-name"/></i> |
1829 |
</pre> |
1830 |
|
1831 |
<p> |
1832 |
Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. |
1833 |
</p> |
1834 |
|
1835 |
</body> |
1836 |
</subsection> |
1837 |
</section> |
1838 |
<section id="genkernel"> |
1839 |
<title>Alternative: Using genkernel</title> |
1840 |
<body> |
1841 |
|
1842 |
<p> |
1843 |
If you are reading this section, you have chosen to use our <c>genkernel</c> |
1844 |
script to configure your kernel for you. |
1845 |
</p> |
1846 |
|
1847 |
<p> |
1848 |
Now that your kernel source tree is installed, it's now time to compile your |
1849 |
kernel by using our <c>genkernel</c> script to automatically build a kernel for |
1850 |
you. <c>genkernel</c> works by configuring a kernel nearly identically to the |
1851 |
way our Installation CD kernel is configured. This means that when you use |
1852 |
<c>genkernel</c> to build your kernel, your system will generally detect all |
1853 |
your hardware at boot-time, just like our Installation CD does. Because |
1854 |
genkernel doesn't require any manual kernel configuration, it is an ideal |
1855 |
solution for those users who may not be comfortable compiling their own kernels. |
1856 |
</p> |
1857 |
|
1858 |
<p> |
1859 |
Now, let's see how to use genkernel. First, emerge the genkernel ebuild: |
1860 |
</p> |
1861 |
|
1862 |
<pre caption="Emerging genkernel"> |
1863 |
# <i>emerge genkernel</i> |
1864 |
</pre> |
1865 |
|
1866 |
</body> |
1867 |
<body test="func:keyval('arch')='x86'"> |
1868 |
|
1869 |
<p> |
1870 |
Next, if you are going to configure a 2.6 kernel, copy over the kernel |
1871 |
configuration used by the Installation CD to the location where genkernel |
1872 |
looks for the default kernel configuration: |
1873 |
</p> |
1874 |
|
1875 |
<pre caption="Copying over the Installation CD kernel config"> |
1876 |
<comment>(Only do this if you are going to configure a 2.6 kernel)</comment> |
1877 |
# <i>zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6</i> |
1878 |
</pre> |
1879 |
|
1880 |
</body> |
1881 |
<body> |
1882 |
|
1883 |
<p> |
1884 |
Now, compile your kernel sources by running <c>genkernel all</c>. Be aware |
1885 |
though, as <c>genkernel</c> compiles a kernel that supports almost all |
1886 |
hardware, this compilation will take quite a while to finish! |
1887 |
</p> |
1888 |
|
1889 |
<p> |
1890 |
Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you |
1891 |
might need to manually configure your kernel using <c>genkernel --menuconfig |
1892 |
all</c> and add support for your filesystem <e>in</e> the kernel (i.e. |
1893 |
<e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add |
1894 |
<c>--evms2</c> or <c>--lvm2</c> as argument as well. |
1895 |
</p> |
1896 |
|
1897 |
<pre caption="Running genkernel"> |
1898 |
# <i>genkernel all</i> |
1899 |
</pre> |
1900 |
|
1901 |
<p> |
1902 |
Once <c>genkernel</c> completes, a kernel, full set of modules and |
1903 |
<e>initial root disk</e> (initrd) will be created. We will use the kernel |
1904 |
and initrd when configuring a boot loader later in this document. Write |
1905 |
down the names of the kernel and initrd as you will need it when writing |
1906 |
the bootloader configuration file. The initrd will be started immediately after |
1907 |
booting to perform hardware autodetection (just like on the Installation CD) |
1908 |
before your "real" system starts up. |
1909 |
</p> |
1910 |
|
1911 |
<pre caption="Checking the created kernel image name and initrd"> |
1912 |
# <i>ls /boot/kernel* /boot/initramfs*</i> |
1913 |
</pre> |
1914 |
|
1915 |
<p> |
1916 |
Now, let's perform one more step to get our system to be more like the |
1917 |
Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects |
1918 |
hardware that is needed to boot your system, <c>coldplug</c> autodetects |
1919 |
everything else. To emerge and enable <c>coldplug</c>, type the following: |
1920 |
</p> |
1921 |
|
1922 |
<pre caption="Emerging and enabling coldplug"> |
1923 |
# <i>emerge coldplug</i> |
1924 |
# <i>rc-update add coldplug boot</i> |
1925 |
</pre> |
1926 |
|
1927 |
</body> |
1928 |
</section> |
1929 |
<section id="kernel_modules"> |
1930 |
<title>Kernel Modules</title> |
1931 |
<subsection> |
1932 |
<title>Configuring the Modules</title> |
1933 |
<body> |
1934 |
|
1935 |
<note test="func:keyval('arch')='x86'"> |
1936 |
If you chose a kernel 2.4, replace occurrences of <c>2.6</c> with <c>2.4</c> in |
1937 |
this section. |
1938 |
</note> |
1939 |
|
1940 |
<p> |
1941 |
You should list the modules you want automatically loaded in |
1942 |
<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to |
1943 |
the modules too if you want. |
1944 |
</p> |
1945 |
|
1946 |
<p> |
1947 |
To view all available modules, run the following <c>find</c> command. Don't |
1948 |
forget to substitute <c><keyval id="kernel-version"/></c> with the version of |
1949 |
the kernel you just compiled: |
1950 |
</p> |
1951 |
|
1952 |
<pre caption="Viewing all available modules"> |
1953 |
# <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i> |
1954 |
</pre> |
1955 |
|
1956 |
<p> |
1957 |
For instance, to automatically load the <c>3c59x.o</c> module, edit the |
1958 |
<path>kernel-2.6</path> file and enter the module name in it. |
1959 |
</p> |
1960 |
|
1961 |
<pre caption="Editing /etc/modules.autoload.d/kernel-2.6"> |
1962 |
# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i> |
1963 |
</pre> |
1964 |
|
1965 |
<pre caption="/etc/modules.autoload.d/kernel-2.6"> |
1966 |
3c59x |
1967 |
</pre> |
1968 |
|
1969 |
<p> |
1970 |
Continue the installation with <uri link="?part=1&chap=8">Configuring |
1971 |
your System</uri>. |
1972 |
</p> |
1973 |
|
1974 |
</body> |
1975 |
</subsection> |
1976 |
</section> |
1977 |
</sections> |
1978 |
|
1979 |
|
1980 |
|
1981 |
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml |
1982 |
|
1983 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml?rev=1.1&view=markup |
1984 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml?rev=1.1&content-type=text/plain |
1985 |
|
1986 |
Index: hb-install-x86+amd64-medium.xml |
1987 |
=================================================================== |
1988 |
<?xml version='1.0' encoding='UTF-8'?> |
1989 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
1990 |
|
1991 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
1992 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
1993 |
|
1994 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ --> |
1995 |
|
1996 |
<sections> |
1997 |
|
1998 |
<version>2.12</version> |
1999 |
<date>2006-08-13</date> |
2000 |
|
2001 |
<section> |
2002 |
<title>Hardware Requirements</title> |
2003 |
<subsection> |
2004 |
<title>Introduction</title> |
2005 |
<body> |
2006 |
|
2007 |
<p> |
2008 |
Before we start, we first list what hardware requirements you need to |
2009 |
successfully install Gentoo on your box. |
2010 |
</p> |
2011 |
|
2012 |
</body> |
2013 |
</subsection> |
2014 |
<subsection> |
2015 |
<title>Hardware Requirements</title> |
2016 |
<body test="func:keyval('arch')='x86'"> |
2017 |
|
2018 |
<table> |
2019 |
<tr> |
2020 |
<ti/> |
2021 |
<th>Minimal CD</th> |
2022 |
<th>LiveCD</th> |
2023 |
</tr> |
2024 |
<tr> |
2025 |
<th>CPU</th> |
2026 |
<ti>i486 or later</ti> |
2027 |
<ti><b>i686</b> or later</ti> |
2028 |
</tr> |
2029 |
<tr> |
2030 |
<th>Memory</th> |
2031 |
<ti>64 MB</ti> |
2032 |
<ti>128 MB</ti> |
2033 |
</tr> |
2034 |
<tr> |
2035 |
<th>Diskspace</th> |
2036 |
<ti colspan="2">1.5 GB (excluding swap space)</ti> |
2037 |
</tr> |
2038 |
<tr> |
2039 |
<th>Swap space</th> |
2040 |
<ti colspan="2">At least 256 MB</ti> |
2041 |
</tr> |
2042 |
</table> |
2043 |
|
2044 |
</body> |
2045 |
<body test="func:keyval('arch')='AMD64'"> |
2046 |
|
2047 |
<table> |
2048 |
<tr> |
2049 |
<th>CPU</th> |
2050 |
<ti>Any AMD64 CPU</ti> |
2051 |
</tr> |
2052 |
<tr> |
2053 |
<th>Memory</th> |
2054 |
<ti>64 MB</ti> |
2055 |
</tr> |
2056 |
<tr> |
2057 |
<th>Diskspace</th> |
2058 |
<ti>1.5 GB (excluding swap space)</ti> |
2059 |
</tr> |
2060 |
<tr> |
2061 |
<th>Swap space</th> |
2062 |
<ti>At least 256 MB</ti> |
2063 |
</tr> |
2064 |
</table> |
2065 |
|
2066 |
<p> |
2067 |
You should check the <uri link="/proj/en/base/amd64/">Gentoo |
2068 |
AMD64 Project Page</uri> before proceeding. |
2069 |
</p> |
2070 |
|
2071 |
</body> |
2072 |
</subsection> |
2073 |
</section> |
2074 |
<!-- This part can be propagated to the other architectures as well. --> |
2075 |
<!-- START --> |
2076 |
<section> |
2077 |
<title>The Gentoo Installation CDs</title> |
2078 |
<subsection> |
2079 |
<title>Introduction</title> |
2080 |
<body> |
2081 |
|
2082 |
<p> |
2083 |
The <e>Gentoo Installation CDs</e> are bootable CDs which contain a |
2084 |
self-sustained Gentoo environment. They allow you to boot Linux from the CD. |
2085 |
During the boot process your hardware is detected and the appropriate drivers |
2086 |
are loaded. They are maintained by Gentoo developers. |
2087 |
</p> |
2088 |
|
2089 |
<p> |
2090 |
All Installation CDs allow you to boot, set up networking, initialize your |
2091 |
partitions and start installing Gentoo from the Internet. We currently provide |
2092 |
two Installation CDs which are equaly suitable to install Gentoo from, as long |
2093 |
as you're planning on performing an Internet-based installation using the |
2094 |
latest version of the available packages. |
2095 |
</p> |
2096 |
|
2097 |
<impo> |
2098 |
If you wish to install Gentoo without a working Internet connection, or would |
2099 |
like to use one of the provided installers, please use the installation |
2100 |
instructions described in the <uri link="2006.1/">Gentoo 2006.1 |
2101 |
Handbooks</uri>. |
2102 |
</impo> |
2103 |
|
2104 |
<p> |
2105 |
The Installation CDs that we currently provide are: |
2106 |
</p> |
2107 |
|
2108 |
<ul> |
2109 |
<li> |
2110 |
The Gentoo <e>Minimal</e> Installation CD, a small, no-nonsense, bootable |
2111 |
CD which sole purpose is to boot the system, prepare the networking and |
2112 |
continue with the Gentoo installation. |
2113 |
</li> |
2114 |
<li> |
2115 |
The Gentoo <e>Installer LiveCD</e> contains everything you need to install |
2116 |
Gentoo. It provides a graphical environment, a graphical as well as console |
2117 |
based installer which automatically carries out the installation for you, |
2118 |
and of course, the installation instructions for your architecture. |
2119 |
</li> |
2120 |
</ul> |
2121 |
|
2122 |
<p> |
2123 |
To help you decide which Installation CD you need, we have written down the |
2124 |
major advantages and disadvantages of each Installation CD. |
2125 |
</p> |
2126 |
|
2127 |
</body> |
2128 |
</subsection> |
2129 |
<subsection> |
2130 |
<title>Gentoo Minimal Installation CD</title> |
2131 |
<body> |
2132 |
|
2133 |
<p> |
2134 |
The Minimal Installation CD is called <c><keyval id="min-cd-name"/></c> and |
2135 |
takes up only <keyval id="min-cd-size"/> MB of diskspace. You can use this |
2136 |
Installation CD to install Gentoo, but <e>only</e> with a working Internet |
2137 |
connection. |
2138 |
</p> |
2139 |
|
2140 |
<table> |
2141 |
<tr> |
2142 |
<th>Minimal Installation CD</th> |
2143 |
<th>Pros and Cons</th> |
2144 |
</tr> |
2145 |
<tr> |
2146 |
<th>+</th> |
2147 |
<ti>Smallest download</ti> |
2148 |
</tr> |
2149 |
<tr> |
2150 |
<th>-</th> |
2151 |
<ti> |
2152 |
Contains no stage3 tarball, no Portage snapshot, no prebuilt packages and |
2153 |
is therefore not suitable for networkless installation |
2154 |
</ti> |
2155 |
</tr> |
2156 |
</table> |
2157 |
|
2158 |
</body> |
2159 |
</subsection> |
2160 |
<subsection> |
2161 |
<title>Gentoo Installer LiveCD</title> |
2162 |
<body> |
2163 |
|
2164 |
<p> |
2165 |
The Installer LiveCD is called <c><keyval id="live-cd-name"/></c> and takes up |
2166 |
<keyval id="live-cd-size"/> MB. You can use this Installation CD to install |
2167 |
Gentoo, and you can even use it to install Gentoo without a working internet |
2168 |
connection, just in case you want to bring Gentoo to another PC than the one |
2169 |
you are currently installing Gentoo on. |
2170 |
</p> |
2171 |
|
2172 |
<table> |
2173 |
<tr> |
2174 |
<th>Installer LiveCD</th> |
2175 |
<th>Pros and Cons</th> |
2176 |
</tr> |
2177 |
<tr> |
2178 |
<th>+</th> |
2179 |
<ti> |
2180 |
Contains everything you need. You can even install without a network |
2181 |
connection. |
2182 |
</ti> |
2183 |
</tr> |
2184 |
<tr> |
2185 |
<th>-</th> |
2186 |
<ti>Huge download</ti> |
2187 |
</tr> |
2188 |
</table> |
2189 |
|
2190 |
</body> |
2191 |
</subsection> |
2192 |
<subsection> |
2193 |
<title>The Stage3 Tarball</title> |
2194 |
<body> |
2195 |
|
2196 |
<p> |
2197 |
A stage3 tarball is an archive containing a minimal Gentoo environment, |
2198 |
suitable to continue the Gentoo installation using the instructions in this |
2199 |
manual. Previously, the Gentoo Handbook described the installation using one of |
2200 |
three stage tarballs. While Gentoo still offers stage1 and stage2 tarballs, the |
2201 |
official installation method uses the stage3 tarball. If you are interested in |
2202 |
performing a Gentoo installation using a stage1 or stage2 tarball, please read |
2203 |
the Gentoo FAQ on <uri link="/doc/en/faq.xml#stage12">How do I Install Gentoo |
2204 |
Using a Stage1 or Stage2 Tarball?</uri> |
2205 |
</p> |
2206 |
|
2207 |
<p> |
2208 |
Stage3 tarballs can be downloaded from <path><keyval |
2209 |
id="release-dir"/>stages/</path> on any of the <uri |
2210 |
link="/main/en/mirrors.xml">Official Gentoo Mirrors</uri> and are not provided |
2211 |
on the LiveCD. |
2212 |
</p> |
2213 |
|
2214 |
</body> |
2215 |
</subsection> |
2216 |
</section> |
2217 |
<!-- STOP --> |
2218 |
<section> |
2219 |
<title>Download, Burn and Boot a Gentoo Installation CD</title> |
2220 |
<subsection> |
2221 |
<title>Downloading and Burning the Installation CDs</title> |
2222 |
<body> |
2223 |
|
2224 |
<p> |
2225 |
You have chosen to use a Gentoo Installation CD. We'll first start by |
2226 |
downloading and burning the chosen Installation CD. We previously discussed |
2227 |
the several available Installation CDs, but where can you find them? |
2228 |
</p> |
2229 |
|
2230 |
<p> |
2231 |
You can download any of the Installation CDs from one of our <uri |
2232 |
link="/main/en/mirrors.xml">mirrors</uri>. The Installation CDs are located in |
2233 |
the <path><keyval id="release-dir"/>installcd/</path> directory. |
2234 |
</p> |
2235 |
|
2236 |
<p> |
2237 |
Inside that directory you'll find ISO-files. Those are full CD images which you |
2238 |
can write on a CD-R. |
2239 |
</p> |
2240 |
|
2241 |
<p> |
2242 |
In case you wonder if your downloaded file is corrupted or not, you can check |
2243 |
its MD5 checksum and compare it with the MD5 checksum we provide (such as |
2244 |
<path><keyval id="min-cd-name"/>.DIGESTS</path>). You can check the MD5 |
2245 |
checksum with the <c>md5sum</c> tool under Linux/Unix or <uri |
2246 |
link="http://www.etree.org/md5com.html">md5sum</uri> for Windows. |
2247 |
</p> |
2248 |
|
2249 |
<p> |
2250 |
Another way to check the validity of the downloaded file is to use GnuPG to |
2251 |
verify the cryptographic signature that we provide (the file ending with |
2252 |
<path>.asc</path>). Download the signature file and obtain the public key: |
2253 |
</p> |
2254 |
|
2255 |
<pre caption="Obtaining the public key"> |
2256 |
$ <i>gpg --keyserver subkeys.pgp.net --recv-keys 17072058</i> |
2257 |
</pre> |
2258 |
|
2259 |
<p> |
2260 |
Now verify the signature: |
2261 |
</p> |
2262 |
|
2263 |
<pre caption="Verify the cryptographic signature"> |
2264 |
$ <i>gpg --verify <signature file> <downloaded iso></i> |
2265 |
</pre> |
2266 |
|
2267 |
<p> |
2268 |
To burn the downloaded ISO(s), you have to select raw-burning. How you |
2269 |
do this is highly program-dependent. We will discuss <c>cdrecord</c> and |
2270 |
<c>K3B</c> here; more information can be found in our <uri |
2271 |
link="/doc/en/faq.xml#isoburning">Gentoo FAQ</uri>. |
2272 |
</p> |
2273 |
|
2274 |
<ul> |
2275 |
<li> |
2276 |
With cdrecord, you simply type <c>cdrecord dev=/dev/hdc <downloaded iso |
2277 |
file></c> (replace <path>/dev/hdc</path> with your CD-RW drive's |
2278 |
device path). |
2279 |
</li> |
2280 |
<li> |
2281 |
With K3B, select <c>Tools</c> > <c>CD</c> > <c>Burn Image</c>. Then |
2282 |
you can locate your ISO file within the 'Image to Burn' area. Finally click |
2283 |
<c>Start</c>. |
2284 |
</li> |
2285 |
</ul> |
2286 |
|
2287 |
</body> |
2288 |
</subsection> |
2289 |
<subsection> |
2290 |
<title>Booting the Installation CD</title> |
2291 |
<body> |
2292 |
|
2293 |
<p> |
2294 |
Once you have burnt your installation CD, it is time to boot it. |
2295 |
Remove all CDs from your CD drives, reboot your system and enter the BIOS. |
2296 |
This is usually done by hitting DEL, F1 or ESC, depending on your BIOS. Inside |
2297 |
the BIOS, change the boot order so that the CD-ROM is tried before the hard |
2298 |
disk. This is often found under "CMOS Setup". If you don't do this, your system |
2299 |
will just reboot from the hard disk, ignoring the CD-ROM. |
2300 |
</p> |
2301 |
|
2302 |
<p> |
2303 |
Now place the installation CD in the CD-ROM drive and reboot. You should see a |
2304 |
boot prompt. At this screen, you can hit Enter to begin the boot process with |
2305 |
the default boot options, or boot the Installation CD with custom boot options |
2306 |
by specifying a kernel followed by boot options and then hitting Enter. |
2307 |
</p> |
2308 |
|
2309 |
<p> |
2310 |
Specifying a kernel? Yes, we provide several kernels on our Installation CDs. |
2311 |
The default one is <c>gentoo</c>. Other kernels are for specific hardware needs |
2312 |
and the <c>-nofb</c> variants which disable framebuffer. |
2313 |
</p> |
2314 |
|
2315 |
<p> |
2316 |
Below you'll find a short overview on the available kernels: |
2317 |
</p> |
2318 |
|
2319 |
</body> |
2320 |
<body test="func:keyval('arch')='x86'"> |
2321 |
|
2322 |
<table> |
2323 |
<tr> |
2324 |
<th>Kernel</th> |
2325 |
<th>Description</th> |
2326 |
</tr> |
2327 |
<tr> |
2328 |
<ti>gentoo</ti> |
2329 |
<ti>Default 2.6 kernel with support for multiple CPUs</ti> |
2330 |
</tr> |
2331 |
<tr> |
2332 |
<ti>gentoo-nofb</ti> |
2333 |
<ti>Same as <c>gentoo</c> but without framebuffer support</ti> |
2334 |
</tr> |
2335 |
<tr> |
2336 |
<ti>memtest86</ti> |
2337 |
<ti>Test your local RAM for errors</ti> |
2338 |
</tr> |
2339 |
</table> |
2340 |
|
2341 |
</body> |
2342 |
<body test="func:keyval('arch')='AMD64'"> |
2343 |
<table> |
2344 |
<tr> |
2345 |
<th>Kernel</th> |
2346 |
<th>Description</th> |
2347 |
</tr> |
2348 |
<tr> |
2349 |
<ti>gentoo</ti> |
2350 |
<ti> |
2351 |
Default kernel with support for K8 CPUS (including NUMA support) and EM64T |
2352 |
CPUs |
2353 |
</ti> |
2354 |
</tr> |
2355 |
<tr> |
2356 |
<ti>memtest86</ti> |
2357 |
<ti>Test your local RAM for errors</ti> |
2358 |
</tr> |
2359 |
</table> |
2360 |
|
2361 |
</body> |
2362 |
<body> |
2363 |
|
2364 |
<p> |
2365 |
You can also provide kernel options. They represent optional settings you can |
2366 |
(de)activate at will. The following list is the same as the one you receive |
2367 |
when you press F2 at the bootscreen. |
2368 |
</p> |
2369 |
|
2370 |
<pre caption="Options available to pass to your kernel of choice"> |
2371 |
- agpgart loads agpgart (use if you have graphic problems,lockups) |
2372 |
- acpi=on loads support for ACPI firmware |
2373 |
- ide=nodma force disabling of DMA for malfunctioning IDE devices |
2374 |
- doscsi scan for scsi devices (breaks some ethernet cards) |
2375 |
- dopcmcia starts pcmcia service for PCMCIA cdroms |
2376 |
- nofirewire disables firewire modules in initrd (for firewire cdroms,etc) |
2377 |
- nokeymap disables keymap selection for non-us keyboard layouts |
2378 |
- docache cache the entire runtime portion of cd in RAM, allows you |
2379 |
to umount /mnt/cdrom to mount another cdrom. |
2380 |
- nodetect causes hwsetup/kudzu and hotplug not to run |
2381 |
- nousb disables usb module load from initrd, disables hotplug |
2382 |
- nodhcp dhcp does not automatically start if nic detected |
2383 |
- nohotplug disables loading hotplug service |
2384 |
- noapic disable apic (try if having hardware problems nics,scsi,etc) |
2385 |
- noevms disable loading of EVMS2 modules |
2386 |
- nolvm2 disable loading of LVM2 modules |
2387 |
- hdx=stroke allows you to partition the whole harddrive even when your BIOS |
2388 |
can't handle large harddrives |
2389 |
- noload=module1,[module2,[...]] |
2390 |
disable loading of specific kernel modules |
2391 |
</pre> |
2392 |
|
2393 |
<p> |
2394 |
Now boot your CD, select a kernel (if you are not happy with the default |
2395 |
<c>gentoo</c> kernel) and boot options. As an example, we show you how |
2396 |
to boot the <c>gentoo</c> kernel, with <c>dopcmcia</c> as kernel |
2397 |
parameters: |
2398 |
</p> |
2399 |
|
2400 |
<pre caption="Booting an Installation CD"> |
2401 |
boot: <i>gentoo dopcmcia</i> |
2402 |
</pre> |
2403 |
|
2404 |
<p> |
2405 |
You will then be greeted with a boot screen and progress bar. If you are |
2406 |
installing Gentoo on a system with a non-US keyboard, make sure you immediately |
2407 |
press Alt-F1 to switch to verbose mode and follow the prompt. If no selection |
2408 |
is made in 10 seconds the default (US keyboard) will be accepted and the boot |
2409 |
process will continue. Once the boot process completes, you will be |
2410 |
automatically logged in to the "Live" Gentoo Linux as "root", the super user. |
2411 |
You should have a root ("#") prompt on the current console and can also switch |
2412 |
to other consoles by pressing Alt-F2, Alt-F3 and Alt-F4. Get back to the one |
2413 |
you started on by pressing Alt-F1. |
2414 |
</p> |
2415 |
|
2416 |
<p> |
2417 |
Now continue with <uri link="#hardware">Extra Hardware Configuration</uri>. |
2418 |
</p> |
2419 |
|
2420 |
</body> |
2421 |
</subsection> |
2422 |
<subsection id="hardware"> |
2423 |
<title>Extra Hardware Configuration</title> |
2424 |
<body> |
2425 |
|
2426 |
<p> |
2427 |
When the Installation CD boots, it tries to detect all your hardware devices |
2428 |
and loads the appropriate kernel modules to support your hardware. In the vast |
2429 |
majority of cases, it does a very good job. However, in some cases it may not |
2430 |
auto-load the kernel modules you need. If the PCI auto-detection missed some of |
2431 |
your system's hardware, you will have to load the appropriate kernel modules |
2432 |
manually. |
2433 |
</p> |
2434 |
|
2435 |
<p> |
2436 |
In the next example we try to load the <c>8139too</c> module (support for |
2437 |
certain kinds of network interfaces): |
2438 |
</p> |
2439 |
|
2440 |
<pre caption="Loading kernel modules"> |
2441 |
# <i>modprobe 8139too</i> |
2442 |
</pre> |
2443 |
|
2444 |
<p> |
2445 |
If you need PCMCIA support, you should start the <c>pcmcia</c> init script: |
2446 |
</p> |
2447 |
|
2448 |
<pre caption="Starting the PCMCIA init script"> |
2449 |
# <i>/etc/init.d/pcmcia start</i> |
2450 |
</pre> |
2451 |
|
2452 |
</body> |
2453 |
</subsection> |
2454 |
<subsection> |
2455 |
<title>Optional: Tweaking Hard Disk Performance</title> |
2456 |
<body> |
2457 |
|
2458 |
<p> |
2459 |
If you are an advanced user, you might want to tweak the IDE hard disk |
2460 |
performance using <c>hdparm</c>. With the <c>-tT</c> options you can |
2461 |
test the performance of your disk (execute it several times to get a |
2462 |
more precise impression): |
2463 |
</p> |
2464 |
|
2465 |
<pre caption="Testing disk performance"> |
2466 |
# <i>hdparm -tT /dev/hda</i> |
2467 |
</pre> |
2468 |
|
2469 |
<p> |
2470 |
To tweak, you can use any of the following examples (or experiment |
2471 |
yourself) which use <path>/dev/hda</path> as disk (substitute with your |
2472 |
disk): |
2473 |
</p> |
2474 |
|
2475 |
<pre caption="Tweaking hard disk performance"> |
2476 |
<comment>(Activate DMA:)</comment> |
2477 |
# <i>hdparm -d 1 /dev/hda</i> |
2478 |
|
2479 |
<comment>(Activate Safe Performance Options:)</comment> |
2480 |
# <i>hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda</i> |
2481 |
</pre> |
2482 |
|
2483 |
</body> |
2484 |
</subsection> |
2485 |
<subsection id="useraccounts"> |
2486 |
<title>Optional: User Accounts</title> |
2487 |
<body> |
2488 |
|
2489 |
<p> |
2490 |
If you plan on giving other people access to your installation |
2491 |
environment or you want to chat using <c>irssi</c> without root privileges (for |
2492 |
security reasons), you need to create the necessary user accounts and change |
2493 |
the root password. |
2494 |
</p> |
2495 |
|
2496 |
<p> |
2497 |
To change the root password, use the <c>passwd</c> utility: |
2498 |
</p> |
2499 |
|
2500 |
<pre caption="Changing the root password"> |
2501 |
# <i>passwd</i> |
2502 |
New password: <comment>(Enter your new password)</comment> |
2503 |
Re-enter password: <comment>(Re-enter your password)</comment> |
2504 |
</pre> |
2505 |
|
2506 |
<p> |
2507 |
To create a user account, we first enter their credentials, followed by |
2508 |
its password. We use <c>useradd</c> and <c>passwd</c> for these tasks. |
2509 |
In the next example, we create a user called "john". |
2510 |
</p> |
2511 |
|
2512 |
<pre caption="Creating a user account"> |
2513 |
# <i>useradd -m -G users john</i> |
2514 |
# <i>passwd john</i> |
2515 |
New password: <comment>(Enter john's password)</comment> |
2516 |
Re-enter password: <comment>(Re-enter john's password)</comment> |
2517 |
</pre> |
2518 |
|
2519 |
<p> |
2520 |
You can change your user id from root to the newly created user by using |
2521 |
<c>su</c>: |
2522 |
</p> |
2523 |
|
2524 |
<pre caption="Changing user id"> |
2525 |
# <i>su - john</i> |
2526 |
</pre> |
2527 |
|
2528 |
</body> |
2529 |
</subsection> |
2530 |
<subsection> |
2531 |
<title>Optional: Viewing Documentation while Installing</title> |
2532 |
<body> |
2533 |
|
2534 |
<p> |
2535 |
If you want to view the Gentoo Handbook (either from-CD or online) during the |
2536 |
|