技术文档

LINODE的KVM架构LINUX更换内核

之前测试LINODE的日本机子,新机房已经是采用了KVM架构。更换内核的方法和老机房XEN更换内核方法有所不同。

LINODE的KVM架构LINUX更换内核

安装Grub

安装过程中可能会询问安装位置,不需要安装到MBR

Arch Linux

pacman -S linux grub

CentOS 7

yum install kernel grub2

Debian

apt-get install linux-image-amd64 grub2

Fedora 22

dnf install kernel-core grub2

Ubuntu

apt-get install linux-image-virtual grub2

Gentoo

echo "GRUB_PLATFORMS=\"coreboot pc\"" >> /etc/portage/make.conf emerge --ask sys-boot/grub sys-kernel/gentoo-sources genkernel eselect kernel list eselect kernel set [# of new kernel] zcat /proc/config.gz > /usr/src/linux/.config genkernel --oldconfig all

配置Grub

编辑/etc/default/grub,修改以下项目:

GRUB_TIMEOUT=10 GRUB_CMDLINE_LINUX="console=ttyS0,19200n8" GRUB_DISABLE_LINUX_UUID=true GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1" GRUB_TERMINAL=serial

更新bootloader,更新内核后需要再一次运行该命令来更新GRUB目录,默认为列表第一个内核启动:

Arch Linux

grub-mkconfig -o /boot/grub/grub.cfg

Debian 8 & Ubuntu 15.04

update-grub

CentOS 7

mkdir /boot/grub grub2-mkconfig -o /boot/grub/grub.cfg

Fedora 22 – Replace with the current kernel version

dracut /boot/initrd-4.0.5-300.fc22.x86_64.img 4.0.5-300.fc22.x86_64 mkdir /boot/grub grub2-mkconfig -o /boot/grub/grub.cfg

Gentoo

mkdir /boot/grub grub2-mkconfig -o /boot/grub/grub.cfg

重启到Grub2 模式

在LINODE面板选择编辑你的配置文件


©2020-2024   万云SSL证书  (www.sslssl.com.cn)  万云科技   豫ICP备2020034358号-10