/[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.45 - (hide annotations) (download) (as text)
Sat Jan 12 22:51:31 2008 UTC (7 years, 6 months ago) by neysx
Branch: MAIN
Changes since 1.44: +5 -7 lines
File MIME type: application/xml
Name of first menu item changed in make menuconfig

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 neysx 1.45 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.44 2007/08/13 03:31:27 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.11
11 neysx 1.45 <version>8.4</version>
12     <date>2008-01-12</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.39 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 neysx 1.39 indicate the expected zones. For instance, <path>GMT-8</path> is in fact
24     GMT+8.
25 swift 1.1 </p>
26    
27     <pre caption="Setting the timezone information">
28     # <i>ls /usr/share/zoneinfo</i>
29     <comment>(Suppose you want to use GMT)</comment>
30 neysx 1.39 # <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31 swift 1.1 </pre>
32    
33     </body>
34     </section>
35     <section>
36     <title>Installing the Sources</title>
37     <subsection>
38     <title>Choosing a Kernel</title>
39     <body>
40    
41     <p>
42     The core around which all distributions are built is the Linux kernel. It is the
43     layer between the user programs and your system hardware. Gentoo provides its
44     users several possible kernel sources. A full listing with description is
45     available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
46     Guide</uri>.
47     </p>
48    
49     <p>
50 nightmorph 1.38 For alpha-based systems we have <c>gentoo-sources</c> (the default 2.6 kernel
51     source).
52 swift 1.1 </p>
53    
54     <pre caption="Installing a kernel source">
55 nightmorph 1.38 # <i>emerge gentoo-sources</i>
56 swift 1.1 </pre>
57    
58     <p>
59     When you take a look in <path>/usr/src</path> you should see a symlink called
60 neysx 1.33 <path>linux</path> pointing to your kernel source. In this case, the installed
61 nightmorph 1.38 kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
62     Your version may be different, so keep this in mind.
63 swift 1.1 </p>
64    
65     <pre caption="Viewing the kernel source symlink">
66     # <i>ls -l /usr/src/linux</i>
67 nightmorph 1.38 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
68 swift 1.1 </pre>
69    
70     <p>
71 nightmorph 1.38 Now it is time to configure and compile your kernel source. You can use
72     <c>genkernel</c> for this, which will build a generic kernel as used by the
73     Installation CD. We explain the "manual" configuration first though, as it is
74 swift 1.1 the best way to optimize your environment.
75     </p>
76    
77     <p>
78     If you want to manually configure your kernel, continue now with <uri
79 nightmorph 1.38 link="#manual">Default: Manual Configuration</uri>. If you want to use
80     <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
81 swift 1.1 genkernel</uri> instead.
82     </p>
83    
84     </body>
85     </subsection>
86     </section>
87     <section id="manual">
88     <title>Default: Manual Configuration</title>
89     <subsection>
90     <title>Introduction</title>
91     <body>
92    
93     <p>
94 neysx 1.7 Manually configuring a kernel is often seen as the most difficult procedure a
95 neysx 1.8 Linux user ever has to perform. Nothing is less true -- after configuring a
96 swift 1.1 couple of kernels you don't even remember that it was difficult ;)
97     </p>
98    
99     <p>
100     However, one thing <e>is</e> true: you must know your system when you start
101 swift 1.24 configuring a kernel manually. Most information can be gathered by emerging
102 swift 1.25 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
103 swift 1.24 be able to use <c>lspci</c> within the chrooted environment. You may safely
104     ignore any <e>pcilib</e> warnings (like pcilib: cannot open
105     /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
106 swift 1.25 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
107 swift 1.24 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
108     uses (it might provide you with a nice hint on what to enable).
109 swift 1.1 </p>
110    
111     <p>
112     Now go to your kernel source directory and execute <c>make menuconfig</c>. This
113     will fire up an ncurses-based configuration menu.
114     </p>
115    
116     <pre caption="Invoking menuconfig">
117     # <i>cd /usr/src/linux</i>
118     # <i>make menuconfig</i>
119     </pre>
120    
121     <p>
122     You will be greeted with several configuration sections. We'll first list some
123     options you must activate (otherwise Gentoo will not function, or not function
124     properly without additional tweaks).
125     </p>
126    
127     </body>
128     </subsection>
129     <subsection>
130     <title>Activating Required Options</title>
131     <body>
132    
133     <p>
134     First of all, activate the use of development and experimental code/drivers.
135     You need this, otherwise some very important code/drivers won't show up:
136     </p>
137    
138 neysx 1.45 <pre caption="Selecting experimental code/drivers">
139     General setup ---&gt;
140 swift 1.1 [*] Prompt for development and/or incomplete code/drivers
141     </pre>
142    
143     <p>
144     Now go to <c>File Systems</c> and select support for the filesystems you use.
145     <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
146 vapier 1.22 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
147 nightmorph 1.38 file system</c>.
148 swift 1.1 </p>
149    
150     <pre caption="Selecting necessary file systems">
151 neysx 1.4 File systems ---&gt;
152     Pseudo Filesystems ---&gt;
153     [*] /proc file system support
154     [*] Virtual memory file system support (former shm fs)
155 swift 1.1
156     <comment>(Select one or more of the following options as needed by your system)</comment>
157     &lt;*&gt; Reiserfs support
158     &lt;*&gt; Ext3 journalling file system support
159     &lt;*&gt; JFS filesystem support
160     &lt;*&gt; Second extended fs support
161     &lt;*&gt; XFS filesystem support
162     </pre>
163    
164     <p>
165     If you are using PPPoE to connect to the Internet or you are using a dial-up
166     modem, you will need the following options in the kernel:
167     </p>
168    
169     <pre caption="Selecting PPPoE necessary drivers">
170 neysx 1.4 Device Drivers ---&gt;
171     Networking support ---&gt;
172     &lt;*&gt; PPP (point-to-point protocol) support
173     &lt;*&gt; PPP support for async serial ports
174     &lt;*&gt; PPP support for sync tty ports
175 swift 1.1 </pre>
176    
177     <p>
178     The two compression options won't harm but are not definitely needed, neither
179 nightmorph 1.38 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
180     when configured to do kernel mode PPPoE.
181 swift 1.1 </p>
182    
183     <p>
184     If you require it, don't forget to include support in the kernel for your
185     ethernet card.
186     </p>
187    
188     <p>
189 vapier 1.9 The following options are recommended as well:
190 swift 1.1 </p>
191    
192 vapier 1.9 <pre caption="Recommended Alpha options">
193 swift 1.1 General setup ---&gt;
194     &lt;*&gt; SRM environment through procfs
195     &lt;*&gt; Configure uac policy via sysctl
196    
197     Plug and Play configuration ---&gt;
198     &lt;*&gt; Plug and Play support
199     &lt;M&gt; ISA Plug and Play support
200    
201     SCSI support ---&gt;
202     SCSI low-level drivers ---&gt;
203     &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
204     &lt;*&gt; Qlogic ISP SCSI support
205    
206     Network device support ---&gt;
207     Ethernet (10 or 100 Mbit) ---&gt;
208     &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
209     &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
210     &lt;M&gt; EtherExpressPro/100 support (eepro100)
211     &lt;M&gt; EtherExpressPro/100 support (e100)
212     Ethernet (1000 Mbit) ---&gt;
213     &lt;M&gt; Alteon AceNIC
214     [*] Omit support for old Tigon I
215     &lt;M&gt; Broadcom Tigon3
216     [*] FDDI driver support
217     &lt;M&gt; Digital DEFEA and DEFPA
218     &lt;*&gt; PPP support
219     &lt;*&gt; PPP Deflate compression
220    
221     Character devices ---&gt;
222     [*] Support for console on serial port
223     [*] Direct Rendering Manager
224    
225     File systems ---&gt;
226     &lt;*&gt; Kernel automounter version 4 support
227     Network File Systems ---&gt;
228     &lt;*&gt; NFS
229     [*] NFSv3 client
230     &lt;*&gt; NFS server
231     [*] NFSv3 server
232     Partition Types ---&gt;
233     [*] Advanced partition selection
234     [*] Alpha OSF partition support
235     Native Language Support
236     &lt;*&gt; NLS ISO 8859-1
237    
238     Sound ---&gt;
239     &lt;M&gt; Sound card support
240     &lt;M&gt; OSS sound modules
241     [*] Verbose initialisation
242     [*] Persistent DMA buffers
243     &lt;M&gt; 100% Sound Blaster compatibles
244     </pre>
245    
246     <p>
247     When you've finished configuring the kernel, continue with <uri
248     link="#compiling">Compiling and Installing</uri>.
249     </p>
250    
251     </body>
252     </subsection>
253     <subsection id="compiling">
254     <title>Compiling and Installing</title>
255     <body>
256    
257     <p>
258     Now that your kernel is configured, it is time to compile and install it. Exit
259 swift 1.20 the configuration and start the compilation process:
260 swift 1.1 </p>
261    
262     <pre caption="Compiling the kernel">
263     # <i>make &amp;&amp; make modules_install</i>
264 vapier 1.6 # <i>make boot</i>
265 swift 1.1 </pre>
266    
267     <p>
268 neysx 1.7 When the kernel has finished compiling, copy the kernel image to
269 neysx 1.33 <path>/boot</path>. Recent kernels might create <path>vmlinux</path> instead of
270     <path>vmlinux.gz</path>. Keep this in mind when you copy your kernel image.
271 swift 1.1 </p>
272    
273     <pre caption="Installing the kernel">
274 vapier 1.6 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
275 swift 1.1 </pre>
276    
277     <p>
278     Now continue with <uri link="#kernel_modules">Installing Separate Kernel
279     Modules</uri>.
280     </p>
281    
282     </body>
283     </subsection>
284     </section>
285     <section id="genkernel">
286     <title>Alternative: Using genkernel</title>
287     <body>
288    
289     <p>
290     If you are reading this section, you have chosen to use our <c>genkernel</c>
291     script to configure your kernel for you.
292     </p>
293    
294     <p>
295 nightmorph 1.38 Now that your kernel source tree is installed, it's now time to compile your
296     kernel by using our <c>genkernel</c> script to automatically build a kernel for
297     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
298     way our Installation CD kernel is configured. This means that when you use
299     <c>genkernel</c> to build your kernel, your system will generally detect all
300     your hardware at boot-time, just like our Installation CD does. Because
301     genkernel doesn't require any manual kernel configuration, it is an ideal
302     solution for those users who may not be comfortable compiling their own
303     kernels.
304 swift 1.1 </p>
305    
306     <p>
307     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
308     </p>
309    
310     <pre caption="Emerging genkernel">
311     # <i>emerge genkernel</i>
312     </pre>
313    
314     <p>
315     Now, compile your kernel sources by running <c>genkernel all</c>.
316     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
317     hardware, this compilation will take quite a while to finish!
318     </p>
319    
320     <p>
321     Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
322     need to manually configure your kernel using <c>genkernel --menuconfig all</c>
323     and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
324     module).
325     </p>
326    
327     <pre caption="Running genkernel">
328     # <i>genkernel all</i>
329     </pre>
330    
331     <p>
332 nightmorph 1.38 Once <c>genkernel</c> completes, a kernel, full set of modules and <e>initial
333     root disk</e> (initrd) will be created. We will use the kernel and initrd when
334     configuring a boot loader later in this document. Write down the names of the
335     kernel and initrd as you will need it when writing the bootloader configuration
336     file. The initrd will be started immediately after booting to perform hardware
337     autodetection (just like on the Installation CD) before your "real" system
338     starts up.
339 swift 1.1 </p>
340    
341     <pre caption="Checking the created kernel image name and initrd">
342 swift 1.29 # <i>ls /boot/kernel* /boot/initramfs-*</i>
343 swift 1.1 </pre>
344    
345     </body>
346     </section>
347     <section id="kernel_modules">
348     <title>Installing Separate Kernel Modules</title>
349     <subsection>
350     <title>Configuring the Modules</title>
351     <body>
352    
353     <p>
354 nightmorph 1.38 You should list the modules you want automatically loaded in
355     <path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
356     the modules too if you want.
357 swift 1.1 </p>
358    
359     <p>
360 nightmorph 1.44 To view all available modules, run the following <c>find</c> command. Don't
361     forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
362     just compiled:
363 swift 1.1 </p>
364    
365     <pre caption="Viewing all available modules">
366 nightmorph 1.44 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
367 swift 1.1 </pre>
368    
369     <p>
370 nightmorph 1.43 For instance, to automatically load the <c>3c59x.ko</c> module, edit the
371 nightmorph 1.38 <path>kernel-2.6</path> file and enter the module name in it.
372 swift 1.1 </p>
373    
374 nightmorph 1.38 <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
375     # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
376 swift 1.1 </pre>
377    
378 nightmorph 1.38 <pre caption="/etc/modules.autoload.d/kernel-2.6">
379 swift 1.1 3c59x
380     </pre>
381    
382     <p>
383     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
384     your System</uri>.
385     </p>
386    
387     </body>
388     </subsection>
389     </section>
390     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20