/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Fri Apr 2 08:14:45 2004 UTC (10 years, 5 months ago) by swift
Branch: MAIN
File MIME type: application/xml
#42823 - Separate architecture specific instructions in separate handbooks

1 <?xml version='1.0' encoding='UTF-8'?>
2 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
4 <!-- The content of this document is licensed under the CC-BY-SA license -->
5 <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6
7 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-alpha-kernel.xml,v 1.4 2004/04/01 08:10:42 swift Exp $ -->
8
9 <sections>
10 <section>
11 <title>Timezone</title>
12 <body>
13
14 <p>
15 You first need to select your timezone so that your system knows where it is
16 located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a
17 symlink to <path>/etc/localtime</path> using <c>ln</c>:
18 </p>
19
20 <pre caption="Setting the timezone information">
21 # <i>ls /usr/share/zoneinfo</i>
22 <comment>(Suppose you want to use GMT)</comment>
23 # <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i>
24 </pre>
25
26 </body>
27 </section>
28 <section>
29 <title>Installing the Sources</title>
30 <subsection>
31 <title>Choosing a Kernel</title>
32 <body>
33
34 <p>
35 The core around which all distributions are built is the Linux kernel. It is the
36 layer between the user programs and your system hardware. Gentoo provides its
37 users several possible kernel sources. A full listing with description is
38 available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
39 Guide</uri>.
40 </p>
41
42 <p>
43 For alpha-based systems we have <c>vanilla-sources</c> (the default kernel
44 source as developed by the linux-kernel developers), <c>alpha-sources</c>
45 (kernel source optimized for alpha users) and <c>compaq-sources</c> (kernel
46 source as used by RedHat for Alpha, maintained by Compaq).
47 </p>
48
49 <p>
50 Choose your kernel source and install it using <c>emerge</c>.
51 </p>
52
53 <p>
54 In the next example we install the <c>vanilla-sources</c>.
55 Of course substitute with your choice of sources, this is merely an example:
56 </p>
57
58 <pre caption="Installing a kernel source">
59 # <i>emerge vanilla-sources</i>
60 </pre>
61
62 <p>
63 When you take a look in <path>/usr/src</path> you should see a symlink called
64 <path>linux</path> pointing to your kernel source:
65 </p>
66
67 <pre caption="Viewing the kernel source symlink">
68 # <i>ls -l /usr/src/linux</i>
69 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.4.24
70 </pre>
71
72 <p>
73 If this isn't the case (i.e. the symlink points to a different kernel source)
74 change the symlink before you continue:
75 </p>
76
77 <pre caption="Changing the kernel source symlink">
78 # <i>rm /usr/src/linux &amp;&amp; ln -s /usr/src/linux-2.4.24 /usr/src/linux</i>
79 </pre>
80
81 <p>
82 Now it is time to configure and compile your kernel source. You
83 can use <c>genkernel</c> for this, which will build a generic kernel as used
84 by the LiveCD. We explain the "manual" configuration first though, as it is
85 the best way to optimize your environment.
86 </p>
87
88 <p>
89 If you want to manually configure your kernel, continue now with <uri
90 link="#manual">Default: Manual Configuration</uri>. If you want to use
91 <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
92 genkernel</uri> instead.
93 </p>
94
95 </body>
96 </subsection>
97 </section>
98 <section id="manual">
99 <title>Default: Manual Configuration</title>
100 <subsection>
101 <title>Introduction</title>
102 <body>
103
104 <p>
105 Manually configuring a kernel is often seen as the most difficult course every
106 Linux users ever has to go through. Nothing is less true -- after configuring a
107 couple of kernels you don't even remember that it was difficult ;)
108 </p>
109
110 <p>
111 However, one thing <e>is</e> true: you must know your system when you start
112 configuring a kernel manually. Most information can be gathered by viewing the
113 contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You
114 can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might
115 provide you with a nice hint on what to enable).
116 </p>
117
118 <p>
119 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
120 will fire up an ncurses-based configuration menu.
121 </p>
122
123 <pre caption="Invoking menuconfig">
124 # <i>cd /usr/src/linux</i>
125 # <i>make menuconfig</i>
126 </pre>
127
128 <p>
129 You will be greeted with several configuration sections. We'll first list some
130 options you must activate (otherwise Gentoo will not function, or not function
131 properly without additional tweaks).
132 </p>
133
134 </body>
135 </subsection>
136 <subsection>
137 <title>Activating Required Options</title>
138 <body>
139
140 <p>
141 First of all, activate the use of development and experimental code/drivers.
142 You need this, otherwise some very important code/drivers won't show up:
143 </p>
144
145 <pre caption="Selecting experimental code/drivers">
146 Code maturity level options ---&gt;
147 [*] Prompt for development and/or incomplete code/drivers
148 </pre>
149
150 <p>
151 Now go to <c>File Systems</c> and select support for the filesystems you use.
152 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
153 able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc
154 file system</c>, <c>/dev file system</c> + <c>Automatically mount at boot</c>:
155 </p>
156
157 <pre caption="Selecting necessary file systems">
158 File systems ---&gt;
159 [*] Virtual memory file system support (former shm fs)
160 [*] /proc file system support
161 [*] /dev file system support (EXPERIMENTAL)
162 [*] Automatically mount at boot
163
164 <comment>(Deselect the following unless you have a 2.6 kernel)</comment>
165 [ ] /dev/pts file system for Unix98 PTYs
166
167 <comment>(Select one or more of the following options as needed by your system)</comment>
168 &lt;*&gt; Reiserfs support
169 &lt;*&gt; Ext3 journalling file system support
170 &lt;*&gt; JFS filesystem support
171 &lt;*&gt; Second extended fs support
172 &lt;*&gt; XFS filesystem support
173 </pre>
174
175 <note>
176 Users of a 2.6 kernel will find some of the mentioned options under <c>Pseudo
177 filesystems</c> which is a subpart of <c>File systems</c>.
178 </note>
179
180 <p>
181 If you are using PPPoE to connect to the Internet or you are using a dial-up
182 modem, you will need the following options in the kernel:
183 </p>
184
185 <pre caption="Selecting PPPoE necessary drivers">
186 Network device support ---&gt;
187 &lt;*&gt; PPP (point-to-point protocol) support
188 &lt;*&gt; PPP support for async serial ports
189 &lt;*&gt; PPP support for sync tty ports
190 </pre>
191
192 <note>
193 Users of a 2.6 kernel will find the mentioned options under <c>Networking
194 support</c> which is a subpart of <c>Device Drivers</c>.
195 </note>
196
197 <p>
198 The two compression options won't harm but are not definitely needed, neither
199 does the <c>PPP over Ethernet</c> option, that might only be used by
200 <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
201 </p>
202
203 <note>
204 Users of a 2.6 kernel will find the mentioned options under <c>Device
205 Drivers</c>.
206 </note>
207
208 <p>
209 If you require it, don't forget to include support in the kernel for your
210 ethernet card.
211 </p>
212
213 <p>
214 The following Alpha-specific options are recommended as well:
215 </p>
216
217 <pre caption="Alpha-specific options">
218 General setup ---&gt;
219 &lt;*&gt; SRM environment through procfs
220 &lt;*&gt; Configure uac policy via sysctl
221
222 Plug and Play configuration ---&gt;
223 &lt;*&gt; Plug and Play support
224 &lt;M&gt; ISA Plug and Play support
225
226 SCSI support ---&gt;
227 SCSI low-level drivers ---&gt;
228 &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
229 &lt;*&gt; Qlogic ISP SCSI support
230
231 Network device support ---&gt;
232 Ethernet (10 or 100 Mbit) ---&gt;
233 &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
234 &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
235 &lt;M&gt; EtherExpressPro/100 support (eepro100)
236 &lt;M&gt; EtherExpressPro/100 support (e100)
237 Ethernet (1000 Mbit) ---&gt;
238 &lt;M&gt; Alteon AceNIC
239 [*] Omit support for old Tigon I
240 &lt;M&gt; Broadcom Tigon3
241 [*] FDDI driver support
242 &lt;M&gt; Digital DEFEA and DEFPA
243 &lt;*&gt; PPP support
244 &lt;*&gt; PPP Deflate compression
245
246 Character devices ---&gt;
247 [*] Support for console on serial port
248 [*] Direct Rendering Manager
249
250 File systems ---&gt;
251 &lt;*&gt; Kernel automounter version 4 support
252 Network File Systems ---&gt;
253 &lt;*&gt; NFS
254 [*] NFSv3 client
255 &lt;*&gt; NFS server
256 [*] NFSv3 server
257 Partition Types ---&gt;
258 [*] Advanced partition selection
259 [*] Alpha OSF partition support
260 Native Language Support
261 &lt;*&gt; NLS ISO 8859-1
262
263 Sound ---&gt;
264 &lt;M&gt; Sound card support
265 &lt;M&gt; OSS sound modules
266 [*] Verbose initialisation
267 [*] Persistent DMA buffers
268 &lt;M&gt; 100% Sound Blaster compatibles
269 </pre>
270
271 <p>
272 When you've finished configuring the kernel, continue with <uri
273 link="#compiling">Compiling and Installing</uri>.
274 </p>
275
276 </body>
277 </subsection>
278 <subsection id="compiling">
279 <title>Compiling and Installing</title>
280 <body>
281
282 <p>
283 Now that your kernel is configured, it is time to compile and install it. Exit
284 the configuration and run <c>make dep &amp;&amp; make vmlinux modules
285 modules_install</c>:
286 </p>
287
288 <pre caption="Compiling the kernel">
289 <comment>(For 2.4 kernel)</comment>
290 # <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
291
292 <comment>(For 2.6 kernel)</comment>
293 # <i>make &amp;&amp; make modules_install</i>
294 </pre>
295
296 <p>
297 When the kernel is done compiling, copy over the kernel image to
298 <path>/boot</path>. In the next example we assume you have configured and
299 compiled <c>vanilla-sources-2.4.24</c>:
300 </p>
301
302 <pre caption="Installing the kernel">
303 # <i>cp vmlinux /boot/kernel-2.4.24</i>
304 # <i>cp System.map /boot/System.map-2.4.24</i>
305 </pre>
306
307 <p>
308 It is also wise to copy over your kernel configuration file to
309 <path>/boot</path>, just in case :)
310 </p>
311
312 <pre caption="Backing up your kernel configuration">
313 # <i>cp .config /boot/config-2.4.24</i>
314 </pre>
315
316 <p>
317 Now continue with <uri link="#kernel_modules">Installing Separate Kernel
318 Modules</uri>.
319 </p>
320
321 </body>
322 </subsection>
323 </section>
324 <section id="genkernel">
325 <title>Alternative: Using genkernel</title>
326 <body>
327
328 <p>
329 If you are reading this section, you have chosen to use our <c>genkernel</c>
330 script to configure your kernel for you.
331 </p>
332
333 <p>
334 Now that your kernel source tree is installed, it's now time to compile your
335 kernel by using our <c>genkernel</c> script to automatically build a kernel for
336 you. <c>genkernel</c> works by configuring a kernel nearly identically to the
337 way our LiveCD kernel is configured. This means that when you use
338 <c>genkernel</c> to build your kernel, your system will generally detect all
339 your hardware at boot-time, just like our Live CD does. Because genkernel
340 doesn't require any manual kernel configuration, it is an ideal solution for
341 those users who may not be comfortable compiling their own kernels.
342 </p>
343
344 <p>
345 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
346 </p>
347
348 <pre caption="Emerging genkernel">
349 # <i>emerge genkernel</i>
350 </pre>
351
352 <p>
353 Now, compile your kernel sources by running <c>genkernel all</c>.
354 Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
355 hardware, this compilation will take quite a while to finish!
356 </p>
357
358 <p>
359 Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
360 need to manually configure your kernel using <c>genkernel --menuconfig all</c>
361 and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
362 module).
363 </p>
364
365 <pre caption="Running genkernel">
366 # <i>genkernel all</i>
367 GenKernel v3.0.1_beta10
368 * ARCH: Alpha
369 * KERNEL VER: 2.4.24
370 * kernel: configuring source
371 * kernel: running mrproper
372 <comment>(Output removed to increase readability)</comment>
373 * Kernel compiled successfully!
374 * Required Kernel Params:
375 * : root=/dev/ram0 init=/linuxrc real_root=/dev/$ROOT
376 * where $ROOT is the devicenode for your root partition as
377 * you should have specified in /etc/fstab
378 *
379 * You MUST tell your bootloader to use the generated initrd
380 *
381 * Recommended Kernel Params:
382 * : vga=0x317 splash=verbose
383 *
384 * Do NOT report kernel bugs (configs included) as genkernel bugs.
385 * Make sure you have the latest genkernel before reporting bugs
386 *
387 * For more info see /usr/share/genkernel/README
388 </pre>
389
390 <p>
391 Once <c>genkernel</c> completes, a kernel, full set of modules and
392 <e>initial root disk</e> (initrd) will be created. We will use the kernel
393 and initrd when configuring a boot loader later in this document. Write
394 down the names of the kernel and initrd as you will need it when writing
395 the bootloader configuration file. The initrd will be started immediately after
396 booting to perform hardware autodetection (just like on the Live CD) before
397 your "real" system starts up.
398 </p>
399
400 <pre caption="Checking the created kernel image name and initrd">
401 # <i>ls /boot/kernel* /boot/initrd*</i>
402 </pre>
403
404 <p>
405 Now, let's perform one more step to get our system to be more like the Live
406 CD -- let's emerge <c>hotplug</c>. While the initrd autodetects hardware that
407 is needed to boot your system, <c>hotplug</c> autodetects everything else.
408 To emerge and enable <c>hotplug</c>, type the following:
409 </p>
410
411 <pre caption="Emerging and enabling hotplug">
412 # <i>emerge hotplug</i>
413 # <i>rc-update add hotplug default</i>
414 </pre>
415
416 </body>
417 </section>
418 <section id="kernel_modules">
419 <title>Installing Separate Kernel Modules</title>
420 <subsection>
421 <title>Installing Extra Modules</title>
422 <body>
423
424 <p>
425 If appropriate, you should emerge ebuilds for any additional hardware that is
426 on your system. Here is a list of kernel-related ebuilds that you could emerge:
427 </p>
428
429 <table>
430 <tcolumn width="1in"/>
431 <tcolumn width="4in"/>
432 <tcolumn width="2in"/>
433 <tr>
434 <th>Ebuild</th>
435 <th>Purpose</th>
436 <th>Command</th>
437 </tr>
438 <tr>
439 <ti>xfree-drm</ti>
440 <ti>
441 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
442 other cards for XFree86. Please check the <c>IUSE_VIDEO_CARDS</c> variable
443 in the <path>/usr/portage/x11-base/xfree-drm</path> ebuilds to see what you
444 need to fill in as <c>yourcard</c>.
445 </ti>
446 <ti><c>VIDEO_CARDS="yourcard" emerge xfree-drm</c></ti>
447 </tr>
448 </table>
449
450 <p>
451 Beware though, some of these ebuilds might deal with big dependencies. To verify
452 what packages will be installed by emerging an ebuild, use <c>emerge
453 --pretend</c>. For instance, for the <c>xfree-drm</c> package:
454 </p>
455
456 <pre caption="View full installation package listing">
457 # <i>emerge --pretend emu10k1</i>
458 </pre>
459
460 </body>
461 </subsection>
462 <subsection>
463 <title>Configuring the Modules</title>
464 <body>
465
466 <p>
467 You should list the modules you want automatically loaded in
468 <path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
469 You can add extra options to the modules too if you want.
470 </p>
471
472 <p>
473 To view all available modules, run the following <c>find</c> command. Don't
474 forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
475 just compiled:
476 </p>
477
478 <pre caption="Viewing all available modules">
479 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
480 </pre>
481
482 <p>
483 For instance, to automatically load the <c>3c59x.o</c> module, edit the
484 <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module
485 name in it.
486 </p>
487
488 <pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
489 <comment>(Example for 2.4 kernels)</comment>
490 # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
491 </pre>
492
493 <pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
494 3c59x
495 </pre>
496
497 <p>
498 Now run <c>modules-update</c> to commit your changes to the
499 <path>/etc/modules.conf</path> file:
500 </p>
501
502 <pre caption="Running modules-update">
503 # <i>modules-update</i>
504 </pre>
505
506 <p>
507 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
508 your System</uri>.
509 </p>
510
511 </body>
512 </subsection>
513 </section>
514 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20