/[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.35 - (hide annotations) (download) (as text)
Wed Dec 6 19:59:09 2006 UTC (7 years, 9 months ago) by nightmorph
Branch: MAIN
Changes since 1.34: +13 -6 lines
File MIME type: application/xml
added udev/coldplug blurb to the networked handbooks (no point if on networkless, as they have old portage snapshots) for bug 157346

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

  ViewVC Help
Powered by ViewVC 1.1.20