内核/重新构建

From Gentoo Wiki
< Kernel
Jump to:navigation Jump to:search
This page is a translated version of the page Kernel/Rebuild and the translation is 35% complete.
Outdated translations are marked like this.
Other languages:

使用下面的命令退出内核配置,并且重新构建内核:

root #make && make modules_install
附注
{{{1}}}


别忘了把新编译的内核镜像复制到 /boot。如果可以的话,挂载 /boot

root #mount /boot
root #make install

如果有必要,更新启动引导(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.

使用 GRUB

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

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

使用 EFI stub 内核

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

使用 systemd-boot

如果使用 systemd 的 EFI 启动引导,查看 systemd-boot 文章。

重启

新的内核配置需要重启生效:

root #reboot