Bug 1159887 - [y2-bootloader] Remember last choice in grub
[y2-bootloader] Remember last choice in grub
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
All Other
: P5 - None : Enhancement with 5 votes (vote)
: ---
Assigned To: YaST Team
Jiri Srain
https://trello.com/c/izFMnlAd
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-30 00:13 UTC by Terry Cater
Modified: 2020-12-01 15:49 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Cater 2019-12-30 00:13:40 UTC
A toggle for remembering last used OS for grub in yast would lower the paper cuts for dual booters who like this kind of behavior. Perhaps this could be an entry under "Default Boot Selection" in the Bootloader Options menu?
Comment 1 Josef Reidinger 2019-12-30 08:20:22 UTC
that make sense for me.

Michael - just quick question, how to reset already set value that we set by "grub-set-default" to use really the last one?
Comment 2 Michael Chang 2020-01-03 10:25:36 UTC
(In reply to Josef Reidinger from comment #1)
> that make sense for me.
> 
> Michael - just quick question, how to reset already set value that we set by
> "grub-set-default" to use really the last one?

I believed the simple configuration [1] GRUB_SAVEDEFAULT is what you are looking for. And if you read the manual thoroughly, you'll see the caveat in the end. 

"This option relies on the environment block, which may not be available in all situations"

That is also saying we may have to detect either of the zfs, lvm and mdadm is in use by /boot and pop up warning whenever writable environment block not available.

[1] https://www.gnu.org/software/grub/manual/grub/grub.html#Simple-configuration

Thanks.
Comment 3 Josef Reidinger 2020-01-03 10:41:17 UTC
(In reply to Michael Chang from comment #2)
> (In reply to Josef Reidinger from comment #1)
> > that make sense for me.
> > 
> > Michael - just quick question, how to reset already set value that we set by
> > "grub-set-default" to use really the last one?
> 
> I believed the simple configuration [1] GRUB_SAVEDEFAULT is what you are
> looking for. And if you read the manual thoroughly, you'll see the caveat in
> the end. 
> 
> "This option relies on the environment block, which may not be available in
> all situations"
> 
> That is also saying we may have to detect either of the zfs, lvm and mdadm
> is in use by /boot and pop up warning whenever writable environment block
> not available.
> 
> [1]
> https://www.gnu.org/software/grub/manual/grub/grub.html#Simple-configuration
> 
> Thanks.

ah, fine so if we use GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT='true'
then "grub-set-default" value is ignored, right? And if that environment block is not available it will use that default instead?
Comment 4 Michael Chang 2020-01-03 11:06:16 UTC
(In reply to Josef Reidinger from comment #3)
> (In reply to Michael Chang from comment #2)
> > (In reply to Josef Reidinger from comment #1)

> 
> ah, fine so if we use GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT='true'
> then "grub-set-default" value is ignored, right?

Strictly speaking grub-set-default is not ignored, it could still be used to set "last default" from linux, besides from grub. :)

> And if that environment
> block is not available it will use that default instead?

Yes I think so. But grub will also spew ugly warnings (rather clueless like "sparse file not allowed") in this case. :(
Comment 5 Claudius Ellsel 2020-12-01 15:49:30 UTC
I'd like to see this behavior activated by default. Are there reasons against it?

Some distributions like Ubuntu don't have it on, but I really enjoy this option on Manjaro for example where it is on by default.