/[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.33 - (show annotations) (download) (as text)
Tue Dec 17 10:38:05 2013 UTC (4 months ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.32: +4 -4 lines
File MIME type: application/xml
Bug 489782 - Switch links to wiki documents

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.32 2013/09/25 17:31:18 swift Exp $ -->
8
9 <sections>
10
11 <version>23</version>
12 <date>2013-12-17</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="https://wiki.gentoo.org/wiki/Kernel/Overview">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 Next select <e>Maintain a devtmpfs file system to mount at /dev</e> so that
140 critical device files are already available early in the boot process.
141 </p>
142
143 <pre caption="Enabling devtmpfs support">
144 Device Drivers ---&gt;
145 Generic Driver Options ---&gt;
146 [*] Maintain a devtmpfs filesystem to mount at /dev
147 [ ] Automount devtmpfs at /dev, after the kernel mounted the rootfs
148 </pre>
149
150 <p>
151 Now go to <c>File Systems</c> and select support for the filesystems you use.
152 <e>Don't</e> compile the file system you use for the root filesystem as module,
153 otherwise your Gentoo system will not be able to mount your partition. Also
154 select <c>Virtual memory</c> and <c>/proc file system</c>.
155 </p>
156
157 <pre caption="Selecting necessary file systems">
158 File systems ---&gt;
159 Pseudo Filesystems ---&gt;
160 [*] /proc file system support
161 [*] Virtual memory file system support (former shm fs)
162
163 <comment>(Select one or more of the following options as needed by your system)</comment>
164 &lt;*&gt; Reiserfs support
165 &lt;*&gt; Ext3 journalling file system support
166 &lt;*&gt; JFS filesystem support
167 &lt;*&gt; Second extended fs support
168 &lt;*&gt; XFS filesystem support
169
170 <comment>(Be sure to enable VFAT support for the EFI partition)</comment>
171 DOS/FAT/NT Filesystems ---&gt;
172 &lt;*&gt; VFAT (Windows-95) fs support
173
174 <comment>(Enable GPT partition label support if you used that previously</comment>
175 -*- Enable the block layer --->
176 ...
177 Partition Types --->
178 [*] Advanced partition selection
179 ...
180 [*] EFI GUID Partition support
181 </pre>
182
183 <p>
184 If you are using PPPoE to connect to the Internet or you are using a dial-up
185 modem, you will need the following options in the kernel:
186 </p>
187
188 <pre caption="Selecting PPPoE necessary drivers">
189 Device Drivers ---&gt;
190 Network device support ---&gt;
191 &lt;*&gt; PPP (point-to-point protocol) support
192 &lt;*&gt; PPP support for async serial ports
193 &lt;*&gt; PPP support for sync tty ports
194 </pre>
195
196 <p>
197 The two compression options won't harm but are not definitely needed, neither
198 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
199 when configured to do kernel mode PPPoE.
200 </p>
201
202 <p>
203 If you require it, don't forget to include support in the kernel for your
204 ethernet card.
205 </p>
206
207 <p>
208 If you have an Intel CPU that supports HyperThreading (tm), or you have a
209 multi-CPU system, you should activate "Symmetric multi-processing support":
210 </p>
211
212 <pre caption="Activating SMP support">
213 Processor type and features ---&gt;
214 [*] Symmetric multi-processing support
215 </pre>
216
217 <p>
218 If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
219 those as well:
220 </p>
221
222 <pre caption="Activating USB Support for Input Devices">
223 Device Drivers ---&gt;
224 [*] HID Devices ---&gt;
225 &lt;*&gt; USB Human Interface Device (full HID) support
226 </pre>
227
228 <p>
229 When you've finished configuring the kernel, continue with <uri
230 link="#compiling">Compiling and Installing</uri>.
231 </p>
232
233 </body>
234 </subsection>
235 <subsection id="compiling">
236 <title>Compiling and Installing</title>
237 <body>
238
239 <p>
240 Now that your kernel is configured, it is time to compile and install it. Exit
241 the configuration and start the compilation process:
242 </p>
243
244 <pre caption="Compiling the kernel">
245 # <i>make &amp;&amp; make modules_install</i>
246 </pre>
247
248 <p>
249 When the kernel has finished compiling, copy the kernel image to <path>/</path>.
250 Use whatever name you feel is appropriate for your kernel choice and remember it
251 as you will need it later on when you configure your bootloader. Remember to
252 replace <c>vmlinuz</c> with the name and version of your kernel.
253 </p>
254
255 <pre caption="Installing the kernel">
256 # <i>cp vmlinux.gz /boot/vmlinuz</i>
257 </pre>
258
259 </body>
260 </subsection>
261 <subsection id="initramfs">
262 <title>(Optional) Building an Initramfs</title>
263 <body>
264
265 <p>
266 If you use a specific partition layout where important file system locations
267 (like <path>/usr</path> or <path>/var</path>) are on separate partitions, then
268 you will need to setup an initramfs so that this partition can be mounted before
269 it is needed.
270 </p>
271
272 <p>
273 Without an initramfs, you risk that the system will not boot up properly as the
274 tools that are responsible for mounting the file systems need information that
275 resides on those file systems. An initramfs will pull in the necessary files
276 into an archive which is used right after the kernel boots, but before the
277 control is handed over to the <c>init</c> tool. Scripts on the initramfs will
278 then make sure that the partitions are properly mounted before the system
279 continues booting.
280 </p>
281
282 <p>
283 To install an initramfs, install <c>genkernel</c> first, then have it
284 generate an initramfs for you.
285 </p>
286
287 <pre caption="Building an initramfs">
288 # <i>emerge genkernel</i>
289 # <i>genkernel --bootdir=/. --no-mountboot --install initramfs</i>
290 </pre>
291
292 <p>
293 If you need specific support in the initramfs, such as lvm or raid, add in the
294 appropriate options to genkernel. See <c>genkernel --help</c> for more
295 information, or the next example which enables support for LVM and software raid
296 (mdadm):
297 </p>
298
299 <pre caption="Building an initramfs with support for LVM and software raid">
300 # <i>genkernel --bootdir=/. --no-mountboot --lvm --mdadm --install initramfs</i>
301 </pre>
302
303 <p>
304 The initramfs will be stored in <path>/</path>. You can find the file by simply
305 listing the files starting with <path>initramfs</path>:
306 </p>
307
308 <pre caption="Checking the initramfs file name">
309 # <i>ls /initramfs*</i>
310 </pre>
311
312 <p>
313 Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
314 </p>
315
316 </body>
317 </subsection>
318 </section>
319 <section id="genkernel">
320 <title>Alternative: Using genkernel</title>
321 <body>
322
323 <p>
324 If you are reading this section, you have chosen to use our <c>genkernel</c>
325 script to configure your kernel for you.
326 </p>
327
328 <p>
329 Now that your kernel source tree is installed, it's now time to compile your
330 kernel by using our <c>genkernel</c> script to automatically build a kernel for
331 you. <c>genkernel</c> works by configuring a kernel nearly identically to the
332 way our Installation CD kernel is configured. This means that when you use
333 <c>genkernel</c> to build your kernel, your system will generally detect all
334 your hardware at boot-time, just like our Installation CD does. Because
335 genkernel doesn't require any manual kernel configuration, it is an ideal
336 solution for those users who may not be comfortable compiling their own kernels.
337 </p>
338
339 <p>
340 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
341 </p>
342
343 <pre caption="Emerging genkernel">
344 # <i>emerge genkernel</i>
345 </pre>
346
347 <p>
348 Now, compile your kernel sources by running <c>genkernel</c>. Be aware
349 though, as <c>genkernel</c> compiles a kernel that supports almost all hardware,
350 this compilation will take quite a while to finish!
351 </p>
352
353 <note>
354 Users of LVM2 will probably want to add <c>--lvm</c> to the genkernel
355 command-line.
356 </note>
357
358 <pre caption="Running genkernel">
359 # <i>genkernel --bootdir=/. --no-mountboot all</i>
360 </pre>
361
362 <p>
363 Once <c>genkernel</c> completes, a kernel, full set of modules and
364 <e>initial ram disk</e> (initramfs) will be created. We will use the kernel
365 and initrd when configuring a boot loader later in this document. Write
366 down the names of the kernel and initrd as you will need it when writing
367 the bootloader configuration file. The initrd will be started immediately after
368 booting to perform hardware autodetection (just like on the Installation CD)
369 before your "real" system starts up.
370 </p>
371
372 <pre caption="Checking the created kernel image name and initrd">
373 # <i>ls /kernel* /initramfs*</i>
374 </pre>
375
376 </body>
377 </section>
378 <section id="kernel_modules">
379 <title>Kernel Modules</title>
380
381 <subsection>
382 <include href="hb-install-kernelmodules.xml"/>
383 </subsection>
384
385 </section>
386 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20