/[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.37 Revision 1.38
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.37 2007/03/13 00:30:09 nightmorph Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.38 2007/05/07 18:11:40 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>7.3</version> 11<version>8.0</version>
12<date>2007-03-12</date> 12<date>2007-05-07</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>. You then
21it to <path>/etc/localtime</path>. Please avoid the 21set your timezone in <path>/etc/conf.d/clock</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 GMT+8.
24</p> 24</p>
25 25
26<pre caption="Setting the timezone information"> 26<pre caption="Setting the timezone information">
27# <i>ls /usr/share/zoneinfo</i> 27# <i>ls /usr/share/zoneinfo</i>
28<comment>(Suppose you want to use GMT)</comment> 28<comment>(Suppose you want to use GMT)</comment>
29# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i> 29# <i>nano -w /etc/conf.d/clock</i>
30TIMEZONE="GMT"
30</pre> 31</pre>
31 32
32</body> 33</body>
33</section> 34</section>
34<section> 35<section>
44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 45available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
45Guide</uri>. 46Guide</uri>.
46</p> 47</p>
47 48
48<p> 49<p>
49For alpha-based systems we have <c>vanilla-sources</c> (the default 2.6 kernel source). 50For alpha-based systems we have <c>gentoo-sources</c> (the default 2.6 kernel
50</p> 51source).
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 <c>vanilla-sources</c>. Of course substitute with
58your choice of sources, this is merely an example.
59</p> 52</p>
60 53
61<pre caption="Installing a kernel source"> 54<pre caption="Installing a kernel source">
62# <i>emerge vanilla-sources</i> 55# <i>emerge gentoo-sources</i>
63</pre> 56</pre>
64 57
65<p> 58<p>
66When you take a look in <path>/usr/src</path> you should see a symlink called 59When you take a look in <path>/usr/src</path> you should see a symlink called
67<path>linux</path> pointing to your kernel source. In this case, the installed 60<path>linux</path> pointing to your kernel source. In this case, the installed
68kernel source points to <c>vanilla-sources-2.6.16.19</c>. Your version may be 61kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
69different, so keep this in mind. 62Your version may be different, so keep this in mind.
70</p> 63</p>
71 64
72<pre caption="Viewing the kernel source symlink"> 65<pre caption="Viewing the kernel source symlink">
73# <i>ls -l /usr/src/linux</i> 66# <i>ls -l /usr/src/linux</i>
74lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.16.19 67lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
75</pre> 68</pre>
76 69
77<p> 70<p>
78Now it is time to configure and compile your kernel source. You 71Now it is time to configure and compile your kernel source. You can use
79can use <c>genkernel</c> for this, which will build a generic kernel as used 72<c>genkernel</c> for this, which will build a generic kernel as used by the
80by the Installation CD. We explain the "manual" configuration first though, as it is 73Installation CD. We explain the "manual" configuration first though, as it is
81the best way to optimize your environment. 74the best way to optimize your environment.
82</p> 75</p>
83 76
84<p> 77<p>
85If you want to manually configure your kernel, continue now with <uri 78If you want to manually configure your kernel, continue now with <uri
86link="#manual">Default: Manual Configuration</uri>. If you want to use 79link="#manual">Default: Manual Configuration</uri>. If you want to use
87<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using 80<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
88genkernel</uri> instead. 81genkernel</uri> instead.
89</p> 82</p>
90 83
91</body> 84</body>
92</subsection> 85</subsection>
151 144
152<p> 145<p>
153Now go to <c>File Systems</c> and select support for the filesystems you use. 146Now go to <c>File Systems</c> and select support for the filesystems you use.
154<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 147<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
155able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc 148able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
156file system</c>. If you are using a 2.4 kernel, you should also select the 149file system</c>.
157<c>/dev file system</c> and <c>Automatically mount at boot</c> options, and
158you should make sure to <c>emerge devfsd</c>.
159</p> 150</p>
160 151
161<pre caption="Selecting necessary file systems"> 152<pre caption="Selecting necessary file systems">
162<comment>(With a 2.4.x kernel)</comment>
163File systems ---&gt;
164 [*] Virtual memory file system support (former shm fs)
165 [*] /proc file system support
166 [*] /dev file system support (EXPERIMENTAL)
167 [*] Automatically mount at boot
168 [ ] /dev/pts file system for Unix98 PTYs
169
170<comment>(With a 2.6.x kernel)</comment>
171File systems ---&gt; 153File systems ---&gt;
172 Pseudo Filesystems ---&gt; 154 Pseudo Filesystems ---&gt;
173 [*] /proc file system support 155 [*] /proc file system support
174 [*] Virtual memory file system support (former shm fs) 156 [*] Virtual memory file system support (former shm fs)
175 157
185If you are using PPPoE to connect to the Internet or you are using a dial-up 167If you are using PPPoE to connect to the Internet or you are using a dial-up
186modem, you will need the following options in the kernel: 168modem, you will need the following options in the kernel:
187</p> 169</p>
188 170
189<pre caption="Selecting PPPoE necessary drivers"> 171<pre caption="Selecting PPPoE necessary drivers">
190<comment>(With a 2.4.x kernel)</comment>
191Network device support ---&gt;
192 &lt;*&gt; PPP (point-to-point protocol) support
193 &lt;*&gt; PPP support for async serial ports
194 &lt;*&gt; PPP support for sync tty ports
195
196<comment>(With a 2.6.x kernel)</comment>
197Device Drivers ---&gt; 172Device Drivers ---&gt;
198 Networking support ---&gt; 173 Networking support ---&gt;
199 &lt;*&gt; PPP (point-to-point protocol) support 174 &lt;*&gt; PPP (point-to-point protocol) support
200 &lt;*&gt; PPP support for async serial ports 175 &lt;*&gt; PPP support for async serial ports
201 &lt;*&gt; PPP support for sync tty ports 176 &lt;*&gt; PPP support for sync tty ports
202</pre> 177</pre>
203 178
204<p> 179<p>
205The two compression options won't harm but are not definitely needed, neither 180The two compression options won't harm but are not definitely needed, neither
206does the <c>PPP over Ethernet</c> option, that might only be used by 181does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
207<c>rp-pppoe</c> when configured to do kernel mode PPPoE. 182when configured to do kernel mode PPPoE.
208</p> 183</p>
209 184
210<p> 185<p>
211If you require it, don't forget to include support in the kernel for your 186If you require it, don't forget to include support in the kernel for your
212ethernet card. 187ethernet card.
285Now that your kernel is configured, it is time to compile and install it. Exit 260Now that your kernel is configured, it is time to compile and install it. Exit
286the configuration and start the compilation process: 261the configuration and start the compilation process:
287</p> 262</p>
288 263
289<pre caption="Compiling the kernel"> 264<pre caption="Compiling the kernel">
290<comment>(For 2.4 kernel)</comment>
291# <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
292
293<comment>(For 2.6 kernel)</comment>
294# <i>make &amp;&amp; make modules_install</i> 265# <i>make &amp;&amp; make modules_install</i>
295
296<comment>(For all kernels)</comment>
297# <i>make boot</i> 266# <i>make boot</i>
298</pre> 267</pre>
299 268
300<p> 269<p>
301When the kernel has finished compiling, copy the kernel image to 270When the kernel has finished compiling, copy the kernel image to
323If you are reading this section, you have chosen to use our <c>genkernel</c> 292If you are reading this section, you have chosen to use our <c>genkernel</c>
324script to configure your kernel for you. 293script to configure your kernel for you.
325</p> 294</p>
326 295
327<p> 296<p>
328Now that your kernel source tree is installed, it's now time to compile your 297Now that your kernel source tree is installed, it's now time to compile your
329kernel by using our <c>genkernel</c> script to automatically build a kernel for 298kernel by using our <c>genkernel</c> script to automatically build a kernel for
330you. <c>genkernel</c> works by configuring a kernel nearly identically to the 299you. <c>genkernel</c> works by configuring a kernel nearly identically to the
331way our Installation CD kernel is configured. This means that when you use 300way our Installation CD kernel is configured. This means that when you use
332<c>genkernel</c> to build your kernel, your system will generally detect all 301<c>genkernel</c> to build your kernel, your system will generally detect all
333your hardware at boot-time, just like our Installation CD does. Because genkernel 302your hardware at boot-time, just like our Installation CD does. Because
334doesn't require any manual kernel configuration, it is an ideal solution for 303genkernel doesn't require any manual kernel configuration, it is an ideal
335those users who may not be comfortable compiling their own kernels. 304solution for those users who may not be comfortable compiling their own
305kernels.
336</p> 306</p>
337 307
338<p> 308<p>
339Now, let's see how to use genkernel. First, emerge the genkernel ebuild: 309Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
340</p> 310</p>
356module). 326module).
357</p> 327</p>
358 328
359<pre caption="Running genkernel"> 329<pre caption="Running genkernel">
360# <i>genkernel all</i> 330# <i>genkernel all</i>
361* Gentoo Linux Genkernel; Version 3.4.0
362* Running with options: all
363
364* Linux Kernel 2.6.16.19 for alpha...
365* kernel: >> Running mrproper...
366<comment>(Output removed to increase readability)</comment>
367* Kernel compiled successfully!
368*
369* Required Kernel Parameters:
370* real_root=/dev/$ROOT
371*
372* Where $ROOT is the device node for your root partition as the
373* one specified in /etc/fstab
374*
375* If you require Genkernel's hardware detection features; you MUST
376* tell your bootloader to use the provided INITRAMFS file. Otherwise;
377* substitute the root argument for the real_root argument if you are
378* not planning to use the initrd...
379
380* WARNING... WARNING... WARNING...
381* Additional kernel cmdline arguments that *may* be required to boot properly...
382* Do NOT report kernel bugs as genkernel bugs unless your bug
383* is about the default genkernel configuration...
384*
385* Make sure you have the latest genkernel before reporting bugs.
386</pre> 331</pre>
387 332
388<p> 333<p>
389Once <c>genkernel</c> completes, a kernel, full set of modules and 334Once <c>genkernel</c> completes, a kernel, full set of modules and <e>initial
390<e>initial root disk</e> (initrd) will be created. We will use the kernel 335root disk</e> (initrd) will be created. We will use the kernel and initrd when
391and initrd when configuring a boot loader later in this document. Write 336configuring a boot loader later in this document. Write down the names of the
392down the names of the kernel and initrd as you will need it when writing 337kernel and initrd as you will need it when writing the bootloader configuration
393the bootloader configuration file. The initrd will be started immediately after 338file. The initrd will be started immediately after booting to perform hardware
394booting to perform hardware autodetection (just like on the Installation CD) before 339autodetection (just like on the Installation CD) before your "real" system
395your "real" system starts up. 340starts up.
396</p> 341</p>
397 342
398<pre caption="Checking the created kernel image name and initrd"> 343<pre caption="Checking the created kernel image name and initrd">
399# <i>ls /boot/kernel* /boot/initramfs-*</i> 344# <i>ls /boot/kernel* /boot/initramfs-*</i>
400</pre> 345</pre>
402</body> 347</body>
403</section> 348</section>
404<section id="kernel_modules"> 349<section id="kernel_modules">
405<title>Installing Separate Kernel Modules</title> 350<title>Installing Separate Kernel Modules</title>
406<subsection> 351<subsection>
407<title>Installing Extra Modules</title>
408<body>
409
410<p>
411If appropriate, you should emerge ebuilds for any additional hardware that is
412on your system. Here is a list of kernel-related ebuilds that you could emerge:
413</p>
414
415<table>
416<tcolumn width="1in"/>
417<tcolumn width="4in"/>
418<tcolumn width="2in"/>
419<tr>
420 <th>Ebuild</th>
421 <th>Purpose</th>
422 <th>Command</th>
423</tr>
424<tr>
425 <ti>x11-drm</ti>
426 <ti>
427 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
428 other cards for xorg-x11. Please check the <c>IUSE_VIDEO_CARDS</c> variable
429 in the <path>/usr/portage/x11-base/x11-drm</path> ebuilds to see what you
430 need to fill in as <c>yourcard</c>.
431 </ti>
432 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
433</tr>
434</table>
435
436<p>
437Beware though, some of these ebuilds might deal with big dependencies. To verify
438what packages will be installed by emerging an ebuild, use <c>emerge
439--pretend</c>. For instance, for the <c>x11-drm</c> package:
440</p>
441
442<pre caption="View full installation package listing">
443# <i>emerge --pretend x11-drm</i>
444</pre>
445
446</body>
447</subsection>
448<subsection>
449<title>Configuring the Modules</title> 352<title>Configuring the Modules</title>
450<body> 353<body>
451 354
452<p> 355<p>
453You should list the modules you want automatically loaded in 356You should list the modules you want automatically loaded in
454<path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>). 357<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
455You can add extra options to the modules too if you want. 358the modules too if you want.
456</p> 359</p>
457 360
458<p> 361<p>
459To view all available modules, run the following <c>find</c> command. Don't 362To view all available modules, run the following <c>find</c> command. Don't
460forget to substitute "&lt;kernel version&gt;" with the version of the kernel you 363forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
465# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i> 368# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
466</pre> 369</pre>
467 370
468<p> 371<p>
469For instance, to automatically load the <c>3c59x.o</c> module, edit the 372For instance, to automatically load the <c>3c59x.o</c> module, edit the
470<path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module 373<path>kernel-2.6</path> file and enter the module name in it.
471name in it.
472</p> 374</p>
473 375
474<pre caption="Editing /etc/modules.autoload.d/kernel-2.4"> 376<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
475<comment>(Example for 2.4 kernels)</comment>
476# <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> 377# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
477</pre> 378</pre>
478 379
479<pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6"> 380<pre caption="/etc/modules.autoload.d/kernel-2.6">
4803c59x 3813c59x
481</pre> 382</pre>
482 383
483<p> 384<p>
484Continue the installation with <uri link="?part=1&amp;chap=8">Configuring 385Continue the installation with <uri link="?part=1&amp;chap=8">Configuring

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20