/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sun Sep 3 05:02:44 2006 UTC (8 years, 1 month ago) by vapier
Branch: MAIN
File MIME type: application/xml
initial import of ia64 handbook

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/hb-install-x86-kernel.xml,v 1.52 2005/07/04 15:57:32 swift Exp $ -->
8
9 <sections>
10
11 <version>7.1</version>
12 <date>2006-08-30</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>, then copy
21 it to <path>/etc/localtime</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>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
30 </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 For IA64 systems, the available kernels are <c>vanilla-sources</c> (the default
50 kernel source as distributed from <uri link="http://kernel.org/">kernel.org</uri>
51 and <c>gentoo-sources</c> (contains additional patches for performance and
52 stability).
53 </p>
54
55 <p>
56 Choose your kernel source and install it using <c>emerge</c>. The
57 <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other
58 dependencies at this point. <c>USE="symlink"</c> is not necessary for a new
59 install, but ensures proper creation of the <path>/usr/src/linux</path>
60 symlink.
61 </p>
62
63 <pre caption="Installing a kernel source">
64 # <i>USE="-doc symlink" emerge gentoo-sources</i>
65 </pre>
66
67 <p>
68 When you take a look in <path>/usr/src</path> you should see a symlink called
69 <path>linux</path> pointing to your kernel source. In this case, the installed
70 kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
71 Your version may be different, so keep this in mind.
72 </p>
73
74 <pre caption="Viewing the kernel source symlink">
75 # <i>ls -l /usr/src/linux</i>
76 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
77 </pre>
78
79 <p>
80 Now it is time to configure and compile your kernel source. You can use
81 <c>genkernel</c> for this, which will build a generic kernel as used by the
82 Installation CD. We explain the "manual" configuration first though, as it is
83 the best way to optimize your environment.
84 </p>
85
86 <p>
87 If you want to manually configure your kernel, continue now with <uri
88 link="#manual">Default: Manual Configuration</uri>. If you want to use
89 <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
90 genkernel</uri> instead.
91 </p>
92
93 </body>
94 </subsection>
95 </section>
96 <section id="manual">
97 <title>Default: Manual Configuration</title>
98 <subsection>
99 <title>Introduction</title>
100 <body>
101
102 <p>
103 Manually configuring a kernel is often seen as the most difficult procedure a
104 Linux user ever has to perform. Nothing is less true -- after configuring a
105 couple of kernels you don't even remember that it was difficult ;)
106 </p>
107
108 <p>
109 However, one thing <e>is</e> true: you must know your system when you start
110 configuring a kernel manually. Most information can be gathered by emerging
111 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
112 be able to use <c>lspci</c> within the chrooted environment. You may safely
113 ignore any <e>pcilib</e> warnings (like pcilib: cannot open
114 /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
115 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
116 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
117 uses (it might provide you with a nice hint on what to enable).
118 </p>
119
120 <p>
121 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
122 will fire up an ncurses-based configuration menu.
123 </p>
124
125 <pre caption="Invoking menuconfig">
126 # <i>cd /usr/src/linux</i>
127 # <i>make menuconfig</i>
128 </pre>
129
130 <p>
131 You will be greeted with several configuration sections. We'll first list some
132 options you must activate (otherwise Gentoo will not function, or not function
133 properly without additional tweaks).
134 </p>
135
136 </body>
137 </subsection>
138 <subsection>
139 <title>Activating Required Options</title>
140 <body>
141
142 <p>
143 First of all, activate the use of development and experimental code/drivers.
144 You need this, otherwise some very important code/drivers won't show up:
145 </p>
146
147 <pre caption="Selecting experimental code/drivers, General setup">
148 Code maturity level options ---&gt;
149 [*] Prompt for development and/or incomplete code/drivers
150 General setup ---&gt;
151 [*] Support for hot-pluggable devices
152 </pre>
153
154 <p>
155 Make sure that every driver that is vital to the booting of your system (such as
156 SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module,
157 otherwise your system will not be able to boot completely.
158 </p>
159
160 <p>
161 Now select the correct system type and processor type. If you don't know what
162 kind of IA64 system type you have, <c>DIG-compliant</c> is a good default
163 choice. If you are installing on an SGI system make sure you select the
164 SGI system type, your kernel may just lock up and refuse to boot otherwise.
165 </p>
166
167 <pre caption="Selecting correct system type">
168 System type ---&gt;
169 <comment>(Change according to your system)</comment>
170 <i>DIG-compliant</i>
171 Processor type ---&gt;
172 <comment>(Change according to your system)</comment>
173 <i>Itanium 2</i>
174 </pre>
175
176 <p>
177 Now go to <c>File Systems</c> and select support for the filesystems you use.
178 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
179 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
180 file system</c>.
181 </p>
182
183 <pre caption="Selecting necessary file systems">
184 File systems ---&gt;
185 Pseudo Filesystems ---&gt;
186 [*] /proc file system support
187 [*] Virtual memory file system support (former shm fs)
188
189 <comment>(Select one or more of the following options as needed by your system)</comment>
190 &lt;*&gt; Reiserfs support
191 &lt;*&gt; Ext3 journalling file system support
192 &lt;*&gt; JFS filesystem support
193 &lt;*&gt; Second extended fs support
194 &lt;*&gt; XFS filesystem support
195
196 <comment>(Be sure to enable VFAT support for the EFI partition)</comment>
197 DOS/FAT/NT Filesystems --->
198 &lt;*&gt; VFAT (Windows-95) fs support
199 </pre>
200
201 <p>
202 Do not forget to enable DMA for your drives:
203 </p>
204
205 <pre caption="Activating DMA">
206 Device Drivers ---&gt;
207 ATA/ATAPI/MFM/RLL support ---&gt;
208 [*] Generic PCI bus-master DMA support
209 [*] Use PCI DMA by default when available
210 </pre>
211
212 <p>
213 If you are using PPPoE to connect to the Internet or you are using a dial-up
214 modem, you will need the following options in the kernel:
215 </p>
216
217 <pre caption="Selecting PPPoE necessary drivers">
218 Device Drivers ---&gt;
219 Networking Support ---&gt;
220 &lt;*&gt; PPP (point-to-point protocol) support
221 &lt;*&gt; PPP support for async serial ports
222 &lt;*&gt; PPP support for sync tty ports
223 </pre>
224
225 <p>
226 The two compression options won't harm but are not definitely needed, neither
227 does the <c>PPP over Ethernet</c> option, that might only be used by
228 <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
229 </p>
230
231 <p>
232 If you require it, don't forget to include support in the kernel for your
233 ethernet card.
234 </p>
235
236 <p>
237 If you have an Intel CPU that supports HyperThreading (tm), or you have a
238 multi-CPU system, you should activate "Symmetric multi-processing support":
239 </p>
240
241 <pre caption="Activating SMP support">
242 Processor type and features ---&gt;
243 [*] Symmetric multi-processing support
244 </pre>
245
246 <p>
247 If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
248 those as well:
249 </p>
250
251 <pre caption="Activating USB Support for Input Devices">
252 Device Drivers ---&gt;
253 USB Support ---&gt;
254 &lt;*&gt; USB Human Interface Device (full HID) support
255 </pre>
256
257 <p>
258 When you've finished configuring the kernel, continue with <uri
259 link="#compiling">Compiling and Installing</uri>.
260 </p>
261
262 </body>
263 </subsection>
264 <subsection id="compiling">
265 <title>Compiling and Installing</title>
266 <body>
267
268 <p>
269 Now that your kernel is configured, it is time to compile and install it. Exit
270 the configuration and start the compilation process:
271 </p>
272
273 <pre caption="Compiling the kernel">
274 # <i>make &amp;&amp; make modules_install</i>
275 </pre>
276
277 <p>
278 When the kernel has finished compiling, copy the kernel image to
279 <path>/boot</path>. Use whatever name you feel is appropriate for your kernel
280 choice and remember it as you will need it later on when you configure your
281 bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the
282 name and version of your kernel.
283 </p>
284
285 <pre caption="Installing the kernel">
286 # <i>cp vmlinux.gz /boot/<keyval id="kernel-name"/></i>
287 </pre>
288
289 <p>
290 Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
291 </p>
292
293 </body>
294 </subsection>
295 </section>
296 <section id="genkernel">
297 <title>Alternative: Using genkernel</title>
298 <body>
299
300 <p>
301 If you are reading this section, you have chosen to use our <c>genkernel</c>
302 script to configure your kernel for you.
303 </p>
304
305 <p>
306 Now that your kernel source tree is installed, it's now time to compile your
307 kernel by using our <c>genkernel</c> script to automatically build a kernel for
308 you. <c>genkernel</c> works by configuring a kernel nearly identically to the
309 way our Installation CD kernel is configured. This means that when you use
310 <c>genkernel</c> to build your kernel, your system will generally detect all
311 your hardware at boot-time, just like our Installation CD does. Because
312 genkernel doesn't require any manual kernel configuration, it is an ideal
313 solution for those users who may not be comfortable compiling their own kernels.
314 </p>
315
316 <p>
317 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
318 </p>
319
320 <pre caption="Emerging genkernel">
321 # <i>emerge genkernel</i>
322 </pre>
323
324 <p>
325 Now, compile your kernel sources by running <c>genkernel --udev all</c>.
326 Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
327 hardware, this compilation will take quite a while to finish!
328 </p>
329
330 <note>
331 Users of EVMS2 or LVM2 will probably want to add
332 <c>--evms2</c> or <c>--lvm2</c> to the genkernel command-line.
333 </note>
334
335 <pre caption="Running genkernel">
336 # <i>genkernel --udev all</i>
337 </pre>
338
339 <p>
340 Once <c>genkernel</c> completes, a kernel, full set of modules and
341 <e>initial root disk</e> (initrd) will be created. We will use the kernel
342 and initrd when configuring a boot loader later in this document. Write
343 down the names of the kernel and initrd as you will need it when writing
344 the bootloader configuration file. The initrd will be started immediately after
345 booting to perform hardware autodetection (just like on the Installation CD)
346 before your "real" system starts up.
347 </p>
348
349 <pre caption="Checking the created kernel image name and initrd">
350 # <i>ls /boot/kernel* /boot/initramfs*</i>
351 </pre>
352
353 <p>
354 Now, let's perform one more step to get our system to be more like the
355 Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects
356 hardware that is needed to boot your system, <c>coldplug</c> autodetects
357 everything else. To emerge and enable <c>coldplug</c>, type the following:
358 </p>
359
360 <pre caption="Emerging and enabling coldplug">
361 # <i>emerge coldplug</i>
362 # <i>rc-update add coldplug boot</i>
363 </pre>
364
365 </body>
366 </section>
367 <section id="kernel_modules">
368 <title>Kernel Modules</title>
369 <subsection>
370 <title>Configuring the Modules</title>
371 <body>
372
373 <p>
374 You should list the modules you want automatically loaded in
375 <path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
376 the modules too if you want.
377 </p>
378
379 <p>
380 To view all available modules, run the following <c>find</c> command. Don't
381 forget to substitute <c><keyval id="kernel-version"/></c> with the version of
382 the kernel you just compiled:
383 </p>
384
385 <pre caption="Viewing all available modules">
386 # <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i>
387 </pre>
388
389 <p>
390 For instance, to automatically load the <c>3c59x.o</c> module, edit the
391 <path>kernel-2.6</path> file and enter the module name in it.
392 </p>
393
394 <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
395 # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
396 </pre>
397
398 <pre caption="/etc/modules.autoload.d/kernel-2.6">
399 3c59x
400 </pre>
401
402 <p>
403 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
404 your System</uri>.
405 </p>
406
407 </body>
408 </subsection>
409 </section>
410 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20