返回信息流各位大佬好:
目前centos官方源上给的最新kernel版本是4.18,我想试着在给centos8手动升级内核到5.17.1的过程中 (kernel.org下载 -> tar xf -> make menuconfig -> make -> make modules_install -> make install -> reboot)
前述步骤全无报错的完成,grub选内核的时候也能看到我新下载的5.17.1,但进入时会报错:
```
error:../../grub-core/loader/i386/efi/linux.c:208(hd0,gp2)/vmlinuz-5.17.1 has invalid signature.
error:../../grub-core/loader/i386/efi/linux.c:93:you need to load the kernel first.
Press any key to continue.
```
然后随便按个键就回到grub界面了,界面上选旧版本也还能引导进系统。
这台虚拟机的宿主机是Xeon银牌+ESXi6.7,我看报错提示了.../i386/...,还试过重新分配一台新虚拟机重新make ARCH=x86_64,但还是得到相同的结果。[ema8][ema8][ema8]
请问各位大佬,是哪里有问题,看了多篇文章似乎没人遇到过这个问题。
这是一条镜像帖。来源:北邮人论坛 / linux / #160629同步于 2022/4/11
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Linux机器人发帖
【问题】手动更新centos内核版本遇到的问题
Austinpb
2022/4/11镜像同步16 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
刚看完鸟哥的linux前半部分,感觉看得懂,又看不懂,看报错是会不会是内核对硬件的有要求,不过你都是在虚拟机上创建已经不需要这层概念了。再过一个月我再来看看能回答吗
当然可以直接吃现成的,
这里只是针对自编译遇到的问题的讨论
【 在 q644540267 的大作中提到: 】
: 可以直接配置elprepo去装社区编好的5以上内核
等5月11日再来@你
【 在 Forsun 的大作中提到: 】
: 刚看完鸟哥的linux前半部分,感觉看得懂,又看不懂,看报错是会不会是内核对硬件的有要求,不过你都是在虚拟机上创建已经不需要这层概念了。再过一个月我再来看看能回答吗
找到了这两个:
https://askubuntu.com/questions/1081472/vmlinuz-4-18-12-041812-generic-has-invalid-signature
https://docs.fedoraproject.org/en-US/Fedora/18/html/UEFI_Secure_Boot_Guide/sect-UEFI_Secure_Boot_Guide-Implementation_of_UEFI_Secure_Boot-Shim.html
我*猜*可以从虚拟机 BIOS 中禁止 secure boot。但估计要治本的话得看怎么为新内核重新生成签名。
我一开始就是瞄着签名的问题解决过,但是结果还是如前文
包括在menuconfig里面配置对内核签名 和 用链接里面openssl生成pem密钥
关secure boot属于逃课啊
【 在 Vampire 的大作中提到: 】
: 找到了这两个:
: https://askubuntu.com/questions/1081472/vmlinuz-4-18-12-041812-generic-has-invalid-signature
: https://docs.fedoraproject.org/en-US/Fedora/18/html/UEFI_Secure_Boot_Guide/sect-UEFI_Secure_Boot_Guide-Implementation_of_UEFI_Secure_Boot-Shim.html
: ...................
https://unix.stackexchange.com/questions/595305/compile-linux-kernel-5-x-on-centos-8-2-certs
【 在 Austinpb 的大作中提到: 】
: 各位大佬好:
: 目前centos官方源上给的最新kernel版本是4.18,我想试着在给centos8手动升级内核到5.17.1的过程中 (kernel.org下载 -> tar xf -> make menuconfig -> make -> make modules_install -> make install -> reboot)
: 前述步骤全无报错的完成,grub选内核的时候也能看到我新下载的5.17.1,但进入时会报错:
: ...................
气氛上还是 kernel 的 signature 问题,build from source 需要自己给 kernel 签名并信任,可以参考这个
https://askubuntu.com/questions/1081472/vmlinuz-4-18-12-041812-generic-has-invalid-signature
或 Debian 的
https://wiki.debian.org/SecureBoot
> Enrolling your key
> If you also have a kernel to sign, you may wish to do the next step first as it will save you one reboot.
>
> $ sudo mokutil --import MOK.der # prompts for one-time password
> $ sudo mokutil --list-new # recheck your key will be prompted on next boot
>
> <rebooting machine then enters MOK manager EFI utility: enroll MOK, continue, confirm, enter password, reboot>
>
> $ sudo dmesg | grep cert # verify your key is loaded
关键在于“要信任”