help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB_SAVEDEFAULT how does it work?


From: Chris Murphy
Subject: Re: GRUB_SAVEDEFAULT how does it work?
Date: Fri, 16 Dec 2011 21:19:22 -0700

I'm finding inconsistent behavior with this feature. Sometimes the menu 
defaults to what I selected last boot, sometimes it doesn't. When it doesn't, 
it reverts to the first item in the list in each case. I'm suspecting it 
doesn't like the (recovery mode) options because so far it won't set any of 
those, unless I do it manually and then it promptly gets undone after a single 
boot.



On Dec 16, 2011, at 8:52 PM, Chris Murphy wrote:

> Based on the Grub2 manual, it is not clear to me how GRUB_SAVEDEFAULT=true 
> with GRUB_DEFAULT=saved options are supposed to work. The description for 
> GRUB_SAVEDDEFAULT says when true and when GRUB_DEFAULT=saved, that "when an 
> entry is selected, save it as a new default entry for use by future runs of 
> GRUB." It also says the option relies on the environment block.
> 
> 
> 1.
> /etc/default/grub contains
> 
> GRUB_DEFAULT=saved
> GRUB_SAVEDEFAULT=true
> 
> 2.
> I have run grub2-mkconfig -o /boot/grub2/grub.cfg. Header reads as follows.
> 
> ### BEGIN /etc/grub.d/00_header ###
> if [ -s $prefix/grubenv ]; then
>  load_env
> fi
> set default="${saved_entry}"
> if [ "${prev_saved_entry}" ]; then
>  set saved_entry="${prev_saved_entry}"
>  save_env saved_entry
>  set prev_saved_entry=
>  save_env prev_saved_entry
>  set boot_once=true
> fi
> 
> function savedefault {
>  if [ -z "${boot_once}" ]; then
>    saved_entry="${chosen}"
>    save_env saved_entry
>  fi
> }
> 
> 3.
> grub2-editenv list
> 
> <empty>
> The file exist, is 1024 bytes, but contains nothing according to this command.
> 
> 4.
> /boot/grub2 is on an ext4 volume.
> 
> 
> So I'm not sure what needs to be done to make it work.
> 
> System and version info:
> Fedora 16 x86_64
> GRUB2 1.99-13.fc6.x86_64
> 
> Any suggestions?
> 
> 
> Chris Murphy
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub




reply via email to

[Prev in Thread] Current Thread [Next in Thread]