/[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.7 - (show annotations) (download) (as text)
Sun May 20 04:16:25 2007 UTC (7 years, 6 months ago) by nightmorph
Branch: MAIN
Changes since 1.6: +14 -3 lines
File MIME type: application/xml
for safety's sake, needed to move the conf.d/clock TIMEZONE edit to immediately before compiling a kernel. users still run into the warning message if it's left at the end, before rebooting. fixes http://forums.gentoo.org/viewtopic-t-560322.html and other reports.

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

  ViewVC Help
Powered by ViewVC 1.1.20