歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu Grub2啟動上一次正確啟動的內核

Ubuntu Grub2啟動上一次正確啟動的內核

日期:2017/2/28 15:29:59   编辑:Linux教程

讓Ubuntu Grub2 引導上一次正確啟動的內核,需要設置兩個變量,如下:

/etc/default/grub

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

然後運行update-grub命令。

參考

Saved
Saving an OS can be achieved by running sudo grub-set-default ifGRUB_DEFAULT=saved is set in /etc/default/grub. It may also be saved if GRUB_SAVEDEFAULT=true is also set in /etc/default/grub. In this case, the default OS remains until a new OS is manually selected from the GRUB 2 menu or thegrub-set-default command is executed.

Copyright © Linux教程網 All Rights Reserved