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

VDI: The most secure environment for hybrid working

Today is Data Privacy Day. The purpose of this date is to raise awareness and promote privacy and data protection best practices. It was initiated by the European Commission, the Council of Europe, and the Data Protection authorities of the European Union’s member states. Their main goal was to drive attention to the importance of privacy, user data protection, and compliance of the General Data Protection Regulation (RGPD). It is a regulation characterized by significant fines for non-compliance since its implementation in 2018.

How to avoid issues with virtual machines

Virtualization comes with a wide range of benefits for organizations. It helps cut IT costs and reduces downtime while increasing efficiency and productivity. It also increases the resiliency of networks, primarily when disasters occur, and promotes more green-friendly operations.

However, using virtual machines also comes with a set of downsides. Information security may get compromised, workloads mixed up, separation duties lost, among other issues. It is vital to know how you can get over these problems, and that’s what this article will discuss.

Let’s get started.

Archives


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

Skip to content