Optional: Building an initramfs
In certain cases it is necessary to build an initramfs - an initial ram-based file system. The most common reason is when important file system locations (like /usr/ or /var/) are on separate partitions. With an initramfs, these partitions can be mounted using the tools available inside the initramfs.
Without an initramfs, there is a huge risk that the system will not boot up properly as the tools that are responsible for mounting the file systems need information that resides on those file systems. An initramfs will pull in the necessary files into an archive which is used right after the kernel boots, but before the control is handed over to the init tool. Scripts on the initramfs will then make sure that the partitions are properly mounted before the system continues booting.
Important
If using genkernel, it should be used for both building kernel
and initramfs. When using genkernel only for generating an initramfs, it is crucial to pass --kernel-config=/path/to/kernel.config to genkernel or the generated initramfs
may not work with a manually built kernel. Note that manually built kernels go beyond the scope of support for the handbook.
To install an initramfs, install
sys-kernel/genkernel first, then have it generate an initramfs:
root #emerge --ask sys-kernel/genkernel
root #genkernel --install --kernel-config=/path/to/used/kernel.config initramfs
In order to enable specific support in the initramfs, such as LVM or RAID, add in the appropriate options to genkernel. See genkernel --help for more information. In the next example support is enabled for LVM and software RAID (mdadm):
root #genkernel --lvm --mdadm --install --kernel-config=/path/to/used/kernel.config initramfs
The initramfs will be stored in /boot/. The resulting file can be found by simply listing the files starting with
initramfs:
root #ls /boot/initramfs*
Now continue with
Kernel modules.
@175920
genkernel --install --kernel-config=/path/to/used/kernel.config initramfs
Bun ne peki hocam? Arguments var burada.
Hocam yemin ederim iyiki tavsiyenize uyup handbooktan ilerlemişim. Videoda olmayan bir sürü şey var burada.