/[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.55 - (show annotations) (download) (as text)
Tue Dec 17 10:38:05 2013 UTC (4 years, 9 months ago) by swift
Branch: MAIN
Changes since 1.54: +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-alpha-kernel.xml,v 1.54 2013/04/06 08:24:16 swift Exp $ -->
8
9 <sections>
10
11 <version>18</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 alpha-based systems we have <c>gentoo-sources</c> (the default 2.6 kernel
30 source).
31 </p>
32
33 <pre caption="Installing a kernel source">
34 # <i>emerge gentoo-sources</i>
35 </pre>
36
37 <p>
38 When you take a look in <path>/usr/src</path> you should see a symlink called
39 <path>linux</path> pointing to your kernel source. In this case, the installed
40 kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
41 Your version may be different, so keep this in mind.
42 </p>
43
44 <pre caption="Viewing the kernel source symlink">
45 # <i>ls -l /usr/src/linux</i>
46 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
47 </pre>
48
49 <p>
50 Now it is time to configure and compile your kernel source. You can use
51 <c>genkernel</c> for this, which will build a generic kernel as used by the
52 Installation CD. We explain the "manual" configuration first though, as it is
53 the best way to optimize your environment.
54 </p>
55
56 <p>
57 If you want to manually configure your kernel, continue now with <uri
58 link="#manual">Default: Manual Configuration</uri>. If you want to use
59 <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
60 genkernel</uri> instead.
61 </p>
62
63 </body>
64 </subsection>
65 </section>
66 <section id="manual">
67 <title>Default: Manual Configuration</title>
68 <subsection>
69 <title>Introduction</title>
70 <body>
71
72 <p>
73 Manually configuring a kernel is often seen as the most difficult procedure a
74 Linux user ever has to perform. Nothing is less true -- after configuring a
75 couple of kernels you don't even remember that it was difficult ;)
76 </p>
77
78 <p>
79 However, one thing <e>is</e> true: you must know your system when you start
80 configuring a kernel manually. Most information can be gathered by emerging
81 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
82 be able to use <c>lspci</c> within the chrooted environment. You may safely
83 ignore any <e>pcilib</e> warnings (like pcilib: cannot open
84 /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
85 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
86 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
87 uses (it might provide you with a nice hint on what to enable).
88 </p>
89
90 <p>
91 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
92 will fire up an ncurses-based configuration menu.
93 </p>
94
95 <pre caption="Invoking menuconfig">
96 # <i>cd /usr/src/linux</i>
97 # <i>make menuconfig</i>
98 </pre>
99
100 <p>
101 You will be greeted with several configuration sections. We'll first list some
102 options you must activate (otherwise Gentoo will not function, or not function
103 properly without additional tweaks).
104 </p>
105
106 </body>
107 </subsection>
108 <subsection>
109 <title>Activating Required Options</title>
110 <body>
111
112 <p>
113 First go to <c>File Systems</c> and select support for the filesystems you use.
114 <e>Don't</e> compile the file system you use for the root filesystem as module,
115 otherwise your Gentoo system will not be able to mount your partition. Also
116 select <c>Virtual memory</c> and <c>/proc file system</c>.
117 </p>
118
119 <pre caption="Selecting necessary file systems">
120 File systems ---&gt;
121 Pseudo Filesystems ---&gt;
122 [*] /proc file system support
123 [*] Virtual memory file system support (former shm fs)
124
125 <comment>(Select one or more of the following options as needed by your system)</comment>
126 &lt;*&gt; Reiserfs support
127 &lt;*&gt; Ext3 journalling file system support
128 &lt;*&gt; JFS filesystem support
129 &lt;*&gt; Second extended fs support
130 &lt;*&gt; XFS filesystem support
131 </pre>
132
133 <p>
134 If you are using PPPoE to connect to the Internet or you are using a dial-up
135 modem, you will need the following options in the kernel:
136 </p>
137
138 <pre caption="Selecting PPPoE necessary drivers">
139 Device Drivers ---&gt;
140 Network device support ---&gt;
141 &lt;*&gt; PPP (point-to-point protocol) support
142 &lt;*&gt; PPP support for async serial ports
143 &lt;*&gt; PPP support for sync tty ports
144 </pre>
145
146 <p>
147 The two compression options won't harm but are not definitely needed, neither
148 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
149 when configured to do kernel mode PPPoE.
150 </p>
151
152 <p>
153 If you require it, don't forget to include support in the kernel for your
154 ethernet card.
155 </p>
156
157 <p>
158 The following options are recommended as well:
159 </p>
160
161 <pre caption="Recommended Alpha options">
162 General setup ---&gt;
163 &lt;*&gt; SRM environment through procfs
164 &lt;*&gt; Configure uac policy via sysctl
165
166 Plug and Play configuration ---&gt;
167 &lt;*&gt; Plug and Play support
168 &lt;M&gt; ISA Plug and Play support
169
170 SCSI support ---&gt;
171 SCSI low-level drivers ---&gt;
172 &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
173 &lt;*&gt; Qlogic ISP SCSI support
174
175 Network device support ---&gt;
176 Ethernet (10 or 100 Mbit) ---&gt;
177 &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
178 &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
179 &lt;M&gt; EtherExpressPro/100 support (eepro100)
180 &lt;M&gt; EtherExpressPro/100 support (e100)
181 Ethernet (1000 Mbit) ---&gt;
182 &lt;M&gt; Alteon AceNIC
183 [*] Omit support for old Tigon I
184 &lt;M&gt; Broadcom Tigon3
185 [*] FDDI driver support
186 &lt;M&gt; Digital DEFEA and DEFPA
187 &lt;*&gt; PPP support
188 &lt;*&gt; PPP Deflate compression
189
190 Character devices ---&gt;
191 [*] Support for console on serial port
192 [*] Direct Rendering Manager
193
194 File systems ---&gt;
195 &lt;*&gt; Kernel automounter version 4 support
196 Network File Systems ---&gt;
197 &lt;*&gt; NFS
198 [*] NFSv3 client
199 &lt;*&gt; NFS server
200 [*] NFSv3 server
201 Partition Types ---&gt;
202 [*] Advanced partition selection
203 [*] Alpha OSF partition support
204 Native Language Support
205 &lt;*&gt; NLS ISO 8859-1
206
207 Sound ---&gt;
208 &lt;M&gt; Sound card support
209 &lt;M&gt; OSS sound modules
210 [*] Verbose initialisation
211 [*] Persistent DMA buffers
212 &lt;M&gt; 100% Sound Blaster compatibles
213 </pre>
214
215 <p>
216 Next select <e>Maintain a devtmpfs file system to mount at /dev</e> so that
217 critical device files are already available early in the boot process.
218 </p>
219
220 <pre caption="Enabling devtmpfs support">
221 Device Drivers ---&gt;
222 Generic Driver Options ---&gt;
223 [*] Maintain a devtmpfs filesystem to mount at /dev
224 [ ] Automount devtmpfs at /dev, after the kernel mounted the rootfs
225 </pre>
226
227 <p>
228 When you've finished configuring the kernel, continue with <uri
229 link="#compiling">Compiling and Installing</uri>.
230 </p>
231
232 </body>
233 </subsection>
234 <subsection id="compiling">
235 <title>Compiling and Installing</title>
236 <body>
237
238 <p>
239 Now that your kernel is configured, it is time to compile and install it. Exit
240 the configuration and start the compilation process:
241 </p>
242
243 <pre caption="Compiling the kernel">
244 # <i>make &amp;&amp; make modules_install</i>
245 # <i>make boot</i>
246 </pre>
247
248 <p>
249 When the kernel has finished compiling, copy the kernel image to
250 <path>/boot</path>. Recent kernels might create <path>vmlinux</path> instead of
251 <path>vmlinux.gz</path>. Keep this in mind when you copy your kernel image.
252 </p>
253
254 <pre caption="Installing the kernel">
255 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
256 </pre>
257
258 </body>
259 </subsection>
260 <subsection>
261 <include href="hb-install-initramfs.xml"/>
262 </subsection>
263
264 </section>
265 <section id="genkernel">
266 <title>Alternative: Using genkernel</title>
267 <body>
268
269 <p>
270 If you are reading this section, you have chosen to use our <c>genkernel</c>
271 script to configure your kernel for you.
272 </p>
273
274 <p>
275 Now that your kernel source tree is installed, it's now time to compile your
276 kernel by using our <c>genkernel</c> script to automatically build a kernel for
277 you. <c>genkernel</c> works by configuring a kernel nearly identically to the
278 way our Installation CD kernel is configured. This means that when you use
279 <c>genkernel</c> to build your kernel, your system will generally detect all
280 your hardware at boot-time, just like our Installation CD does. Because
281 genkernel doesn't require any manual kernel configuration, it is an ideal
282 solution for those users who may not be comfortable compiling their own
283 kernels.
284 </p>
285
286 <p>
287 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
288 </p>
289
290 <pre caption="Emerging genkernel">
291 # <i>emerge genkernel</i>
292 </pre>
293
294 <p>
295 Now, compile your kernel sources by running <c>genkernel all</c>.
296 Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
297 hardware, this compilation will take quite a while to finish!
298 </p>
299
300 <p>
301 Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
302 need to manually configure your kernel using <c>genkernel --menuconfig all</c>
303 and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
304 module).
305 </p>
306
307 <pre caption="Running genkernel">
308 # <i>genkernel all</i>
309 </pre>
310
311 <p>
312 Once <c>genkernel</c> completes, a kernel, full set of modules and <e>initial
313 ram disk</e> (initramfs) will be created. We will use the kernel and initrd when
314 configuring a boot loader later in this document. Write down the names of the
315 kernel and initrd as you will need it when writing the bootloader configuration
316 file. The initrd will be started immediately after booting to perform hardware
317 autodetection (just like on the Installation CD) before your "real" system
318 starts up.
319 </p>
320
321 <pre caption="Checking the created kernel image name and initrd">
322 # <i>ls /boot/kernel* /boot/initramfs-*</i>
323 </pre>
324
325 </body>
326 </section>
327 <section id="kernel_modules">
328 <title>Kernel Modules</title>
329
330 <subsection>
331 <include href="hb-install-kernelmodules.xml"/>
332 </subsection>
333
334 </section>
335 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20