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

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.55

  ViewVC Help
Powered by ViewVC 1.1.20