| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

CentOs7 Grub2

提供: MyMemoWiki
2020年2月16日 (日) 04:23時点におけるPiroto (トーク | 投稿記録)による版
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

CentOs7 Grub2

CentOS | Linux |

デフォルト起動OSを変更する

起動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 6
# head -2 /boot/grub2/grubenv
# GRUB Environment Block
saved_entry=6

サーバー再起動