之前测试LINODE的日本机子,新机房已经是采用了KVM架构。更换内核的方法和老机房XEN更换内核方法有所不同。
安装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面板选择编辑你的配置文件
在Boot Settings选项的Kernel列表里选择GRUB 2
点Save Changes保存,重启机子后就可以按通常方式更换发行版内核了。
启动中可能会出现以下错误,可以忽略。
error: file `/boot/grub/i386-pc/all_video.mod' not found. Loading Linux linux ... Loading initial ramdisk ... Press any key to continue...
GDCA一直以“构建网络信任体系,服务现代数字生活”的宗旨,致力于提供全球化的数字证书认证服务。其自主品牌——信鉴易®TrustAUTH® SSL证书系列,为涉足互联网的企业打造更安全的生态环境,建立更具公信力的企业网站形象。
上一篇:LNMP非正常关闭导致的NGINX出错
下一篇:ubuntu安装fail2ban简单防爆破