Setup Grub to remember your last booted OS

by | Dec 21, 2016

You absolutely have rebooted from Linux to load Windows several times. Those that dual-boot their system have done this quite a lot. Dual-booting relies heavily on the Grub bootloader and its entries; this gets worse when you realize that Windows has to restart a lot as it updates. Actually, there’s a way to set Grub to remember where you last left off! This means when you load Windows (or any operating system), and it restarts, it’ll load it again!

Before any configurations changes are made, try to back up all Grub configurations for emergency cases. Assuming you are currently running Linux in your machine, start off by opening a terminal and making a backup directory.

mkdir -p ~/grub-backup

Start copying configuration files from “/etc/default/grub” and “/etc/grub.d”

cp /etc/default/grub ~/grub-backup
cp -a /etc/grub.d ~/grub-backup

Here’s how to set the Grub bootloader so it will remember the last booted item by the following command:

sudo nano /etc/default/grub

Change GRUB_DEFAULT=0 to GRUB_DEFAULT=saved Then, paste this below the GRUB_DEFAULT line:

GRUB_SAVEDEFAULT=true

There are other ways to tweak Grub such as changing timeout time, hiding Grub unless the user presses Shift key. All these tweaks can be easily done through editing the file “/etc/default/grub”.

Source: Make tech easier

SHARE

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent posts

Archives


Stay up to date with all the news from UDS ENTERPRISE through our social networks. Follow us!

Skip to content