/[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.29 - (show annotations) (download) (as text)
Sat Mar 16 18:58:17 2013 UTC (5 years, 11 months ago) by swift
Branch: MAIN
Changes since 1.28: +3 -26 lines
File MIME type: application/xml
Fix bug #460852 - Move timezone information to the "Installing the Gentoo Base System" chapter

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

  ViewVC Help
Powered by ViewVC 1.1.20