Genkernel

genkernel is used to automate the build process of the kernel and initramfs. Some of the general features:
 * configure the kernel sources
 * build bzImage and copy to
 * create initramfs and copy to
 * create symlinks in
 * add custom content to initramfs for encryption, splash images, extra modules etc.
 * compress initramfs
 * configure the bootloader

Installation
Install :

Configuration
The actual behavior of genkernel depends on a large variety of flags that can be set/unset in the    file. This file is very well documented but let's examine some of the most commonly used ones here. For a more complete explanation, please refer to the comments in itself or to the output of the   command.

Flags acting on the system configuration interface
The configuration flags listed below help you decide how you will interact with the configuration process. You can even choose whether or not the configuration file created in the process should be saved. The following are the primary configuration flags:


 * --[no-]menuconfig: Activates [ or deactivates] the  command (which invokes un interactive configuration menu) before building the kernel.
 * --gconfig: Provides a kernel configuration utility which depends on the GTK+ libraries. The advantage of this option is that most users find it easier and clearer to configure the kernel using this tool, since it relies on the X-windowing system. The disadvantage of this option is that you need the X-windowing system to use it, so it will not work on the command line.
 * --xconfig: Provides a kernel configuration utility which depends on the QT libraries. The advantage of this option is that most users find it easier and clearer to configure the kernel using this tool, since it relies on the X-windowing system. The disadvantage of this option is that you need the X-windowing system to use it, so it will not work on the command line.
 * --[no-]save-config: Saves [or does not save] the kernel configuration to a file in the /etc/kernels/ directory for later use.

Flags acting on the resulting system
The configuration flags listed here defines which features will, or won't be enabled in the resulting kernel and initrd.
 * --[no-]splash: Activates [or deactivates] support for framebuffer splash support in the genkernel-built initrd image. To override the default theme used by fbsplash, use --splash=PreferredTheme (where PreferredTheme is the title of one of the directories inside the /etc/splash/ directory.
 * --splash-res=PreferredResolution: This flag allows you to select which splash screen resolutions will be supported in the initrd during the start-up of the system. This is useful for two reasons: First, you are able to select only the splash screen resolution(s) relevant to your system. Second, you avoid the unnecessary increase in the disk space required by initrd (since the initrd does not have to support resolutions that are irrelevant for your system configuration.) However, you may want to omit this flag if the kernel is being compiled for an Installation CD; this allows splash support for all possible resolutions.
 * --do-keymap-auto: Force keymap selection during the boot sequence.
 * --lvm: Includes support for storage using via Logical Volume Management (LVM2) from static binaries, if available to the system. Relevant (static) LVM2 binaries are compiled if they are unavailable. Be sure to install the lvm2 package on your system with emerge lvm2 before enabling this flag, and review the LVM article on the Gentoo wiki.
 * --dmraid: Includes support for DMRAID; the utility which creates RAID mappings using the kernel device-mapper subsystem. DMRAID discovers, activates, deactivates and displays properties of software RAID sets (ATARAID, for example) and contained DOS partitions.
 * --luks: Includes support for Linux Unified Key Setup or LUKS. This will allow you to use a device encrypted by LUKS which contains the root filesystem. On the bootloader, you then set that encrypted device as the value of crypt_root (and real_root shall be the unencrypted device LUKS creates).
 * --disklabel: Adds support for disk label and UUID support to your initrd.
 * --iscsi: Adds support for iSCSI to your initrd.
 * --multipath: Adds support for Multipath to your initrd.
 * --linuxrc=/path/to/your/linuxrc': Specifies a user-created linuxrc — a script that is initialized during the start-up stage of the kernel, prior to the actual boot process. (A default linuxrc script should be in the /usr/share/genkernel/ directory.) This script allows you to boot into a small, modularized kernel and load the drivers that are needed (as modules) by the system.
 * --cachedir=/path/to/alt/dir/: Overrides the default cache location used while compiling the kernel.
 * --tempdir=/path/to/new/tempdir/: Specifies the location of the temporary directory used by genkernel while compiling the kernel.
 * --unionfs: Includes support for the Unification File System in the initrd image.