升级新内核与删除旧内核

4 、针对直接make 的 内核则使用如下方法:

进入到 boot 目录下,删除版本相对用的 conifg 文件、initrd.img 文件、System.map 文件 、vmlinuz 文件

然后进入到 /lib/modules/ 文件夹下 删除 相应的模块文件。

eg: 删除旧内核 4.1.3-sil4

wangye@Jarvis:/boot$ ls
config-3.14.34-pree-1000      initrd.img-4.1.3-sil4
config-3.14.8-hw              System.map-3.14.34-pree-1000
config-3.14.8-pree-1000       System.map-3.14.8-hw
config-3.18.8-pree-1000       System.map-3.14.8-pree-1000
config-3.18.8-pree-1000.old   System.map-3.18.8-pree-1000
config-3.2.0-4-amd64          System.map-3.2.0-4-amd64
config-4.1.3-sil4             System.map-4.1.3-sil4
config-4.1.3-sil4.old         vmlinuz-3.14.34-pree-1000
grub                          vmlinuz-3.14.8-hw
initrd.img-3.14.34-pree-1000  vmlinuz-3.14.8-pree-1000
initrd.img-3.14.8-hw          vmlinuz-3.18.8-pree-1000
initrd.img-3.14.8-pree-1000   vmlinuz-3.2.0-4-amd64
initrd.img-3.18.8-pree-1000   vmlinuz-4.1.3-sil4
initrd.img-3.2.0-4-amd64

sudo update-grub2

原文地址:https://www.cnblogs.com/lvchaoshun/p/7569731.html