OP01-delete_kernel

OP01-delete_kernel


删除/lib/modules目录下的文件

[root@husa ~]# ls /lib/modules
3.10.0-229.el7.x86_64  3.10.67.1.el7
[root@husa ~]# rm -rf /lib/modules/3.10.67.1.el7

删除/boot目录下的文件

[root@husa ~]# ls /boot/
config-3.10.0-229.el7.x86_64                             symvers-3.10.0-229.el7.x86_64.gz
grub                                                     System.map
grub2                                                    System.map-3.10.0-229.el7.x86_64
initramfs-0-rescue-f50684c1a00a45f9bd2bdc123ff7d8e3.img  System.map-3.10.67.1.el7
initramfs-3.10.0-229.el7.x86_64.img                      vmlinuz
initramfs-3.10.0-229.el7.x86_64kdump.img                 vmlinuz-0-rescue-f50684c1a00a45f9bd2bdc123ff7d8e3
initramfs-3.10.67.1.el7.img                              vmlinuz-3.10.0-229.el7.x86_64
initramfs-3.10.67.1.el7kdump.img                         vmlinuz-3.10.67.1.el7
initrd-plymouth.img
[root@husa ~]# rm -rf /boot/initramfs-3.10.67.1.el7.img /boot/initramfs-3.10.67.1.el7kdump.img /boot/System.map-3.10.67.1.el7 /bo
ot/vmlinuz-3.10.67.1.el7

删除/lib/src目录下的内核文件

[root@husa ~]# ls /usr/src/
debug  kernels  linux  linux-3.10.67
[root@husa ~]# rm -rf /usr/src/linux /usr/src/linux-3.10.67

更新grub

[root@husa ~]# grub2-mkconfig -o /boot/grub2/grub.cfg         
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-f50684c1a00a45f9bd2bdc123ff7d8e3
Found initrd image: /boot/initramfs-0-rescue-f50684c1a00a45f9bd2bdc123ff7d8e3.img
done

重启系统

done

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值