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

[Xen-devel] [XEN PATCH 0/3] read grubenv and set default from it


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "YOUNG, MICHAEL A." <m.a.young@xxxxxxxxxxxx>
  • Date: Fri, 25 Oct 2019 22:52:06 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=durham.ac.uk; dmarc=pass action=none header.from=durham.ac.uk; dkim=pass header.d=durham.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NRLI18g6UexQancK1ASjxVAK8n2RHs+RcegUGoiT9i0=; b=OgnrKaTVstmQHrzRt0uIhqeuVYdyARlqBeG/R9f34m8KfR0fvLkomgNwVNpmi+FG3CxEc04sRdhg7UKOCHPRyd3YmLs6C3C8O45+q2eLK5nnclx0GuN8o1DKTI/gex7JeJObQYDQNuiWln7R3LE9E1/Ve6hBwo7MkxkVgqS0XbxHQB1SeAlsYI0URP7W4YtTkNF4dtJcbu+USSzV2lWQmGbgUia1rT18uXaijKhcbnQ8/nruJ5I6lO1v3AsmhdZq17mvvARGxiL8y9Mgoe+WkRQGFOc4fQWR8AVo+hzu8SD/e+sWSNg3Rrfy+p9E3g7A5bi1kxP6EdgsgalSOHIKYg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JkpH8r/tVG8NAxu4JpDFNJrSaR3eKYsOUDxi5T2nq7u3LKXV5i6TX9vi0f7qoGUDyxBqvoNsyQBc884udZq4fhLcQQWobN19MM7XoOXQEgHqG1kgqtq95xSg2zsFpedonkOLKqqjiVxrHl1uznsUcUJNV/fCgJxAvWf38YtCG6RV6G7xK0BAkb1v4nx/DXjthRW3wdDspPjhOq905Y4oBpmpsq5kCW3r+kQ1vlWkvhuUQQQmF7HAznFeHDnWDjsArJcvDnd0CfhLm8Va93qcMiHBfcAr/oKzdhCLQaWYPZ8ughD2XLw+LcNZrI+xpz1ApV7hDfRscNu8k+crgqvDYg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=m.a.young@xxxxxxxxxxxx;
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "YOUNG, MICHAEL A." <m.a.young@xxxxxxxxxxxx>
  • Delivery-date: Fri, 25 Oct 2019 22:52:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVi4bTyBvpbwXj3ku6LOJzISE5Yg==
  • Thread-topic: [XEN PATCH 0/3] read grubenv and set default from it

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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.