CentOS7 改變開機 Kernel
偶爾想選舊 Kernel
# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
CentOS Linux (3.10.0-1127.13.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-1062.4.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-65113b1a0d2f6087d515e6a8cd0ee7ef) 7 (Core)
# grub2-set-default 1
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file …
Found linux image: /boot/vmlinuz-3.10.0-1127.13.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1127.13.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-1062.4.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.4.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-65113b1a0d2f6087d515e6a8cd0ee7ef
Found initrd image: /boot/initramfs-0-rescue-65113b1a0d2f6087d515e6a8cd0ee7ef.img