/[gentoo]/xml/htdocs/doc/en/genkernel.xml
Gentoo

Diff of /xml/htdocs/doc/en/genkernel.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 Revision 1.27
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.21 2005/07/31 18:13:14 alin Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.27 2007/05/18 15:01:48 rane Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/genkernel.xml"> 5<guide link="/doc/en/genkernel.xml">
6<title>Gentoo Linux Genkernel Guide</title> 6<title>Gentoo Linux Genkernel Guide</title>
7 7
19 Thomas Seiler 19 Thomas Seiler
20</author> 20</author>
21 21
22<abstract> 22<abstract>
23This guide intends to provide a reference of all the functions provided by 23This guide intends to provide a reference of all the functions provided by
24genkernel. 24genkernel.
25</abstract> 25</abstract>
26 26
27<license/> 27<license/>
28 28
29<version>1.4</version> 29<version>1.4.3</version>
30<date>2005-07-31</date> 30<date>2005-12-16</date>
31 31
32<chapter> 32<chapter>
33<title>Introduction</title> 33<title>Introduction</title>
34<section> 34<section>
35<title>Rationale</title> 35<title>Rationale</title>
46loaded for proper operation. 46loaded for proper operation.
47</p> 47</p>
48 48
49</body> 49</body>
50</section> 50</section>
51
52<section> 51<section>
53<title>Target Audience</title> 52<title>Target Audience</title>
54<body> 53<body>
55 54
56<p> 55<p>
75<title>Installing genkernel</title> 74<title>Installing genkernel</title>
76<body> 75<body>
77 76
78<p> 77<p>
79To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you 78To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you
80are using the 79are using the <uri
81<uri link="http://www.gentoo.org/doc/en/handbook/2005.0/hb-install-about.xml#doc_chap2_sect1"> 80link="/doc/en/handbook/2005.1/hb-install-about.xml#doc_chap2_sect1">Gentoo
82Gentoo Reference Platform</uri> (GRP), remember to install binary packages by 81Reference Platform</uri> (GRP), remember to install binary packages by passing
83passing the <c>-k</c> flag to emerge. Since the GRP is bundled with an older 82the <c>-k</c> flag to emerge. Since the GRP is bundled with an older version of
84version of genkernel, the flags may be different. In any case, consult 83genkernel, the flags may be different. In any case, consult <c>genkernel
85<c>genkernel --help</c> for help on how to use the version of genkernel 84--help</c> for help on how to use the version of genkernel installed on your
86installed on your system. 85system.
87</p> 86</p>
88 87
89</body> 88</body>
90</section> 89</section>
91</chapter> 90</chapter>
92 91
93<chapter> 92<chapter>
104and may increase compile time. Below is an illustration of a more efficient 103and may increase compile time. Below is an illustration of a more efficient
105approach, achieved by passing certain flags to genkernel as root: 104approach, achieved by passing certain flags to genkernel as root:
106</p> 105</p>
107 106
108<pre caption="Running genkernel (with flags)"> 107<pre caption="Running genkernel (with flags)">
109# genkernel --bootsplash --no-install --no-clean --menuconfig all 108# <i>genkernel --bootsplash --no-install --no-clean --menuconfig all</i>
110</pre> 109</pre>
111 110
112<p> 111<p>
113The above operation causes genkernel to create a bootsplash-enabled kernel 112The above operation causes genkernel to create a bootsplash-enabled kernel
114(<c>--bootsplash</c>) that will have to be manually installed 113(<c>--bootsplash</c>) that will have to be manually installed
144and their effects are enclosed within the square brackets, []. 143and their effects are enclosed within the square brackets, [].
145</p> 144</p>
146 145
147</body> 146</body>
148</section> 147</section>
149
150<section> 148<section>
151<title>Configuration Flags</title> 149<title>Configuration Flags</title>
152<body> 150<body>
153 151
154<p> 152<p>
157choose whether or not the configuration file created in the process should be 155choose whether or not the configuration file created in the process should be
158saved. The following are the primary configuration flags: 156saved. The following are the primary configuration flags:
159</p> 157</p>
160 158
161<ul> 159<ul>
162 <li> 160 <li>
163 <b>--<c>no-</c>menuconfig</b>: Activates <e>[or deactivates]</e> the 161 <b>--<c>no-</c>menuconfig</b>: Activates <e>[or deactivates]</e> the
164 <c>make menuconfig</c> command (which invokes an interactive, menu-based 162 <c>make menuconfig</c> command (which invokes an interactive, menu-based
165 kernel configuration utility), before building the kernel. 163 kernel configuration utility), before building the kernel.
166 </li> 164 </li>
167 <li> 165 <li>
168 <b>--gconfig</b>: Provides a kernel configuration utility which depends 166 <b>--gconfig</b>: Provides a kernel configuration utility which depends on
169 on the GTK+ libraries. The advantage of this option is that most users 167 the GTK+ libraries. The advantage of this option is that most users find it
170 find it easier and clearer to configure the kernel using this tool, since 168 easier and clearer to configure the kernel using this tool, since it relies
171 it relies on the X-windowing system. The disadvantage of this option is 169 on the X-windowing system. The disadvantage of this option is that you
172 that you <b>need</b> the X-windowing system to use it, so it will not 170 <b>need</b> the X-windowing system to use it, so it will not work on the
173 work on the command line. 171 command line.
174 </li> 172 </li>
175 <li> 173 <li>
176 <b>--xconfig</b>: Provides a kernel configuration utility which depends 174 <b>--xconfig</b>: Provides a kernel configuration utility which depends on
177 on the QT libraries. The advantage of this option is that most users find 175 the QT libraries. The advantage of this option is that most users find it
178 it easier and clearer to configure the kernel using this tool, since it 176 easier and clearer to configure the kernel using this tool, since it relies
179 relies on the X-windowing system. The disadvantage of this option is that 177 on the X-windowing system. The disadvantage of this option is that you
180 you <b>need</b> the X-windowing system to use it, so it will not work on 178 <b>need</b> the X-windowing system to use it, so it will not work on the
181 the command line. 179 command line.
182 </li> 180 </li>
183 <li> 181 <li>
184 <b>--<c>no-</c>save-config</b>: Saves [or does not save] the kernel 182 <b>--<c>no-</c>save-config</b>: Saves <e>[or does not save]</e> the kernel
185 configuration to a file in the <path>/etc/kernels/</path> directory for 183 configuration to a file in the <path>/etc/kernels/</path> directory for
186 later use. 184 later use.
187 </li> 185 </li>
188</ul> 186</ul>
189 187
190</body> 188</body>
191</section> 189</section>
192
193<section> 190<section>
194<title>Compilation Flags</title> 191<title>Compilation Flags</title>
195<body> 192<body>
196 193
197<p> 194<p>
198The following flags usually take effect during the actual compilation: 195The following flags usually take effect during the actual compilation:
199</p> 196</p>
200 197
201<ul> 198<ul>
202 <li> 199 <li>
203 <b>--kerneldir=<path>/path/to/sources/</path></b>: Specifies an 200 <b>--kerneldir=<path>/path/to/sources/</path></b>: Specifies an alternative
204 alternative kernel source location, rather than the default 201 kernel source location, rather than the default
205 <path>/usr/src/linux/</path> location. 202 <path>/usr/src/linux/</path> location.
206 </li> 203 </li>
207 <li> 204 <li>
208 <b>--kernel-config=<path>/path/to/config-file</path></b>: Specifies what 205 <b>--kernel-config=<path>/path/to/config-file</path></b>: Specifies what
209 alternative kernel configuration will be used, rather than the default 206 alternative kernel configuration will be used, rather than the default
210 <path>/path/to/sources/.config</path> file. 207 <path>/path/to/sources/.config</path> file.
211 </li> 208 </li>
212 <li> 209 <li>
213 <b>--module-prefix=<path>/path/to/prefix-directory/</path></b>: Specifies 210 <b>--module-prefix=<path>/path/to/prefix-directory/</path></b>: Specifies a
214 a prefix to the directory where kernel modules will be installed (default 211 prefix to the directory where kernel modules will be installed (default
215 path is the <path>/lib/modules/</path> directory.) 212 path is the <path>/lib/modules/</path> directory.)
216 </li> 213 </li>
217</ul> 214</ul>
218 215
219<ul> 216<ul>
220 <li> 217 <li>
221 <b>--<c>no-</c>clean</b>: Activates <e>[or deactivates]</e> the 218 <b>--<c>no-</c>clean</b>: Activates <e>[or deactivates]</e> the <c>make
222 <c>make clean</c> command before compiling your kernel. The 219 clean</c> command before compiling your kernel. The <c>make clean</c>
220 command removes all object files and dependencies from the kernel's source
221 tree.
222 </li>
223 <li>
224 <b>--<c>no-</c>mrproper</b>: Activates <e>[or deactivates]</e> the <c>make
225 mrproper</c> command before kernel compilation. Like the <c>make clean</c>
223 <c>make clean</c> command removes all object files and dependencies from 226 command, <c>make mrproper</c> removes all object files and dependencies
227 from the kernel's source tree. However, any previous configuration files
228 (in <path>/path/to/sources/.config</path> or
229 <path>/path/to/sources/.config.old</path>) will <b>also</b> be purged from
224 the kernel's source tree. 230 the kernel's source tree.
225 </li> 231 </li>
226 <li> 232 <li>
227 <b>--<c>no-</c>mrproper</b>: Activates <e>[or deactivates]</e> the
228 <c>make mrproper</c> command before kernel compilation. Like the
229 <c>make clean</c> command, <c>make mrproper</c> removes all object files
230 and dependencies from the kernel's source tree. However, any previous
231 configuration files (in <path>/path/to/sources/.config</path> or
232 <path>/path/to/sources/.config.old</path>) will <b>also</b> be purged
233 from the kernel's source tree.
234 </li>
235 <li>
236 <b>--oldconfig</b>: Issues the <c>make oldconfig</c> command, which 233 <b>--oldconfig</b>: Issues the <c>make oldconfig</c> command, which
237 attempts to collect configuration information for the system's 234 attempts to collect configuration information for the system's architecture
238 architecture from a generic script in <path>/usr/share/genkernel/</path>. 235 from a generic script in <path>/usr/share/genkernel/</path>. This is a
239 This is a non-interactive process; no user input is entertained. Also, if 236 non-interactive process; no user input is entertained. Also, if
240 <c>--oldconfig</c> is used in conjunction with <c>--clean</c>, the latter 237 <c>--oldconfig</c> is used in conjunction with <c>--clean</c>, the latter
241 flag is negated, resulting in the activation of the <c>--no-clean</c> 238 flag is negated, resulting in the activation of the <c>--no-clean</c> flag.
239 </li>
240</ul>
241
242<ul>
243 <li>
244 <b>--callback="<c>echo hello</c>"</b>: Calls the specified arguments
245 (<c>echo hello</c>, in this case) after the kernel and the relevant modules
246 have been built, but before building the initrd image. This may be useful
247 if you want to install external modules in the initrd image by emerging the
248 relevant item(s) with the callback feature, and then redefining a genkernel
249 module group.
250 </li>
251</ul>
252
253<ul>
254 <li>
255 <b>--<c>no-</c>install</b>: Activates <e>[or deactivates]</e> the <c>make
256 install</c> command, which installs your new kernel image, configuration
257 file, initrd image and system map onto your mounted boot partition. Any
258 compiled modules will be installed as well.
259 </li>
260 <li>
261 <b>--<c>no-</c>initrdmodules</b>: Refrains from copying any modules to the
262 genkernel-created initrd image. This flag is an exception to the rule about
263 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel
242 flag. 264 flag.
243 </li> 265 </li>
244</ul>
245
246<ul>
247 <li> 266 <li>
248 <b>--callback="<c>echo hello</c>"</b>: Calls the specified arguments
249 (<c>echo hello</c>, in this case) after the kernel and the relevant
250 modules have been built, but before building the initrd image. This may
251 be useful if you want to install external modules in the initrd image by
252 emerging the relevant item(s) with the callback feature, and then
253 redefining a genkernel module group.
254 </li>
255</ul>
256
257<ul>
258 <li>
259 <b>--<c>no-</c>install</b>: Activates <e>[or deactivates]</e> the
260 <c>make install</c> command, which installs your new kernel image,
261 configuration file, initrd image and system map onto your mounted boot
262 partition. Any compiled modules will be installed as well.
263 </li>
264 <li>
265 <b>--<c>no-</c>initrdmodules</b>: Refrains from copying any modules to
266 the genkernel-created initrd image. This flag is an exception to the rule
267 about the <c>no-</c> prefix; omission of this prefix creates an invalid
268 genkernel flag.
269 </li>
270 <li>
271 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image. 267 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image.
272 (This hack currently applies only to PPC Pegasos systems.) 268 (This hack currently applies only to PPC Pegasos systems.)
273 </li> 269 </li>
274</ul> 270</ul>
275 271
276</body> 272</body>
277</section> 273</section>
278
279<section> 274<section>
280<title>Compiler Flags</title> 275<title>Compiler Flags</title>
281<body> 276<body>
282 277
283<p> 278<p>
286<e>compiler</e> used for the kernel compilation process, albeit at a much lower 281<e>compiler</e> used for the kernel compilation process, albeit at a much lower
287level. 282level.
288</p> 283</p>
289 284
290<ul> 285<ul>
291 <li> 286 <li>
292 <b>--kernel-cc=<c>someCompiler</c></b>: Specifies the compiler employed 287 <b>--kernel-cc=<c>someCompiler</c></b>: Specifies the compiler employed
293 during the kernel compilation process. 288 during the kernel compilation process.
294 </li> 289 </li>
295 <li> 290 <li>
296 <b>--kernel-ld=<c>someLinker</c></b>: Specifies the linker employed 291 <b>--kernel-ld=<c>someLinker</c></b>: Specifies the linker employed during
297 during the kernel compilation process. 292 the kernel compilation process.
298 </li> 293 </li>
299 <li> 294 <li>
300 <b>--kernel-as=<c>someAssembler</c></b>: Specifies the assembler employed 295 <b>--kernel-as=<c>someAssembler</c></b>: Specifies the assembler employed
301 during the kernel compilation process. 296 during the kernel compilation process.
302 </li> 297 </li>
303 <li> 298 <li>
304 <b>--kernel-make=<c>someMake</c></b>: Specifies an alternative to the 299 <b>--kernel-make=<c>someMake</c></b>: Specifies an alternative to the
305 <e>GNU make</e> utility employed during the kernel compilation process. 300 <e>GNU make</e> utility employed during the kernel compilation process.
306 </li> 301 </li>
307</ul>
308
309<ul> 302</ul>
303
304<ul>
310 <li> 305 <li>
311 <b>--utils-cc=<c>someCompiler</c></b>: Specifies the compiler employed 306 <b>--utils-cc=<c>someCompiler</c></b>: Specifies the compiler employed
312 during the compilation of support utilities. 307 during the compilation of support utilities.
313 </li> 308 </li>
314 <li> 309 <li>
315 <b>--utils-ld=<c>someLinker</c></b>: Specifies the linker employed during 310 <b>--utils-ld=<c>someLinker</c></b>: Specifies the linker employed during
316 the compilation of support utilities. 311 the compilation of support utilities.
317 </li> 312 </li>
318 <li> 313 <li>
319 <b>--utils-as=<c>someAssembler</c></b>: Specifies the assembler employed 314 <b>--utils-as=<c>someAssembler</c></b>: Specifies the assembler employed
320 during the compilation of support utilities. 315 during the compilation of support utilities.
321 </li> 316 </li>
322 <li> 317 <li>
323 <b>--utils-make=<c>someMake</c></b>: Specifies an alternative to the 318 <b>--utils-make=<c>someMake</c></b>: Specifies an alternative to the <e>GNU
324 <e>GNU make</e> utility employed during the compilation of support 319 make</e> utility employed during the compilation of support utilities.
325 utilities.
326 </li> 320 </li>
327</ul>
328
329<ul> 321</ul>
322
323<ul>
330 <li> 324 <li>
331 <b>--makeopts=<c>-jX</c></b>: Specifies the number of concurrent threads 325 <b>--makeopts=<c>-jX</c></b>: Specifies the number of concurrent threads
332 that the make utility can implement while the kernel (and utilities) are 326 that the make utility can implement while the kernel (and utilities) are
333 being compiled. The variable <b>'X'</b> is a number obtained by adding 327 being compiled. The variable <b>'X'</b> is a number obtained by adding one
334 one (1) to the number of CPUs used by the system. So, for a system with 328 (1) to the number of CPUs used by the system. So, for a system with one
335 one CPU, the appropriate flag is <c>-j2</c>; a system with two CPUs will 329 CPU, the appropriate flag is <c>-j2</c>; a system with two CPUs will use
336 use the <c>-j3</c> flag, and so on. <e>(A system with one processor that 330 the <c>-j3</c> flag, and so on. <e>(A system with one processor that
337 supports Hyper-Threading&#8482; (HT) Technology can use the</e><c>-j3</c> 331 supports Hyper-Threading&trade; (HT) Technology can use the
338 <e>flag, provided Symmetric Multi-Processing (SMP) support is enabled in 332 </e><c>-j3</c><e> flag, provided Symmetric Multi-Processing (SMP) support is
339 the kernel.)</e> 333 enabled in the kernel.)</e>
340 </li> 334 </li>
341</ul> 335</ul>
342 336
343</body> 337</body>
344</section> 338</section>
345
346<section> 339<section>
347<title>Debugging Flags</title> 340<title>Debugging Flags</title>
348<body> 341<body>
349 342
350<p> 343<p>
351The use debugging flags during the kernel compilation process controls the 344The use of debugging flags during the kernel compilation process controls the
352amount of information reported, as well as the presentation of said data. 345amount of information reported, as well as the presentation of said data.
353</p> 346</p>
354 347
355<ul> 348<ul>
356 <li> 349 <li>
357 <b>--debuglevel=<c>verblevel</c></b>: Controls the level of 350 <b>--debuglevel=<c>verblevel</c></b>: Controls the level of verbosity for
358 verbosity for information provided by genkernel. The variable 351 information provided by genkernel. The variable <c>verblevel</c> is an
359 <c>verblevel</c> is an integer between 0 and 5. The level '0' represents 352 integer between 0 and 5. The level '0' represents minimal output, while '5'
360 minimal output, while '5' provides as much information as possible about 353 provides as much information as possible about genkernel's activities
361 genkernel's activities during the kernel compilation process. 354 during the kernel compilation process.
362 </li> 355 </li>
363 <li> 356 <li>
364 <b>--debugfile=<path>/path/to/outputfile</path></b>: Ignores the value 357 <b>--debugfile=<path>/path/to/outputfile</path></b>: Ignores the value set
365 set by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging 358 by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging data
366 data produced by genkernel to the specified output file, which is located 359 produced by genkernel to the specified output file, which is located at
367 at <path>/var/log/genkernel.log</path> by default. 360 <path>/var/log/genkernel.log</path> by default.
368 </li> 361 </li>
369 <li> 362 <li>
370 <b>--no-color</b>: Activates [or deactivates] colored output of debugging 363 <b>--no-color</b>: Activates <e>[or deactivates]</e> colored output of
371 information (reported by genkernel) using escape sequences. 364 debugging information (reported by genkernel) using escape sequences.
372 </li> 365 </li>
373</ul> 366</ul>
374 367
375</body> 368</body>
376</section> 369</section>
377 370
384of these flags are primarily for aesthetics, while others may be essential for 377of these flags are primarily for aesthetics, while others may be essential for
385enabling certain features on the system. 378enabling certain features on the system.
386</p> 379</p>
387 380
388<ul> 381<ul>
389 <li> 382 <li>
390 <b>--<c>no-</c>bootsplash</b>: Activates <e>[or deactivates]</e> support 383 <b>--<c>no-</c>bootsplash</b>: Activates <e>[or deactivates]</e> support
391 for <uri link="http://www.bootsplash.org/">bootsplash</uri> in the 384 for <uri link="http://www.bootsplash.org/">bootsplash</uri> in the
392 genkernel-built initrd image. The bootsplash feature is supported on a 385 genkernel-built initrd image. The bootsplash feature is supported on a
393 limited number of architectures, and a kernel that supports bootsplash 386 limited number of architectures, and a kernel that supports bootsplash is
394 is also required. 387 also required.
395 </li> 388 </li>
396 <li> 389 <li>
397 <b>--<c>no-</c>gensplash</b>: Activates <e>[or deactivates]</e> support 390 <b>--<c>no-</c>gensplash</b>: Activates <e>[or deactivates]</e> support for
391 <uri
398 for <uri link="http://dev.gentoo.org/~spock/projects/gensplash/">gensplash</uri> 392 link="http://dev.gentoo.org/~spock/projects/gensplash/">gensplash</uri>
399 support in the genkernel-built initrd image. The gensplash utility is 393 support in the genkernel-built initrd image. The gensplash utility is
400 intended to be a replacement for bootsplash, and is designed for use with 394 intended to be a replacement for bootsplash, and is designed for use with
401 2.6.x series kernels. To override the default theme used by gensplash, 395 2.6.x series kernels. To override the default theme used by gensplash, use
402 use <b>--gensplash=<c>PreferredTheme</c></b> (where <c>PreferredTheme</c> 396 <b>--gensplash=<c>PreferredTheme</c></b> (where <c>PreferredTheme</c> is
403 is the title of one of the directories inside the 397 the title of one of the directories inside the <path>/etc/splash/</path>
404 <path>/etc/splash/</path> directory. 398 directory.
405 </li> 399 </li>
406 <li> 400 <li>
407 <b>--gensplash-res=<c>PreferredResolution</c></b>: This flag allows you 401 <b>--gensplash-res=<c>PreferredResolution</c></b>: This flag allows you to
408 to select which splash screen resolutions will be supported in the initrd 402 select which splash screen resolutions will be supported in the initrd
409 during the start-up of the system. This is useful for two reasons: First, 403 during the start-up of the system. This is useful for two reasons: First,
410 you are able to select only the splash screen resolution(s) relevant to 404 you are able to select only the splash screen resolution(s) relevant to
411 your system. Second, you avoid the unnecessary increase in the disk space 405 your system. Second, you avoid the unnecessary increase in the disk space
412 required by initrd (since the initrd does not have to support resolutions 406 required by initrd (since the initrd does not have to support resolutions
413 that are irrelevant for your system configuration.) However, you may want 407 that are irrelevant for your system configuration.) However, you may want
414 to omit this flag if the kernel is being compiled for an Installation CD; 408 to omit this flag if the kernel is being compiled for an Installation CD;
415 this allows gensplash support for all possible resolutions. 409 this allows gensplash support for all possible resolutions.
416 </li> 410 </li>
417 <li> 411 <li>
418 <b>--do-keymap-auto</b>: Force keymap selection during the boot 412 <b>--do-keymap-auto</b>: Force keymap selection during the boot sequence.
419 sequence.
420 </li> 413 </li>
421 <li> 414 <li>
422 <b>--lvm2</b>: Includes support for storage using via <uri 415 <b>--lvm2</b>: Includes support for storage using via <uri
423 link="http://sources.redhat.com/lvm2/">Logical Volume Management</uri> 416 link="http://sources.redhat.com/lvm2/">Logical Volume Management</uri>
424 (LVM2) from <e>static</e> binaries, if available to the system. Relevant 417 (LVM2) from <e>static</e> binaries, if available to the system. Relevant
425 (static) LVM2 binaries are compiled if they are unavailable. Be sure to 418 (static) LVM2 binaries are compiled if they are unavailable. Be sure to
426 install the lvm2 package on your system with <c>emerge lvm2</c> before 419 install the lvm2 package on your system with <c>emerge lvm2</c> before
427 enabling this flag, and review the <uri 420 enabling this flag, and review the <uri link="/doc/en/lvm2.xml">Gentoo LVM2
428 link="http://www.gentoo.org/doc/en/lvm2.xml">Gentoo LVM2
429 Installation</uri> guide. 421 Installation</uri> guide.
430 </li> 422 </li>
431 <li> 423 <li>
432 <b>--evms2</b>: Includes support for storage using the <uri 424 <b>--evms2</b>: Includes support for storage using the <uri
433 link="http://evms.sourceforge.net/">Enterprise Volume Management 425 link="http://evms.sourceforge.net/">Enterprise Volume Management
434 System</uri> (EVMS2), if available. Be sure to install the evms package 426 System</uri> (EVMS2), if available. Be sure to install the evms package on
435 on your system with <c>USE=static emerge evms2</c> before using this 427 your system with <c>USE=static emerge evms2</c> before using this
436 (genkernel) flag. <e>(Omitting the </e><c>USE=static</c> <e>flag during 428 (genkernel) flag. <e>(Omitting the </e><c>USE=static</c><e> flag during
437 package installation will fail to include the necessary static binaries.) 429 package installation will fail to include the necessary static
438 </e> 430 binaries.)</e>
439 </li> 431 </li>
440 <li> 432 <li>
441 <b>--dmraid</b>: Includes support for <uri 433 <b>--dmraid</b>: Includes support for <uri
442 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; 434 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; the
443 the utility which creates RAID mappings using the kernel device-mapper 435 utility which creates RAID mappings using the kernel device-mapper
444 subsystem. DMRAID discovers, activates, deactivates and displays 436 subsystem. DMRAID discovers, activates, deactivates and displays properties
445 properties of software RAID sets (ATARAID, for example) and contained 437 of software RAID sets (ATARAID, for example) and contained DOS partitions.
446 DOS partitions.
447 </li> 438 </li>
448 <li> 439 <li>
449 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created 440 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created
450 <e>linuxrc</e> &#8212; a script that is initialized during the start-up 441 <e>linuxrc</e> &mdash; a script that is initialized during the start-up
451 stage of the kernel, prior to the actual boot process. (A default linuxrc 442 stage of the kernel, prior to the actual boot process. (A default linuxrc
452 script should be in the <path>/usr/share/genkernel/</path> directory.) 443 script should be in the <path>/usr/share/genkernel/</path> directory.) This
453 This script allows you to boot into a small, modularized kernel and load 444 script allows you to boot into a small, modularized kernel and load the
454 the drivers that are needed (as modules) by the system. 445 drivers that are needed (as modules) by the system.
455 </li> 446 </li>
456 <li> 447 <li>
457 <b>--cachedir=/path/to/alt/dir/</b>: Overrides the default cache location 448 <b>--cachedir=/path/to/alt/dir/</b>: Overrides the default cache location
458 used while compiling the kernel. 449 used while compiling the kernel.
459 </li> 450 </li>
460 <li> 451 <li>
461 <b>--tempdir=/path/to/new/tempdir/</b>: Specifies the location of the 452 <b>--tempdir=/path/to/new/tempdir/</b>: Specifies the location of the
462 temporary directory used by genkernel while compiling the kernel. 453 temporary directory used by genkernel while compiling the kernel.
463 </li> 454 </li>
464 <li> 455 <li>
465 <b>--unionfs</b>: Includes support for the <uri 456 <b>--unionfs</b>: Includes support for the <uri
466 link="http://www.fsl.cs.sunysb.edu/project-unionfs.html">Unification File 457 link="http://www.fsl.cs.sunysb.edu/project-unionfs.html">Unification File
467 System</uri> in the initrd image. 458 System</uri> in the initrd image.
468 </li> 459 </li>
469</ul> 460</ul>
470 461
471</body> 462</body>
472</section> 463</section>
473
474<section> 464<section>
475<title>Miscellaneous Flags</title> 465<title>Miscellaneous Flags</title>
476<body> 466<body>
477 467
478<p> 468<p>
479The assortment of flags listed below are supported by genkernel, but do not fit 469The assortment of flags listed below are supported by genkernel, but do not fit
480neatly into any of the other categories: 470neatly into any of the other categories:
481</p> 471</p>
482 472
483<ul> 473<ul>
484 <li> 474 <li>
485 <b>--mountboot</b>: Detects whether or not the <path>/boot/</path> 475 <b>--mountboot</b>: Detects whether or not the <path>/boot/</path>
486 directory needs to be mounted on a separate partition. It will check 476 directory needs to be mounted on a separate partition. It will check
487 <path>/etc/fstab</path> script for instructions on how to mount the boot 477 <path>/etc/fstab</path> script for instructions on how to mount the boot
488 partition on a file system (if needed). 478 partition on a file system (if needed).
489 </li> 479 </li>
490 <li> 480 <li>
491 <b>--kernname=<c>NickName</c></b>: Allows you to modify the name of the 481 <b>--kernname=<c>NickName</c></b>: Allows you to modify the name of the
492 kernel and initrd images in the <path>/boot/</path> directory, so that 482 kernel and initrd images in the <path>/boot/</path> directory, so that the
493 the images produced are kernel-<c>NickName</c>-version and 483 images produced are kernel-<c>NickName</c>-version and
494 initramfs-<c>NickName</c>-version. 484 initramfs-<c>NickName</c>-version.
495 </li> 485 </li>
496</ul> 486</ul>
497 487
498</body> 488</body>
499</section> 489</section>
500
501
502<section> 490<section>
503<title>Possible Actions</title> 491<title>Possible Actions</title>
504<body> 492<body>
505 493
506<p> 494<p>
507An action tells genkernel what to build. Currently, the following actions are 495An action tells genkernel what to build. Currently, the following actions are
508supported: 496supported:
509</p> 497</p>
510 498
511<ul> 499<ul>
512 <li><c>initrd</c>: Only builds the initrd image</li> 500 <li><c>initrd</c>: Only builds the initrd image</li>
513 <li><c>bzImage</c>: Only builds the kernel image</li> 501 <li><c>bzImage</c>: Only builds the kernel image</li>
514 <li><c>kernel</c>: Only builds the kernel image and modules</li> 502 <li><c>kernel</c>: Only builds the kernel image and modules</li>
503 <li>
515 <li><c>all</c>: Builds all stages &#8212; the initrd, kernel image and 504 <c>all</c>: Builds all stages &mdash; the initrd, kernel image and modules.
516 modules.</li> 505 </li>
517</ul> 506</ul>
518 507
519<p> 508<p>
520The last action, <c>all</c>, is recommended for most users since it builds the 509The last action, <c>all</c>, is recommended for most users since it builds the
521stages required for a functional kernel. Remember, an <e>action</e> simply 510stages required for a functional kernel. Remember, an <e>action</e> simply
522tells genkernel what to <e>build</e>, not <e>install</e>. 511tells genkernel what to <e>build</e>, not <e>install</e>.
523</p> 512</p>
524 513
525</body> 514</body>
526</section> 515</section>
527
528
529<section> 516<section>
530<title>Bootloader Configuration</title> 517<title>Bootloader Configuration</title>
531<body> 518<body>
532 519
533<p> 520<p>
534To set up genkernel to work with your bootloader, three or four changes should 521To set up genkernel to work with your bootloader, three or four changes should
535be applied to the bootloader's configuration file: 522be applied to the bootloader's configuration file:
536</p> 523</p>
537 524
538<ol> 525<ol>
539 <li> 526 <li>
540 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the kernel 527 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the kernel parameters
541 parameters passed to the kernel image. 528 passed to the kernel image.
542 </li> 529 </li>
543 <li> 530 <li>
544 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters 531 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters
545 passed to the kernel image, if <path>/dev/hda3</path> contains your root 532 passed to the kernel image, if <path>/dev/hda3</path> contains your root
546 partition. 533 partition.
547 </li> 534 </li>
548 <li> 535 <li>
549 If you are using bootsplash, add a suitable mode line such as 536 If you are using bootsplash, add a suitable mode line such as
550 <c>vga=0x317</c> to the parameters passed to the kernel and also add 537 <c>vga=0x317</c> to the parameters passed to the kernel and also add
551 <c>splash=verbose</c> or <c>splash=silent</c> depending on the 538 <c>splash=verbose</c> or <c>splash=silent</c> depending on the verboseness
552 verboseness you require from your bootloader. 539 you require from your bootloader.
553 </li> 540 </li>
554 <li> 541 <li>
555 Add the initrd information as required by the bootloader. Consult the 542 Add the initrd information as required by the bootloader. Consult the <uri
556 <uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10"> 543 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Bootloader
557 Bootloader Configuration Chapter</uri> of the Gentoo Handbook for details 544 Configuration Chapter</uri> of the Gentoo Handbook for details on how to
558 on how to make your bootloader initrd-aware. 545 make your bootloader initrd-aware.
559 </li> 546 </li>
560</ol> 547</ol>
561 548
562</body> 549</body>
563</section> 550</section>
564
565</chapter> 551</chapter>
566 552
567<chapter> 553<chapter>
568<title>Configuration Options</title> 554<title>Configuration Options</title>
569
570<section> 555<section>
571<title>Editing /etc/genkernel.conf</title> 556<title>Editing /etc/genkernel.conf</title>
572<body> 557<body>
573 558
574<p> 559<p>
575Passing flags to genkernel from the command line can be cumbersome, especially 560Passing flags to genkernel from the command line can be cumbersome, especially
576if you have about a dozen flags: 561if you have about a dozen flags:
577</p> 562</p>
578 563
579<pre caption="Running genkernel (overloaded with flags)"> 564<pre caption="Running genkernel (overloaded with flags)">
580# genkernel --debuglevel=5 --no-color --no-mrproper --clean --gensplash\ 565# <i>genkernel --debuglevel=5 --no-color --no-mrproper --clean --gensplash \
581--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig --udev\ 566--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig \
582--kernel-config=/path/to/preferred/configfile --save-config --mountboot all 567--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i>
583</pre> 568</pre>
584 569
570<p>
585<p>Fortunately, there is a configuration file where most of the basic options 571Fortunately, there is a configuration file where most of the basic options can
586can be set (or changed) as necessary. What follows is a rundown of the more 572be set (or changed) as necessary. What follows is a rundown of the more
587relevant options: 573relevant options:
588</p> 574</p>
589 575
590<ul> 576<ul>
591 <li> 577 <li>
592 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the 578 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the
593 <c>--menuconfig</c> flag used by genkernel, which in turn uses the 579 <c>--menuconfig</c> flag used by genkernel, which in turn uses the <c>make
594 <c>make menuconfig</c> command to invoke a command-line based kernel 580 menuconfig</c> command to invoke a command-line based kernel configuration
595 configuration utility. To invoke the utility automatically during kernel 581 utility. To invoke the utility automatically during kernel configuration
596 configuration via this script, set this option to 'yes' here; otherwise, 582 via this script, set this option to 'yes' here; otherwise, choose 'no'.
597 choose 'no'.
598 </li> 583 </li>
599 <li> 584 <li>
600 <b>CLEAN=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent 585 <b>CLEAN=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent to
601 to the <c>--clean</c> flag used by genkernel, and invokes the 586 the <c>--clean</c> flag used by genkernel, and invokes the <c>make
602 <c>make clean</c> command to remove all object files and dependencies 587 clean</c> command to remove all object files and dependencies from the
603 from the kernel's source tree. Setting this option to 'no' creates a 588 kernel's source tree. Setting this option to 'no' creates a cascade effect
604 cascade effect &#8212; it is equivalent to genkernel's <c>--no-clean</c> 589 &#8212; it is equivalent to genkernel's <c>--no-clean</c> flag, which
605 flag, which disables the <c>make clean</c> command and implies 590 disables the <c>make clean</c> command and implies genkernel's
606 genkernel's <c>--no-mrproper</c> flag &#8212; essentially nullifying the 591 <c>--no-mrproper</c> flag &mdash; essentially nullifying the <c>make
607 <c>make mrproper</c> command. 592 mrproper</c> command.
608 </li> 593 </li>
609 <li> 594 <li>
610 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is 595 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
611 equivalent to <c>--mrproper</c> flag used by genkernel, and invokes the 596 to <c>--mrproper</c> flag used by genkernel, and invokes the <c>make
612 <c>make mrproper</c> command, which purges the kernel source tree of any 597 mrproper</c> command, which purges the kernel source tree of any
613 configuration files. Selecting 'no' here is equivalent to genkernel's 598 configuration files. Selecting 'no' here is equivalent to genkernel's
614 <c>--no-mrproper</c> flag, which disables the <c>make mrproper</c> 599 <c>--no-mrproper</c> flag, which disables the <c>make mrproper</c> command.
615 command.
616 </li> 600 </li>
617 <li> 601 <li>
618 <b>MOUNTBOOT=<c>[yes|no]</c></b>: Setting this option to 'yes' is 602 <b>MOUNTBOOT=<c>[yes|no]</c></b>: Setting this option to 'yes' is
619 equivalent to the <c>--mountboot</c> flag, and automatically mounts the 603 equivalent to the <c>--mountboot</c> flag, and automatically mounts the
620 <path>/boot/</path> directory (if needed) at compile time. If the 604 <path>/boot/</path> directory (if needed) at compile time. If the
621 <path>/boot/</path> directory is on a separate partition, consider 605 <path>/boot/</path> directory is on a separate partition, consider enabling
622 enabling this option; it will make for one less (essential) step to 606 this option; it will make for one less (essential) step to remember later.
623 remember later.
624 </li> 607 </li>
625 <li> 608 <li>
626 <b>SAVE_CONFIG=<c>[yes|no]</c></b>: After configuring the kernel, the 609 <b>SAVE_CONFIG=<c>[yes|no]</c></b>: After configuring the kernel, the
627 selected options are stored as <path>.config</path> in the kernel source 610 selected options are stored as <path>.config</path> in the kernel source
628 tree. This script may be overwritten during the next kernel compilation, 611 tree. This script may be overwritten during the next kernel compilation, or
629 or even purged from the kernel source tree. Choosing 'yes' here is 612 even purged from the kernel source tree. Choosing 'yes' here is equivalent
630 equivalent to the <c>--save-config</c> flag, and stores all options 613 to the <c>--save-config</c> flag, and stores all options selected during
631 selected during kernel configuration as a script in the 614 kernel configuration as a script in the <path>/etc/kernels/</path>
632 <path>/etc/kernels/</path> directory. Choosing 'no' preserves the 615 directory. Choosing 'no' preserves the <e>status quo</e>.
633 <e>status quo</e>.
634 </li> 616 </li>
635 <li> 617 <li>
636 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is 618 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
637 equivalent to the <c>--color</c> flag, which colors genkernel's output 619 to the <c>--color</c> flag, which colors genkernel's output to ease
638 to ease debugging (when needed.) 620 debugging (when needed.)
639 </li> 621 </li>
640 <li> 622 <li>
641 <b>DEBUGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the 623 <b>DEBUGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the
642 verbosity of the output produced by genkernel &#8212; setting this option 624 verbosity of the output produced by genkernel &mdash; setting this option to
643 to '0' with <c>--debuglevel=0</c> will suppress all output produced by 625 '0' with <c>--debuglevel=0</c> will suppress all output produced by
644 genkernel; setting this option to '5' with <c>--debuglevel=5</c> 626 genkernel; setting this option to '5' with <c>--debuglevel=5</c> provides
645 provides the user with all output produced by genkernel. 627 the user with all output produced by genkernel.
646 </li> 628 </li>
647</ul> 629</ul>
648 630
649<p> 631<p>
650By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you 632By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you
651can halve the number of flags passed to genkernel from the command line: 633can halve the number of flags passed to genkernel from the command line:
652</p> 634</p>
653 635
654<pre caption="Running genkernel (with flags), after employing genkernel.conf"> 636<pre caption="Running genkernel (with flags), after employing genkernel.conf">
655# genkernel --gensplash --kerneldir=/path/to/alternate/kernel/sources --udev\ 637# <i>genkernel --gensplash --kerneldir=/path/to/alternate/kernel/sources \
656--kernel-config=/path/to/preferred/configfile --install all 638--kernel-config=/path/to/preferred/configfile --install all</i>
657</pre> 639</pre>
658 640
659<p> 641<p>
660Identical results are obtained from both approaches, but the latter has most of 642Identical results are obtained from both approaches, but the latter has most of
661the options stored in a script that can be modified at a later date. 643the options stored in a script that can be modified at a later date.
662</p> 644</p>
663 645
664</body> 646</body>
665</section> 647</section>
666
667</chapter> 648</chapter>
668 649
669<chapter> 650<chapter>
670<title>Network-Booting with genkernel</title> 651<title>Network-Booting with genkernel</title>
671
672<section> 652<section>
673<title>Network Booting from an Installation CD</title> 653<title>Network Booting from an Installation CD</title>
674<body> 654<body>
675 655
676<p> 656<p>
677The genkernel utility can build kernel and initrd images that provide support 657The genkernel utility can build kernel and initrd images that provide support
678for network booting, or <e>netboot</e>ing . With any luck, you should be able 658for network booting, or <e>netboot</e>ing. With any luck, you should be able
679to netboot any recent computer into the environment provided by the 659to netboot any recent computer into the environment provided by the
680Installation CD. 660Installation CD.
681</p> 661</p>
682 662
683<p> 663<p>
686Installation CD can take over, as if the CD was present locally. 666Installation CD can take over, as if the CD was present locally.
687</p> 667</p>
688 668
689</body> 669</body>
690</section> 670</section>
691
692<section> 671<section>
693<title>Building Kernel and Initrd Images with Support for Netbooting</title> 672<title>Building Kernel and Initrd Images with Support for Netbooting</title>
694<body> 673<body>
695 674
696<p> 675<p>
710</p> 689</p>
711 690
712<pre caption="Configuring a 2.6.x series kernel to support your NIC driver"> 691<pre caption="Configuring a 2.6.x series kernel to support your NIC driver">
713Device Drivers ---> 692Device Drivers --->
714 Networking Support ---> 693 Networking Support --->
715 Ethernet (10 or 100Mbit) ---> 694 Ethernet (10 or 100Mbit) --->
716 [*] Ethernet (10 or 100Mbit) 695 [*] Ethernet (10 or 100Mbit)
717 &lt;*&gt; the driver for your network card 696 &lt;*&gt; the driver for your network card
718<comment>(Be sure to select &lt;*&gt; and not &lt;M&gt;)</comment> 697<comment>(Be sure to select &lt;*&gt; and not &lt;M&gt;)</comment>
719</pre> 698</pre>
720 699
721<p> 700<p>
722Secondly, we suggest that you enable <c>IP: kernel level 701Secondly, we suggest that you enable <c>IP: kernel level autoconfiguration</c>
723autoconfiguration</c> and the <c>IP: DHCP support</c> options. This avoids an 702and the <c>IP: DHCP support</c> options. This avoids an unnecessary layer of
724unnecessary layer of complexity since the IP address and the NFS path to the 703complexity since the IP address and the NFS path to the Installation CD can be
725Installation CD can be configured on a DHCP server. Of course, this means the 704configured on a DHCP server. Of course, this means the kernel command line
726kernel command line will remain constant for any machine &#8212; which is very 705will remain constant for any machine &mdash; which is very important for
727important for <e>etherbooting</e>. 706<e>etherbooting</e>.
728</p> 707</p>
729 708
730<pre caption="Configuring a 2.6.x series kernel to support DHCP"> 709<pre caption="Configuring a 2.6.x series kernel to support DHCP">
731Device Drivers ---> 710Device Drivers --->
732 Networking Support ---> 711 Networking Support --->
733 Networking options 712 Networking options
734 [*] TCP/IP networking---> 713 [*] TCP/IP networking--->
735 [*] IP: kernel level autoconfiguration 714 [*] IP: kernel level autoconfiguration
736 [*] IP: DHCP support 715 [*] IP: DHCP support
737<comment>(These options tell the kernel to send a DHCP request at bootup.)</comment> 716<comment>(These options tell the kernel to send a DHCP request at bootup.)</comment>
738</pre> 717</pre>
743generic kernel source tree. To enable SquashFS, apply the necessary patches to 722generic kernel source tree. To enable SquashFS, apply the necessary patches to
744the generic kernel source or install <c>gentoo-sources</c>. 723the generic kernel source or install <c>gentoo-sources</c>.
745</p> 724</p>
746 725
747<pre caption="Configuring the kernel to support SquashFS"> 726<pre caption="Configuring the kernel to support SquashFS">
748File systems---> 727File systems--->
749 Miscellaneous filesystems ---> 728 Miscellaneous filesystems --->
750 [*] SquashFS 2.X - Squashed file system support 729 [*] SquashFS 2.X - Squashed file system support
751</pre> 730</pre>
752 731
753<p> 732<p>
756your kernel version does not match the kernel image version on the Installation 735your kernel version does not match the kernel image version on the Installation
757CD. 736CD.
758</p> 737</p>
759 738
760<pre caption="Creating a compressed tarball containing the kernel modules"> 739<pre caption="Creating a compressed tarball containing the kernel modules">
761<comment># Create a tar.gz containing all the modules</comment> 740<comment>(Create a tar.gz containing all the modules)</comment>
762cd / 741# <i>cd /</i>
763tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/ 742# <i>tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/</i>
764</pre> 743</pre>
765 744
766<p> 745<p>
767Depending on your network boot mechanism, you will need to do some of the 746Depending on your network boot mechanism, you will need to do some of the
768following steps: 747following steps:
769</p> 748</p>
770 749
771<pre caption="Creating a boot image"> 750<pre caption="Creating a boot image">
772<comment># Create a etherboot image</comment> 751<comment>(Create an etherboot image)</comment>
773emerge mknbi 752# <i>emerge mknbi</i>
774cd /boot 753# <i>cd /boot</i>
775mkelf-linux -params="root=/dev/ram0 init=/linuxrc ip=dhcp" kernel... initrd... > etherboot.img 754# <i>mkelf-linux -params="root=/dev/ram0 init=/linuxrc ip=dhcp" kernel... initrd... > etherboot.img</i>
776 755
777<comment># Create a OpenBoot / SPARC64 TFTP image</comment> 756<comment>(Create a OpenBoot / SPARC64 TFTP image)</comment>
778emerge sparc-utils 757# <i>emerge sparc-utils</i>
779cd /boot 758# <i>cd /boot</i>
780elftoaout kernel... -o kernel.aout 759# <i>elftoaout kernel... -o kernel.aout</i>
781piggyback64 kernel.aout System.map-... initrd-... 760# <i>piggyback64 kernel.aout System.map-... initrd-...</i>
782mv kernel.aout openboot.img <comment># This is the boot image</comment> 761# <i>mv kernel.aout openboot.img</i> <comment>(This is the boot image)</comment>
783 762
784<comment># PXE does not need any more steps, the kernel and initrd can be used as is</comment> 763<comment>(PXE does not need any more steps, the kernel and initrd can be used as is)</comment>
785</pre> 764</pre>
786 765
787<p> 766<p>
788Finally, copy this kernel to your TFTP server. The details are 767Finally, copy this kernel to your TFTP server. The details are
789architecture-dependent and are beyond the scope of this guide. Please refer to 768architecture-dependent and are beyond the scope of this guide. Please refer to
790the documentation for your platform. 769the documentation for your platform.
791</p> 770</p>
792 771
793</body> 772</body>
794</section> 773</section>
795
796<section> 774<section>
797<title>NFS Setup</title> 775<title>NFS Setup</title>
798<body> 776<body>
799 777
800<p> 778<p>
805the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path> 783the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path>
806directory. 784directory.
807</p> 785</p>
808 786
809<pre caption="Preparing the NFS share"> 787<pre caption="Preparing the NFS share">
810<comment># This assumes that /nfs/livecd is a exported NFS share</comment> 788<comment>(This assumes that /nfs/livecd is a exported NFS share)</comment>
811mount /mnt/cdrom /tmp/gentoo-livecd.iso -o loop 789# <i>mount /tmp/gentoo-livecd.iso /mnt/cdrom -o loop</i>
812cp -p /mnt/cdrom /nfs/livecd 790# <i>cp -p /mnt/cdrom /nfs/livecd</i>
813umount /mnt/cdrom 791# <i>umount /mnt/cdrom</i>
814 792
815<comment># Copy the modules.tar.gz into /add</comment> 793<comment>(Copy the modules.tar.gz into /add)</comment>
816mkdir /nfs/livecd/add 794# <i>mkdir /nfs/livecd/add</i>
817cp /tmp/modules-X.Y.Z.tar.gz /nfs/livecd/add 795# <i>cp /tmp/modules-X.Y.Z.tar.gz /nfs/livecd/add</i>
818</pre> 796</pre>
819 797
820</body> 798</body>
821</section> 799</section>
822
823<section> 800<section>
824<title>DHCP Setup</title> 801<title>DHCP Setup</title>
825<body> 802<body>
826 803
827<p> 804<p>
828The netboot images will ask your DHCP server for an IP as well as a 805The netboot images will ask your DHCP server for an IP as well as a root-path
829root-path parameter. Both can be specified per host using a MAC 806parameter. Both can be specified per host using a MAC address to identify
830address to identify machines: 807machines:
831</p> 808</p>
832 809
833<pre caption="Sample client dhcpd.conf setup"> 810<pre caption="Sample client dhcpd.conf setup">
834... 811...
835 812
843... 820...
844</pre> 821</pre>
845 822
846</body> 823</body>
847</section> 824</section>
848
849<section> 825<section>
850<title>Netbooting Instructions</title> 826<title>Netbooting Instructions</title>
851<body> 827<body>
852 828
853<p> 829<p>
854Netbooting itself is again very platform-specific. The important part 830Netbooting itself is again very platform-specific. The important part is to
855is to specify the <c>ip=dhcp</c> and <c>init=/linuxrc</c> parameters 831specify the <c>ip=dhcp</c> and <c>init=/linuxrc</c> parameters on the kernel
856on the kernel command line, as this will bring up the 832command line, as this will bring up the network interface and tell the initrd
857network interface and tell the initrd scripts to mount the Installation CD via 833scripts to mount the Installation CD via NFS. Here are some platform-specific
858NFS. Here are some platform-specific tips: 834tips:
859</p> 835</p>
860 836
861<pre caption="Netbooting Instructions"> 837<pre caption="Netbooting Instructions">
862<comment># Etherboot - insert the etherboot disk into the drive and reboot 838<comment># Etherboot - insert the etherboot disk into the drive and reboot
863# The kernel command line was specified when the image was constructed</comment> 839# The kernel command line was specified when the image was constructed</comment>
864 840
865<comment># Sparc64 - Hit Stop-A at the boot prompt </comment> 841<comment># Sparc64 - Hit Stop-A at the boot prompt</comment>
866ok boot net ip=dhcp init=/linuxrc 842ok boot net ip=dhcp init=/linuxrc
867 843
868<comment># PXE - Setup pxelinux (part of syslinux), then create a pxelinux.cfg/default along the lines of:</comment> 844<comment># PXE - Setup pxelinux (part of syslinux),
845then create a pxelinux.cfg/default along the lines of:</comment>
869 846
870DEFAULT gentoo 847DEFAULT gentoo
871TIMEOUT 40 848TIMEOUT 40
872PROMPT 1 849PROMPT 1
873 850
874LABEL gentoo 851LABEL gentoo
875 KERNEL kernel-X.Y.Z 852 KERNEL kernel-X.Y.Z
876 APPEND initrd=initrd-X.Y.Z root=/dev/ram0 init=/linuxrc ip=dhcp 853 APPEND initrd=initrd-X.Y.Z root=/dev/ram0 init=/linuxrc ip=dhcp
877</pre> 854</pre>
878 855
879</body> 856</body>
880</section> 857</section>
881
882</chapter> 858</chapter>
883 859
884<chapter> 860<chapter>
885<title>Conclusion</title> 861<title>Conclusion</title>
886
887<section> 862<section>
888<title>To Automate or not to Automate?</title> 863<title>To Automate or not to Automate?</title>
889<body> 864<body>
890 865
891<p> 866<p>
894on whether or not you want to automate the kernel compilation process. 869on whether or not you want to automate the kernel compilation process.
895</p> 870</p>
896 871
897</body> 872</body>
898</section> 873</section>
899
900</chapter> 874</chapter>
901 875
902</guide> 876</guide>

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.20