给linode 替换操作系统核心

本文提供了一套详细的步骤来更新CentOS系统的内核并进行相应的配置。首先确保所有已安装的包都是最新版本,接着安装适用于32位或64位系统的默认内核,并通过编辑/boot/grub/menu.lst来配置GRUB启动菜单。最后更改Linode的配置文件并将系统重启以应用新的内核。

1、Make sure your package repositories and installed packages are up to date by issuing the following command:

yum update

2、结束后看下当前的核心是啥:

uname -a

现在(我发帖日)的默认是:4.8.6-x86_64-linode78

3、Issue the following command to install the default kernel for CentOS6:

32-bit CentOS: :
yum install kernel-PAE.i686

64-bit CentOS: :
yum install kernel.x86_64

4、Create a file named /boot/grub/menu.lst with the following contents. Adjust the title, kernel, and initrd lines to reflect the actual file names found in the /boot/ directory.

/boot/grub/menu.lst
timeout 5
title CentOS (2.6.32-431.23.3.el6.x86_64)
root (hd0)
kernel /boot/vmlinuz-2.6.32-431.23.3.el6.x86_64 root=/dev/xvda
initrd /boot/initramfs-2.6.32-431.23.3.el6.x86_64.img

然后,把里面 2.6.32-431.23.3.el6.x86_64 对应的全部替换为 /boot 目录下最新的对应的一批文件名。

timeout 5
title CentOS (3.10.0-514.2.2.el7.x86_64)
root (hd0)
kernel /boot/vmlinuz-3.10.0-514.2.2.el7.x86_64 root=/dev/sda
initrd /boot/initramfs-3.10.0-514.2.2.el7.x86_64.img

5、修改 linode 的Configuration Profile, 将核心改为 GRUB

6、重启后 查看 uname -a , 核心已变。  o ye

参考:https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distributionsupplied-kernel-with-pvgrub/

转载于:https://www.cnblogs.com/zhenfei/p/6200831.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值