- 追加された行はこのように表示されます。
- 削除された行は
このように表示されます。
!!!CentOs7 Grub2
[CentOS][Linux]
!!デフォルト起動OSを変更する
*http://enakai00.hatenablog.com/entry/2015/11/27/152442
!起動OSの確認
# grep "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
CentOS Linux (3.10.0-229.20.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-229.20.1.el7.x86_64) 7 (Core) with debugging
CentOS Linux (3.10.0-229.11.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-229.11.1.el7.x86_64) 7 (Core) with debugging
CentOS Linux 7 (Core), with Linux 3.10.0-229.el7.x86_64
CentOS Linux 7 (Core), with Linux 0-rescue-4b00eec6f028470db654c2536ac2fc83
menuentry "Windows 10"{
!現在のデフォルト起動
# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-229.20.1.el7.x86_64) 7 (Core)
!変更
# grub2-set-default 9
# grub2-set-default 6
# head -2 /boot/grub2/grubenv
# GRUB Environment Block
saved_entry=6
サーバー再起動