Find file
Fetching contributors…
Cannot retrieve contributors at this time
330 lines (327 sloc) 10.4 KB
.TH GENKERNEL "8" "June 2006" "genkernel 3.3" "Gentoo Linux"
genkernel \- the Gentoo Linux automatic kernel compiler.
\fBgenkernel\fR \fI[options...] action\fR
Genkernel is designed to allow users who are not previously used to
compiling a kernel to use a similar setup to that one that is used on
the Gentoo LiveCDs which auto-detects your hardware.
Some users may also be interested in using genkernel for hardware
which requires initialization and a working kernel before it can be
booted because genkernel also automatically compiles your kernel
modules, allowing hardware which needs to be loaded with module
parameters to be used.
All that is needed to run genkernel is just ``genkernel'' with an action
and any flags you might need:
# genkernel --menuconfig --no-clean --no-install all
This would produce a kernel, asking you what how to configure it
to your desire, leaving alone any existing compiled object files, but not
installing anything.
An action tells genkernel what you want it to do - the following
actions are supported:
.I \fBall\fR
Build all steps - the kernel, modules, and the ramdisk.
.I \fBbzImage\fR
Build only the kernel.
.I \fBkernel\fR
Build only the kernel and the modules.
.I \fBinitramfs\fR
Build only the ramdisk.
Genkernel supports the following options which alter its
behaviour. Certain options have ``\fB--no-\fR'' variants which
do the opposite thing. You can specify your options in any order.
.BR Debugging \ Options
This controls the out verbosity level of genkernel output - if this is set
to 0, minimal debugging is done; if this is set to 5 as much output as
possible is given.
This outputs debugging data to the file <outfile>. By default this is
.I /var/log/genkernel.log\fR.
Turns on, or off, output in color using escape sequences.
.BR Kernel \ Configuration
Runs, or does not run "make menuconfig" after running "make oldconfig".
Saves, or does not save the kernel configuration to
.I /etc/kernels
if the kernel is successfully compiled.
Run "make gconfig" after "make oldconfig".
Run "make xconfig" after "make oldconfig".
.BR Kernel \ Compilation
Runs, or does not run, "make clean" before compilation - this erases any
compiled object files in the kernel source tree but does not have an impact
on the kernel configuration. Specifying \fB\-\-no\-clean\fR implies
Runs, or does not run, "make mrproper" before compilation - this erases both
any compiled object files in the kernel source tree as well as the kernel
Installs, or does not install the kernel to
.I /boot
after building. The default is --install. If MOUNTBOOT is set in
.I /etc/genkernel.conf
.I /boot
will be automatically mounted if it is
not already mounted before the ramdisk and kernel images are copied over.
Manages, or does not manage, symlinks in
.I /boot
like the manual kernel "make install" process does. A
.I kernel
(or, depending on options,
.I kernelz\fR)
symlink will link to the most recently built kernel image and a
.I kernel.old
.I kernelz.old\fR)
symlink will link to the second most recently built image, if one exists.
Similar symlinks (both * and *.old) are managed for
.I initramfs\fR
The corresponding work products (i.e., the actual kernel and initamfs images,
and are also managed accordingly. NOTE: Specifying --symlink
does nothing unless --install is also specified.
Don't copy any modules to the ramdisk.
Implies \fB\-\-no\-clean\fR, and thus \fB\-\-no\-mrproper\fR, running a
"make oldconfig".
Run the specified arguments in the current environment after the kernel and
modules have been compiled.
.BR Kernel \ Locations
This specifies the location of the kernel sources; the default is
This specifies a kernel configuration file to use for compilation; by
default genkernel uses the config from the previous build of the same kernel
version or a default kernel config if there isn't a previous config.
.BR Low-Level \ Compilation \ Options
Compiler to use for the kernel compilation (e.g. distcc).
Assembler to use for the kernel compilation.
Linker to use for the kernel compilation.
GNU Make to use for the kernel compilation.
Compiler to use for utilities.
Assembler to use for utilities.
Linker to use for utilities.
GNU Make to use for utilities.
GNU Make options such as \fB\-j2\fR, etc.
.BR Initialization
If the extra argument is specified, splash is forced using <theme>
rather than the default theme specified in your splash
configuration. If \fB\-\-no-splash\fR is specified, then
splash is disabled.
Optionally select splash resolutions to include.
Force keymap selection at boot.
Add DMRAID support.
Add in EVMS support from static binaries if they exist on the system:
you should run "emerge evms" first.
Add in LVM support from static binaries if they exist on the system,
or compile static LVM binaries if static ones do not exist.
Add in Luks support from static binaries if they exist on the
This builds a monolithic kernel without any modules on any initial ramdisks.
Use <file> for the linuxrc instead of the genkernel linuxrc.
.BR Internals
Force the architecture settings described by the <arch> profile
instead of autodetecting the running architecture.
Sets genkernel's temporary working directory to <dir>.
.BR Output \ Settings
Tag the kernel and initrd with a name, if not defined this option defaults to genkernel
File to output a .tar.bz2'd kernel and initrd: no modules outside of the
initrd will be included...
File to output a .tar.bz2'd modules after the callbacks have run
File to output a .tar.bz2'd kernel, contents of /lib/modules/ and the kernel config.
\fBNOTE\fR: This is created before the callbacks are run.
This option is only valid if kerncache is defined
If there is a valid kerncache no checks will be made
against a kernel source tree.
Directory structure to include in the initramfs,
only available on 2.6 kernels
The following options can be passed as kernel parameters from the
bootloader, which the ramdisk scripts would recognize.
Specifies the device node of the root filesystem to mount.
This specifies the device encrypted by Luks, which contains the root
filesystem to mount.
This specifies the swap device encrypted by Luks.
In case your root is encrypted with a key, you can use a device like a usb pen to store the key.
This value should be the key path relative to the mount point.
If necessary provide the name of the device that carries the root_key.
If unset while using root_key, it will automatically look for the device in every boot.
Same as root_key for swap.
Same as root_keydev for swap.
Set this to silent all the output related to the cryptographic software, and in case your encrypted device isn't open with the key, it opens a shell in the initrd quietly.
Passes arguments to dmraid on bootup.
Passes arguments to init on bootup.
Pauses for 10 seconds before running devfsd if no argument is specified;
otherwise pauses for the number of specified seconds.
Normally used to tell the kernel that it should start a network interface. If present, the initrd will try to mount a livecd over NFS.
If present, the initrd will try to mount a livecd from that location. Otherwise the location will be deduced from the DCHP request (option root\-path)
Activate EVMS volumes on bootup
Activate LVM volumes on bootup
Activate SCSI devices on bootup, necessary when SCSI support is compiled as modules and you're using SCSI or SATA devices.
The initrd scripts have limited support for network booting.
This is activated if the ip=<...> kernel parameter was given. Please refer to the genkernel guide at for more information.
The initrd scripts will extract any *.tar.gz files found in the \fB/add\fR directory of the livecd into the root filesystem during boot. This way it is easy to extend a netbooted LiveCD i.e. add custom tools, or other kernel modules.
If you believe you have found a bug in the genkernel scripts, then please
file a bug on the Gentoo Linux Bugzilla:
assigning your bug to We cannot assist you
with kernel compilation failures unless they are caused by a genkernel
Kernel issues for Gentoo-supported kernels, including compilation
failures should go to
and should be assigned to Please check if an
existing bug documents the same issue before opening a new bug. Issues
for kernel sources not supported by Gentoo should go to their relevant
Tim Yamin <>
Eric Edgar <>
NFS Support by Thomas Seiler <>
\fB/etc/genkernel.conf\fR \- genkernel configuration file