On 12/3/17, John Little <[email protected]> wrote:
> Hi
>
> I think this is properly a CentOS issue; different distros handle this
> differently. At the top of grub.cfg there's a loadenv command that reads
> variables from /boot/grub/grubenv, including saved_entry and next_entry.
> These appear to reset the default.

Thanks.

It occurred to me, after writing that first mail, that for some reason
there might not be a "default" entry in this situation.  I had looked
at the 'grubenv' file and seen that (at least while the system was
running) there was always a 'saved_entry' defined.  So I didn't
initially consider the possibility that 'default' might be undefined
or point to a nonexistent entry.

But maybe, for some reason, the grubenv file can't be read following a
power failure?  Would grub refuse to load the file if the filesystem
appears "dirty"?  (/boot is XFS in this case, BTW.)

What I ended up doing was, in /etc/default/grub, changing GRUB_DEFAULT
from 'saved' to '0' (and then running grub2-mkconfig to regenerate
grub.cfg.)  I also added 'GRUB_TIMEOUT_STYLE=countdown' just in case.

I can... sort of... understand the motivation behind making 'saved'
the default, but for servers it seems like a bad idea in any case.

Benjamin

_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to