/[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.38 - (show annotations) (download) (as text)
Mon May 7 18:11:40 2007 UTC (7 years, 2 months ago) by nightmorph
Branch: MAIN
Changes since 1.37: +44 -143 lines
File MIME type: application/xml
2007.0 release is here; final changes and new docs

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 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-alpha-kernel.xml,v 1.19 2007/04/08 01:26:16 nightmorph Exp $ -->
8
9 <sections>
10
11 <version>8.0</version>
12 <date>2007-05-07</date>
13
14 <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 located. Look for your timezone in <path>/usr/share/zoneinfo</path>. You then
21 set 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
23 indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8.
24 </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 # <i>nano -w /etc/conf.d/clock</i>
30 TIMEZONE="GMT"
31 </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 For alpha-based systems we have <c>gentoo-sources</c> (the default 2.6 kernel
51 source).
52 </p>
53
54 <pre caption="Installing a kernel source">
55 # <i>emerge gentoo-sources</i>
56 </pre>
57
58 <p>
59 When you take a look in <path>/usr/src</path> you should see a symlink called
60 <path>linux</path> pointing to your kernel source. In this case, the installed
61 kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
62 Your version may be different, so keep this in mind.
63 </p>
64
65 <pre caption="Viewing the kernel source symlink">
66 # <i>ls -l /usr/src/linux</i>
67 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
68 </pre>
69
70 <p>
71 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 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 link="#manual">Default: Manual Configuration</uri>. If you want to use
80 <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
81 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 Manually configuring a kernel is often seen as the most difficult procedure a
95 Linux user ever has to perform. Nothing is less true -- after configuring a
96 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 configuring a kernel manually. Most information can be gathered by emerging
102 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
103 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 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
107 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 </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 <pre caption="Selecting experimental code/drivers, General setup">
139 Code maturity level options ---&gt;
140 [*] Prompt for development and/or incomplete code/drivers
141 General setup ---&gt;
142 [*] Support for hot-pluggable devices
143 </pre>
144
145 <p>
146 Now go to <c>File Systems</c> and select support for the filesystems you use.
147 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
148 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
149 file system</c>.
150 </p>
151
152 <pre caption="Selecting necessary file systems">
153 File systems ---&gt;
154 Pseudo Filesystems ---&gt;
155 [*] /proc file system support
156 [*] Virtual memory file system support (former shm fs)
157
158 <comment>(Select one or more of the following options as needed by your system)</comment>
159 &lt;*&gt; Reiserfs support
160 &lt;*&gt; Ext3 journalling file system support
161 &lt;*&gt; JFS filesystem support
162 &lt;*&gt; Second extended fs support
163 &lt;*&gt; XFS filesystem support
164 </pre>
165
166 <p>
167 If you are using PPPoE to connect to the Internet or you are using a dial-up
168 modem, you will need the following options in the kernel:
169 </p>
170
171 <pre caption="Selecting PPPoE necessary drivers">
172 Device Drivers ---&gt;
173 Networking support ---&gt;
174 &lt;*&gt; PPP (point-to-point protocol) support
175 &lt;*&gt; PPP support for async serial ports
176 &lt;*&gt; PPP support for sync tty ports
177 </pre>
178
179 <p>
180 The two compression options won't harm but are not definitely needed, neither
181 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
182 when configured to do kernel mode PPPoE.
183 </p>
184
185 <p>
186 If you require it, don't forget to include support in the kernel for your
187 ethernet card.
188 </p>
189
190 <p>
191 The following options are recommended as well:
192 </p>
193
194 <pre caption="Recommended Alpha options">
195 General setup ---&gt;
196 &lt;*&gt; SRM environment through procfs
197 &lt;*&gt; Configure uac policy via sysctl
198
199 Plug and Play configuration ---&gt;
200 &lt;*&gt; Plug and Play support
201 &lt;M&gt; ISA Plug and Play support
202
203 SCSI support ---&gt;
204 SCSI low-level drivers ---&gt;
205 &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
206 &lt;*&gt; Qlogic ISP SCSI support
207
208 Network device support ---&gt;
209 Ethernet (10 or 100 Mbit) ---&gt;
210 &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
211 &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
212 &lt;M&gt; EtherExpressPro/100 support (eepro100)
213 &lt;M&gt; EtherExpressPro/100 support (e100)
214 Ethernet (1000 Mbit) ---&gt;
215 &lt;M&gt; Alteon AceNIC
216 [*] Omit support for old Tigon I
217 &lt;M&gt; Broadcom Tigon3
218 [*] FDDI driver support
219 &lt;M&gt; Digital DEFEA and DEFPA
220 &lt;*&gt; PPP support
221 &lt;*&gt; PPP Deflate compression
222
223 Character devices ---&gt;
224 [*] Support for console on serial port
225 [*] Direct Rendering Manager
226
227 File systems ---&gt;
228 &lt;*&gt; Kernel automounter version 4 support
229 Network File Systems ---&gt;
230 &lt;*&gt; NFS
231 [*] NFSv3 client
232 &lt;*&gt; NFS server
233 [*] NFSv3 server
234 Partition Types ---&gt;
235 [*] Advanced partition selection
236 [*] Alpha OSF partition support
237 Native Language Support
238 &lt;*&gt; NLS ISO 8859-1
239
240 Sound ---&gt;
241 &lt;M&gt; Sound card support
242 &lt;M&gt; OSS sound modules
243 [*] Verbose initialisation
244 [*] Persistent DMA buffers
245 &lt;M&gt; 100% Sound Blaster compatibles
246 </pre>
247
248 <p>
249 When you've finished configuring the kernel, continue with <uri
250 link="#compiling">Compiling and Installing</uri>.
251 </p>
252
253 </body>
254 </subsection>
255 <subsection id="compiling">
256 <title>Compiling and Installing</title>
257 <body>
258
259 <p>
260 Now that your kernel is configured, it is time to compile and install it. Exit
261 the configuration and start the compilation process:
262 </p>
263
264 <pre caption="Compiling the kernel">
265 # <i>make &amp;&amp; make modules_install</i>
266 # <i>make boot</i>
267 </pre>
268
269 <p>
270 When the kernel has finished compiling, copy the kernel image to
271 <path>/boot</path>. Recent kernels might create <path>vmlinux</path> instead of
272 <path>vmlinux.gz</path>. Keep this in mind when you copy your kernel image.
273 </p>
274
275 <pre caption="Installing the kernel">
276 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
277 </pre>
278
279 <p>
280 Now continue with <uri link="#kernel_modules">Installing Separate Kernel
281 Modules</uri>.
282 </p>
283
284 </body>
285 </subsection>
286 </section>
287 <section id="genkernel">
288 <title>Alternative: Using genkernel</title>
289 <body>
290
291 <p>
292 If you are reading this section, you have chosen to use our <c>genkernel</c>
293 script to configure your kernel for you.
294 </p>
295
296 <p>
297 Now that your kernel source tree is installed, it's now time to compile your
298 kernel by using our <c>genkernel</c> script to automatically build a kernel for
299 you. <c>genkernel</c> works by configuring a kernel nearly identically to the
300 way our Installation CD kernel is configured. This means that when you use
301 <c>genkernel</c> to build your kernel, your system will generally detect all
302 your hardware at boot-time, just like our Installation CD does. Because
303 genkernel doesn't require any manual kernel configuration, it is an ideal
304 solution for those users who may not be comfortable compiling their own
305 kernels.
306 </p>
307
308 <p>
309 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
310 </p>
311
312 <pre caption="Emerging genkernel">
313 # <i>emerge genkernel</i>
314 </pre>
315
316 <p>
317 Now, compile your kernel sources by running <c>genkernel all</c>.
318 Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
319 hardware, this compilation will take quite a while to finish!
320 </p>
321
322 <p>
323 Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
324 need to manually configure your kernel using <c>genkernel --menuconfig all</c>
325 and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
326 module).
327 </p>
328
329 <pre caption="Running genkernel">
330 # <i>genkernel all</i>
331 </pre>
332
333 <p>
334 Once <c>genkernel</c> completes, a kernel, full set of modules and <e>initial
335 root disk</e> (initrd) will be created. We will use the kernel and initrd when
336 configuring a boot loader later in this document. Write down the names of the
337 kernel and initrd as you will need it when writing the bootloader configuration
338 file. The initrd will be started immediately after booting to perform hardware
339 autodetection (just like on the Installation CD) before your "real" system
340 starts up.
341 </p>
342
343 <pre caption="Checking the created kernel image name and initrd">
344 # <i>ls /boot/kernel* /boot/initramfs-*</i>
345 </pre>
346
347 </body>
348 </section>
349 <section id="kernel_modules">
350 <title>Installing Separate Kernel Modules</title>
351 <subsection>
352 <title>Configuring the Modules</title>
353 <body>
354
355 <p>
356 You should list the modules you want automatically loaded in
357 <path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
358 the modules too if you want.
359 </p>
360
361 <p>
362 To view all available modules, run the following <c>find</c> command. Don't
363 forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
364 just compiled:
365 </p>
366
367 <pre caption="Viewing all available modules">
368 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
369 </pre>
370
371 <p>
372 For instance, to automatically load the <c>3c59x.o</c> module, edit the
373 <path>kernel-2.6</path> file and enter the module name in it.
374 </p>
375
376 <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
377 # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
378 </pre>
379
380 <pre caption="/etc/modules.autoload.d/kernel-2.6">
381 3c59x
382 </pre>
383
384 <p>
385 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
386 your System</uri>.
387 </p>
388
389 </body>
390 </subsection>
391 </section>
392 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20