Skip to content

Step5: Build and install kernel and bootloader

Nick Kossifidis edited this page Jun 18, 2017 · 5 revisions

Objectives

  • Fetch and configure Linux Kernel
  • Build it
  • Install bootloader if needed
  • Install kernel
  • Final preparations before reboot
  • Reboot

Procedure

Follow the Handbook and when it comes to kernel configuration make sure you enable EFI stub functionality and the systemd stuff (check out the links below). In our kernel to reduce latency we also enable CONFIG_PREEMPT and set timer frequency to 1000Hz.

If needed install linux-firmware and / or use eix to find the firmware package for any of your devices that need firmware blobs.

In our setup we boot directly to the kernel without GRUB on systems that support it, through the EFI stub functionality. You can skip the efibootmgr mentioned on the how-to by putting the kernel image on /boot/EFI/boot/bootx64.efi.

After having installed kernel and bootloader, make sure you install dhcpcd or dhclient so that network auto-config will be available on the new system after reboot. Also install dosfstools in case /boot ever needs fsck.

When everything is ready, set the root password and reboot to the new system.

For more infos

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel

https://wiki.gentoo.org/wiki/Kernel/Gentoo_Kernel_Configuration_Guide

https://wiki.gentoo.org/wiki/EFI_stub_kernel

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader