[PATCH] update saved_entry only if --make-default specified

Gene Czarcinski gczarcinski at ec.rr.com
Sun Nov 16 06:11:17 UTC 2014


This is part 4 of a 4 part update to change what saved_entry in
/boot/grub2/grubenv means and how it gets updated.

The objective is to have things work as most, if not all, individuals
would expect them to work.  That is, boot the most recently installed kernel
unless I (the user) specify otherwise.

It is assumed that the menuentry definitions for new kernel installs will
continue to be added to the head (front) of the list in the 10_linux section
of /boot/grub/grub.cfg

1. Rather than trying to create some title for saved_entry, simply set
saved_entry=0 so that the most recently installed kernel is booted.
This patch to anaconda was submitted and accepted:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-May/011336.html
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-June/011369.html

2.  While the above patch is necessary, it is not sufficient and anaconda
needs to be changed so that /etc/sysconfig/kernel has UPDATEDEFAULT=no which
means not to updated saved_entry.  The patch has been submitted:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-October/014079.html

3.  The third patch is to new-kernel-pkg (grubby package) and was incorporated
into grubby-8.35-8 with commit 7d162cd9e524d4d1acb2002d4e8a6027e471269e.
This patch only sets --make-default if UPDATEDEFAULT-yes.

4. This update provides the forth part which updates grubby.c so that it will
only update saved_entry if --make-default is specified.

With UPDATEDEFAULT=no and saved_entry=0, kernel at the head of the list will
be booted.  And if the user sets saved_entry="<some_title_from_40_custom>" then
the menmuentry in 40_custom will be booted.

Gene Czarcinski (1):
  v3.1 update saved_entry only if --make-default specified

 grubby.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

-- 
1.9.3



More information about the anaconda-patches mailing list