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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.32 Revision 1.40
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.32 2005/11/21 15:37:12 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.40 2007/05/20 04:16:25 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.10</version> 11<version>8.2</version>
12<date>2005-11-21</date> 12<date>2007-05-19</date>
13 13
14<section> 14<section>
15<title>Timezone</title> 15<title>Timezone</title>
16<body> 16<body>
17 17
18<p> 18<p>
19You first need to select your timezone so that your system knows where it is 19You first need to select your timezone so that your system knows where it is
20located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy 20located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy
21it to <path>/etc/localtime</path>. Please avoid the 21it to <path>/etc/localtime</path>. Please avoid the
22<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not 22<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
23indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. 23indicate the expected zones. For instance, <path>GMT-8</path> is in fact
24GMT+8.
24</p> 25</p>
25 26
26<pre caption="Setting the timezone information"> 27<pre caption="Setting the timezone information">
27# <i>ls /usr/share/zoneinfo</i> 28# <i>ls /usr/share/zoneinfo</i>
28<comment>(Suppose you want to use GMT)</comment> 29<comment>(Suppose you want to use GMT)</comment>
29# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i> 30# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31</pre>
32
33<p>
34Next, define the timezone you just used in <path>/etc/conf.d/clock</path> so
35that further upgrades of the <c>sys-libs/timezone-data</c> package can update
36<path>/etc/localtime</path> automatically.
37</p>
38
39<pre caption="Setting the TIMEZONE variable in /etc/conf.d/clock">
40# <i>nano -w /etc/conf.d/clock</i>
41TIMEZONE="GMT"
30</pre> 42</pre>
31 43
32</body> 44</body>
33</section> 45</section>
34<section> 46<section>
44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 56available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
45Guide</uri>. 57Guide</uri>.
46</p> 58</p>
47 59
48<p> 60<p>
49For alpha-based systems we have <c>vanilla-sources</c> (the default 2.6 kernel source). 61For alpha-based systems we have <c>gentoo-sources</c> (the default 2.6 kernel
50</p> 62source).
51
52<p>
53Choose your kernel source and install it using <c>emerge</c>.
54</p>
55
56<p>
57In the next example we install the <c>vanilla-sources</c>.
58Of course substitute with your choice of sources, this is merely an example.
59The <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other
60dependencies at this point:
61</p> 63</p>
62 64
63<pre caption="Installing a kernel source"> 65<pre caption="Installing a kernel source">
64# <i>USE="-doc" emerge vanilla-sources</i> 66# <i>emerge gentoo-sources</i>
65</pre> 67</pre>
66 68
67<p> 69<p>
68When you take a look in <path>/usr/src</path> you should see a symlink called 70When you take a look in <path>/usr/src</path> you should see a symlink called
69<path>linux</path> pointing to your kernel source: 71<path>linux</path> pointing to your kernel source. In this case, the installed
72kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
73Your version may be different, so keep this in mind.
70</p> 74</p>
71 75
72<pre caption="Viewing the kernel source symlink"> 76<pre caption="Viewing the kernel source symlink">
73# <i>ls -l /usr/src/linux</i> 77# <i>ls -l /usr/src/linux</i>
74lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.11.2 78lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
75</pre> 79</pre>
76 80
77<p>
78If this isn't the case (i.e. the symlink points to a different kernel source)
79change the symlink before you continue:
80</p> 81<p>
81
82<pre caption="Changing the kernel source symlink">
83# <i>rm /usr/src/linux</i>
84# <i>cd /usr/src</i>
85# <i>ln -s linux-2.6.11.2 linux</i>
86</pre>
87
88<p>
89Now it is time to configure and compile your kernel source. You 82Now it is time to configure and compile your kernel source. You can use
90can use <c>genkernel</c> for this, which will build a generic kernel as used 83<c>genkernel</c> for this, which will build a generic kernel as used by the
91by the Installation CD. We explain the "manual" configuration first though, as it is 84Installation CD. We explain the "manual" configuration first though, as it is
92the best way to optimize your environment. 85the best way to optimize your environment.
93</p> 86</p>
94 87
95<p> 88<p>
96If you want to manually configure your kernel, continue now with <uri 89If you want to manually configure your kernel, continue now with <uri
97link="#manual">Default: Manual Configuration</uri>. If you want to use 90link="#manual">Default: Manual Configuration</uri>. If you want to use
98<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using 91<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
99genkernel</uri> instead. 92genkernel</uri> instead.
100</p> 93</p>
101 94
102</body> 95</body>
103</subsection> 96</subsection>
162 155
163<p> 156<p>
164Now go to <c>File Systems</c> and select support for the filesystems you use. 157Now go to <c>File Systems</c> and select support for the filesystems you use.
165<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 158<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
166able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc 159able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
167file system</c>. If you are using a 2.4 kernel, you should also select the 160file system</c>.
168<c>/dev file system</c> and <c>Automatically mount at boot</c> options, and
169you should make sure to <c>emerge devfsd</c>.
170</p> 161</p>
171 162
172<pre caption="Selecting necessary file systems"> 163<pre caption="Selecting necessary file systems">
173<comment>(With a 2.4.x kernel)</comment>
174File systems ---&gt;
175 [*] Virtual memory file system support (former shm fs)
176 [*] /proc file system support
177 [*] /dev file system support (EXPERIMENTAL)
178 [*] Automatically mount at boot
179 [ ] /dev/pts file system for Unix98 PTYs
180
181<comment>(With a 2.6.x kernel)</comment>
182File systems ---&gt; 164File systems ---&gt;
183 Pseudo Filesystems ---&gt; 165 Pseudo Filesystems ---&gt;
184 [*] /proc file system support 166 [*] /proc file system support
185 [ ] /dev file system support (OBSOLETE)
186 [*] Virtual memory file system support (former shm fs) 167 [*] Virtual memory file system support (former shm fs)
187 168
188<comment>(Select one or more of the following options as needed by your system)</comment> 169<comment>(Select one or more of the following options as needed by your system)</comment>
189 &lt;*&gt; Reiserfs support 170 &lt;*&gt; Reiserfs support
190 &lt;*&gt; Ext3 journalling file system support 171 &lt;*&gt; Ext3 journalling file system support
197If you are using PPPoE to connect to the Internet or you are using a dial-up 178If you are using PPPoE to connect to the Internet or you are using a dial-up
198modem, you will need the following options in the kernel: 179modem, you will need the following options in the kernel:
199</p> 180</p>
200 181
201<pre caption="Selecting PPPoE necessary drivers"> 182<pre caption="Selecting PPPoE necessary drivers">
202<comment>(With a 2.4.x kernel)</comment>
203Network device support ---&gt;
204 &lt;*&gt; PPP (point-to-point protocol) support
205 &lt;*&gt; PPP support for async serial ports
206 &lt;*&gt; PPP support for sync tty ports
207
208<comment>(With a 2.6.x kernel)</comment>
209Device Drivers ---&gt; 183Device Drivers ---&gt;
210 Networking support ---&gt; 184 Networking support ---&gt;
211 &lt;*&gt; PPP (point-to-point protocol) support 185 &lt;*&gt; PPP (point-to-point protocol) support
212 &lt;*&gt; PPP support for async serial ports 186 &lt;*&gt; PPP support for async serial ports
213 &lt;*&gt; PPP support for sync tty ports 187 &lt;*&gt; PPP support for sync tty ports
214</pre> 188</pre>
215 189
216<p> 190<p>
217The two compression options won't harm but are not definitely needed, neither 191The two compression options won't harm but are not definitely needed, neither
218does the <c>PPP over Ethernet</c> option, that might only be used by 192does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
219<c>rp-pppoe</c> when configured to do kernel mode PPPoE. 193when configured to do kernel mode PPPoE.
220</p> 194</p>
221 195
222<p> 196<p>
223If you require it, don't forget to include support in the kernel for your 197If you require it, don't forget to include support in the kernel for your
224ethernet card. 198ethernet card.
297Now that your kernel is configured, it is time to compile and install it. Exit 271Now that your kernel is configured, it is time to compile and install it. Exit
298the configuration and start the compilation process: 272the configuration and start the compilation process:
299</p> 273</p>
300 274
301<pre caption="Compiling the kernel"> 275<pre caption="Compiling the kernel">
302<comment>(For 2.4 kernel)</comment>
303# <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
304
305<comment>(For 2.6 kernel)</comment>
306# <i>make &amp;&amp; make modules_install</i> 276# <i>make &amp;&amp; make modules_install</i>
307
308<comment>(For all kernels)</comment>
309# <i>make boot</i> 277# <i>make boot</i>
310</pre> 278</pre>
311 279
312<p> 280<p>
313When the kernel has finished compiling, copy the kernel image to 281When the kernel has finished compiling, copy the kernel image to
314<path>/boot</path>. In the next example we assume you have configured and 282<path>/boot</path>. Recent kernels might create <path>vmlinux</path> instead of
315compiled <c>vanilla-sources-2.6.11.2</c>; recent kernels might create 283<path>vmlinux.gz</path>. Keep this in mind when you copy your kernel image.
316<path>vmlinux</path> instead of <path>vmlinux.gz</path>.
317</p> 284</p>
318 285
319<pre caption="Installing the kernel"> 286<pre caption="Installing the kernel">
320# <i>cp arch/alpha/boot/vmlinux.gz /boot/</i> 287# <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
321</pre>
322
323<p>
324It is also wise to copy over your kernel configuration file to
325<path>/boot</path>, just in case :)
326</p>
327
328<pre caption="Backing up your kernel configuration">
329# <i>cp .config /boot/config-2.6.11.2</i>
330</pre> 288</pre>
331 289
332<p> 290<p>
333Now continue with <uri link="#kernel_modules">Installing Separate Kernel 291Now continue with <uri link="#kernel_modules">Installing Separate Kernel
334Modules</uri>. 292Modules</uri>.
345If you are reading this section, you have chosen to use our <c>genkernel</c> 303If you are reading this section, you have chosen to use our <c>genkernel</c>
346script to configure your kernel for you. 304script to configure your kernel for you.
347</p> 305</p>
348 306
349<p> 307<p>
350Now that your kernel source tree is installed, it's now time to compile your 308Now that your kernel source tree is installed, it's now time to compile your
351kernel by using our <c>genkernel</c> script to automatically build a kernel for 309kernel by using our <c>genkernel</c> script to automatically build a kernel for
352you. <c>genkernel</c> works by configuring a kernel nearly identically to the 310you. <c>genkernel</c> works by configuring a kernel nearly identically to the
353way our Installation CD kernel is configured. This means that when you use 311way our Installation CD kernel is configured. This means that when you use
354<c>genkernel</c> to build your kernel, your system will generally detect all 312<c>genkernel</c> to build your kernel, your system will generally detect all
355your hardware at boot-time, just like our Installation CD does. Because genkernel 313your hardware at boot-time, just like our Installation CD does. Because
356doesn't require any manual kernel configuration, it is an ideal solution for 314genkernel doesn't require any manual kernel configuration, it is an ideal
357those users who may not be comfortable compiling their own kernels. 315solution for those users who may not be comfortable compiling their own
316kernels.
358</p> 317</p>
359 318
360<p> 319<p>
361Now, let's see how to use genkernel. First, emerge the genkernel ebuild: 320Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
362</p> 321</p>
378module). 337module).
379</p> 338</p>
380 339
381<pre caption="Running genkernel"> 340<pre caption="Running genkernel">
382# <i>genkernel all</i> 341# <i>genkernel all</i>
383GenKernel v3.0.1_beta10
384* ARCH: Alpha
385* KERNEL VER: 2.6.11.2
386* kernel: configuring source
387* kernel: running mrproper
388<comment>(Output removed to increase readability)</comment>
389* Kernel compiled successfully!
390* Required Kernel Params:
391* : root=/dev/ram0 init=/linuxrc real_root=/dev/$ROOT
392* where $ROOT is the devicenode for your root partition as
393* you should have specified in /etc/fstab
394*
395* You MUST tell your bootloader to use the generated initrd
396*
397* Recommended Kernel Params:
398* : vga=0x317 splash=verbose
399*
400* Do NOT report kernel bugs (configs included) as genkernel bugs.
401* Make sure you have the latest genkernel before reporting bugs
402*
403* For more info see /usr/share/genkernel/README
404</pre> 342</pre>
405 343
406<p> 344<p>
407Once <c>genkernel</c> completes, a kernel, full set of modules and 345Once <c>genkernel</c> completes, a kernel, full set of modules and <e>initial
408<e>initial root disk</e> (initrd) will be created. We will use the kernel 346root disk</e> (initrd) will be created. We will use the kernel and initrd when
409and initrd when configuring a boot loader later in this document. Write 347configuring a boot loader later in this document. Write down the names of the
410down the names of the kernel and initrd as you will need it when writing 348kernel and initrd as you will need it when writing the bootloader configuration
411the bootloader configuration file. The initrd will be started immediately after 349file. The initrd will be started immediately after booting to perform hardware
412booting to perform hardware autodetection (just like on the Installation CD) before 350autodetection (just like on the Installation CD) before your "real" system
413your "real" system starts up. 351starts up.
414</p> 352</p>
415 353
416<pre caption="Checking the created kernel image name and initrd"> 354<pre caption="Checking the created kernel image name and initrd">
417# <i>ls /boot/kernel* /boot/initramfs-*</i> 355# <i>ls /boot/kernel* /boot/initramfs-*</i>
418</pre>
419
420<p>
421Now, let's perform one more step to get our system to be more like the Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects hardware that
422is needed to boot your system, <c>coldplug</c> autodetects everything else.
423To emerge and enable <c>coldplug</c>, type the following:
424</p>
425
426<pre caption="Emerging and enabling coldplug">
427# <i>emerge coldplug</i>
428# <i>rc-update add coldplug boot</i>
429</pre> 356</pre>
430 357
431</body> 358</body>
432</section> 359</section>
433<section id="kernel_modules"> 360<section id="kernel_modules">
434<title>Installing Separate Kernel Modules</title> 361<title>Installing Separate Kernel Modules</title>
435<subsection> 362<subsection>
436<title>Installing Extra Modules</title>
437<body>
438
439<p>
440If appropriate, you should emerge ebuilds for any additional hardware that is
441on your system. Here is a list of kernel-related ebuilds that you could emerge:
442</p>
443
444<table>
445<tcolumn width="1in"/>
446<tcolumn width="4in"/>
447<tcolumn width="2in"/>
448<tr>
449 <th>Ebuild</th>
450 <th>Purpose</th>
451 <th>Command</th>
452</tr>
453<tr>
454 <ti>x11-drm</ti>
455 <ti>
456 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
457 other cards for xorg-x11. Please check the <c>IUSE_VIDEO_CARDS</c> variable
458 in the <path>/usr/portage/x11-base/x11-drm</path> ebuilds to see what you
459 need to fill in as <c>yourcard</c>.
460 </ti>
461 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
462</tr>
463</table>
464
465<p>
466Beware though, some of these ebuilds might deal with big dependencies. To verify
467what packages will be installed by emerging an ebuild, use <c>emerge
468--pretend</c>. For instance, for the <c>x11-drm</c> package:
469</p>
470
471<pre caption="View full installation package listing">
472# <i>emerge --pretend x11-drm</i>
473</pre>
474
475</body>
476</subsection>
477<subsection>
478<title>Configuring the Modules</title> 363<title>Configuring the Modules</title>
479<body> 364<body>
480 365
481<p> 366<p>
482You should list the modules you want automatically loaded in 367You should list the modules you want automatically loaded in
483<path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>). 368<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
484You can add extra options to the modules too if you want. 369the modules too if you want.
485</p> 370</p>
486 371
487<p> 372<p>
488To view all available modules, run the following <c>find</c> command. Don't 373To view all available modules, run the following <c>find</c> command. Don't
489forget to substitute "&lt;kernel version&gt;" with the version of the kernel you 374forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
494# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i> 379# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
495</pre> 380</pre>
496 381
497<p> 382<p>
498For instance, to automatically load the <c>3c59x.o</c> module, edit the 383For instance, to automatically load the <c>3c59x.o</c> module, edit the
499<path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module 384<path>kernel-2.6</path> file and enter the module name in it.
500name in it.
501</p> 385</p>
502 386
503<pre caption="Editing /etc/modules.autoload.d/kernel-2.4"> 387<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
504<comment>(Example for 2.4 kernels)</comment>
505# <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> 388# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
506</pre> 389</pre>
507 390
508<pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6"> 391<pre caption="/etc/modules.autoload.d/kernel-2.6">
5093c59x 3923c59x
510</pre> 393</pre>
511 394
512<p> 395<p>
513Continue the installation with <uri link="?part=1&amp;chap=8">Configuring 396Continue the installation with <uri link="?part=1&amp;chap=8">Configuring

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20