Default boot last OS used

I’ve several operating systems, when I reboot I would boot in the last operating system I used.
I don’t see this option in YaST → boot loader where I can choose a particular os not the last one (that can change often).

Have a look into /etc/default/grub

I am not sure I understand it. There is “Default Boot Section” where you can select any of the existing boot entries. If it does not do what you want, then better show example of what you expect.

My read is that if they boot from TW and have Leap and Windows installed, they want TW to be the default on the next boot. If Windows is manually selected, then on reboot, Windows should be the default when they next reboot.

ie, using the GRUB_DEFAULT=saved setting, but as I understand it, there should also be a GRUB_SAVEDEFAULT setting as well, but on my TW system, I don’t see that in /etc/default/grub.

I saw it but “default entry” will be always the same that I choose.

Let suppose I boot openSuse then I reboot and I want to boot in openSuse again. Then I boot in Linux Mint and then I want Linux Mint become default boot. But without changing anything.
Finally I want the last os I used become automatically the next “default boot”.

This can be accomplished by modifying /etc/default/grub

Simply uncomment the line GRUB_SAVEDEFAULT=“true” so that it looks like this:

Afterwards do what is mentioned in the first line of this file as root:

# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.

It works, thanks.
But I’m almost sure this option was available in GUI too. At least I found this option in GUI in other Linux distribution.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.