Kernel/Rebuild

From Gentoo Wiki
< Kernel
Jump to:navigation Jump to:search
Other languages:
English • ‎italiano • ‎日本語

Common

Exit the kernel configuration and rebuild the kernel using the following command:

root #make && make modules_install

Do not forget to copy the newly compiled kernel image to the /boot location. If applicable mount /boot.

root #mount /boot
root #make install

If necessary, update the boot loader

When not changing kernel versions, it may not be necessary to update the system's boot loader. This depends on the system configuration; if the boot loader is pointed to a replaced binary file with the exact same name, secondary boot loader entries may not need updated. When in doubt re-run the boot loader configuration generator or inspect the boot loader's configuration file to avoid issues the next time the system reboots.

Using GRUB2

Update the boot loader configuration prior to rebooting the system. For instance, when using GRUB2, these steps can be done by running the following command:

root #grub-mkconfig -o /boot/grub/grub.cfg

Using EFI stub kernel

Users of EFI stub follow the procedure in the Installation section.

Using systemd-boot

If using systemd's EFI bootloader, review the systemd-boot article.

Reboot

Reboot for the new kernel configuration to take effect:

root #reboot