首页 > 技术文章 > 给linode 替换操作系统核心

zhenfei 2016-12-19 22:23 原文

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/

推荐阅读