From: "YOUNG, MICHAEL A." <m.a.young@durham.ac.uk>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>,
"YOUNG, MICHAEL A." <m.a.young@durham.ac.uk>
Subject: [Xen-devel] [XEN PATCH 0/3] read grubenv and set default from it
Date: Fri, 25 Oct 2019 22:52:06 +0000 [thread overview]
Message-ID: <cover.1572038720.git.m.a.young@durham.ac.uk> (raw)
This series of patches is to improve the parsing by pygrub of grub
configuration on Fedora. The current result of parsing is generally
that the second kernel listed is set as the default due to a
set default=1 line in grub.cfg which is only intended to be
reached after repeated boot failures.
The patches read the grubenv file (which consists of key=value lines
padded to 1024 characters by # characters) to get the values of
next_entry and saved_entry, which can be a kernel string or an
order number. Unfortunately, for Fedora 31 at least, this is
often a BLS-style string so it isn't necessarily useful. The patches
use the value of next_entry or of saved_entry to set the default
kernel or sets it to the first kernel listed if those values are set
but not used.
Michael Young (3):
set default kernel from grubenv next_entry or saved_entry
read a grubenv file if it is next to the grub.cfg file
Example Fedora 31 grub.cfg and grubenv files
tools/pygrub/examples/fedora-31.grub.cfg | 200 +++++++++++++++++++++++
tools/pygrub/examples/fedora-31.grubenv | 5 +
tools/pygrub/src/GrubConf.py | 31 +++-
tools/pygrub/src/pygrub | 21 ++-
4 files changed, 253 insertions(+), 4 deletions(-)
create mode 100644 tools/pygrub/examples/fedora-31.grub.cfg
create mode 100644 tools/pygrub/examples/fedora-31.grubenv
--
2.21.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2019-10-25 22:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 22:52 YOUNG, MICHAEL A. [this message]
2019-10-25 22:52 ` [Xen-devel] [XEN PATCH 1/3] set default kernel from grubenv next_entry or saved_entry YOUNG, MICHAEL A.
2019-10-28 16:38 ` Ian Jackson
2019-10-25 22:52 ` [Xen-devel] [XEN PATCH 2/3] read a grubenv file if it is next to the grub.cfg file YOUNG, MICHAEL A.
2019-10-28 16:41 ` Ian Jackson
2019-10-25 22:52 ` [Xen-devel] [XEN PATCH 3/3] Example Fedora 31 grub.cfg and grubenv files YOUNG, MICHAEL A.
2019-10-28 16:41 ` Ian Jackson
2019-10-26 11:38 ` [Xen-devel] [XEN PATCH 0/3] read grubenv and set default from it Steven Haigh
2019-10-26 16:00 ` YOUNG, MICHAEL A.
2019-10-27 13:07 ` Steven Haigh
2019-10-28 1:04 ` Steven Haigh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1572038720.git.m.a.young@durham.ac.uk \
--to=m.a.young@durham.ac.uk \
--cc=ian.jackson@eu.citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.