All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Vinson <nvinson234@gmail.com>
To: grub-devel@gnu.org
Subject: [GRUB PARTUUID PATCH V9 0/5] Add PARTUUID detection support
Date: Sat,  7 Apr 2018 16:28:09 -0700	[thread overview]
Message-ID: <cover.1523131110.git.nvinson234@gmail.com> (raw)

Changes from Patch v8:
    - Renamed GRUB_ENABLE_LINUX_PARTUUID to GRUB_DISABLE_LINUX_PARTUUID
    - Updated the 10_linux logic so GRUB_ENABLE_LINUX_PARTUUID and
        GRUB_ENABLE_LINUX_UUID would behave more independently.
    - Documented interactions of GRUB_DISABLE_LINUX_UUID,
        GRUB_DISABLE_LINUX_PARTUUID, and initramfs detection in commit
        message.
    - Added optional patch that sets GRUB_DISABLE_LINUX_PARTUUID to true
        by default.
    - Fixed merge conflicts between this patchset and upstream's master
        branch.

Changes from Patch v7:
    - Changed checks in probe_partuuid() to use the variable 'p' instead
      of disk->partition
    - Moved 'disk->partition = p;' assignment to inside the
        'p & p->parent == NULL' statement
    - Moved 'disk->partition = p->parent;' assignment to before partmap
          name checks.
    - Fixed formatting issues.
    - Copied Daniel Kiper's reviewed-by line to unaltered patches.

Changes from Patch v6:
    - Corrected spelling and grammatical errors in description text for
      GRUB_ENABLE_LINUX_PARTUUID
    - Moved disk->partition save & restore logic to beginning and end of
      probe_partuuid()
    - Fixed formatting errors in probe_partuuid

Changes from Patch v5:
    - Added sign-off by lines
    - Fixed formatting errors found by Daniel Kiper

Changes from Patch v4:
    - Updated grub.texi to reflect new behavior for
      GRUB_ENABLE_LINUX_PARTUUID

    - Updated 10_linux.in logic to favor the PARTUUID when
      GRUB_ENABLE_LINUX_PARTUUID is enabled and GRUB_DISABLE_LINUX_UUID
      is disabled.

Changes from Patch v3:
    - Removed flex-2.6.3 compatibility patch

    - Removed Steve Kenton's patch

Changes from Patch v2:
    - Added flex-2.6.3 compatibility patch

    - Fixed a GPT partition read error

    - Added Steve Kenton's patch

    - Changed struct grub_part_gpt_type name to struct
      grub_part_gpt_part_guid

    - Changed grub_part_gpt_type_t typedef name to grub_part_gpt_guid_t

    - Added sprint_gpt_guid to Steve Kenton's patch

    - Updated v1 and Steve Kenton's patch to use similar methods when
      reading partition GUIDs.

Changes from Patch v1:
    - Added GRUB_ENABLE_LINUX_PARTUUID variable description to grub.texi

    - Removed added gpt_part_guid copy logic from
      grub_gpt_partition_map_iterate()

    - Removed added NT disk signature copy logic from
      grub_partition_msdos_iterate()

    - Removed modifications to partition number increment logic

    - Removed added guid union definition.

    - Added GRUB_ENABLE_LINUX_PARTUUID to grub-mkconfig.in export list

    - Moved PRINT_GPT_PARTTYPE printing logic to print_gpt_guid()
      function in grub-probe.c

    - Updated PRINT_GPT_PARTTYPE case to call print_gpt_guid() function
      in grub-probe.c.

    - Created probe_partuuid() function in grub-probe.c

    - Updated print == PRINT_PARTUUID check logic in probe() to call
      probe_partuuid().

    - Updated UUID logic in 10_linux.in to enable root=PARTUUID feature
      only if GRUB_DISABLE_LINUX_UUID is not set to true,
      and GRUB_DEVICE_PARTUUID is not empty, GRUB_ENABLE_LINUX_PARTUUID
      is set to true.

Hello,

This is a request to add PARTUUID detection support grub-probe for MBR
and GPT partition schemes.  The Linux kernel supports mounting the root
filesystem by Linux device name or by the Partition [GU]UID.  GRUB's
mkconfig, however, currently only supports specifying the rootfs in the
kernel command-line by Linux device name unless an initramfs is also
present.  When an initramfs is present GRUB's mkconfig will set the
kernel's root parameter value to either the Linux device name or to the
filesystem [GU]UID.

Therefore, the only way to protect a Linux system from failing to boot
when its Linux storage device names change is to either manually edit
grub.cfg or /etc/default/grub and append root=PARTUUID=xxx to the
command-line or create an initramfs that understands how to mount
devices by filesystem [G]UID and let grub-mkconfig pass the filesystem
[GU]UID to the initramfs.

The goal of this patch set is to enable root=PARTUUID=xxx support in
grub-mkconfig, so that users don't have to manually edit
/etc/default/grub or grub.cfg, or create an initramfs for the sole
purpose of having a robust bootloader configuration for Linux.

Thanks,
Nicholas Vinson

Nicholas Vinson (5):
  Centralize guid prints
  Update grub_gpt_partentry
  Add PARTUUID detection support to grub-probe
  Update grub script template files
  Default to disabling partition UUID support

 docs/grub.texi               | 11 +++++++
 grub-core/disk/ldm.c         |  2 +-
 grub-core/partmap/gpt.c      |  4 +--
 include/grub/gpt_partition.h |  8 ++---
 util/grub-install.c          |  2 +-
 util/grub-mkconfig.in        |  3 ++
 util/grub-probe.c            | 76 +++++++++++++++++++++++++++++++++++---------
 util/grub.d/10_linux.in      | 22 +++++++++++--
 8 files changed, 102 insertions(+), 26 deletions(-)

-- 
2.16.3



             reply	other threads:[~2018-04-07 23:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-07 23:28 Nicholas Vinson [this message]
2018-04-07 23:28 ` [GRUB PARTUUID PATCH V9 1/5] Centralize guid prints Nicholas Vinson
2018-04-07 23:28 ` [GRUB PARTUUID PATCH V9 2/5] Update grub_gpt_partentry Nicholas Vinson
2018-04-07 23:28 ` [GRUB PARTUUID PATCH V9 3/5] Add PARTUUID detection support to grub-probe Nicholas Vinson
2018-04-07 23:28 ` [GRUB PARTUUID PATCH V9 4/5] Update grub script template files Nicholas Vinson
2018-04-10 20:52   ` Daniel Kiper
2018-04-11  3:00     ` Nick Vinson
2018-04-11  8:31       ` Daniel Kiper
2018-04-11 14:45         ` Nick Vinson
2018-04-16 11:47           ` Daniel Kiper
2018-04-17  5:34             ` Nick Vinson
2018-04-07 23:28 ` [GRUB PARTUUID PATCH V9 5/5] Default to disabling partition UUID support Nicholas Vinson
2018-04-10 20:56 ` [GRUB PARTUUID PATCH V9 0/5] Add PARTUUID detection support Daniel Kiper
2018-04-11  3:02   ` Nick Vinson

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.1523131110.git.nvinson234@gmail.com \
    --to=nvinson234@gmail.com \
    --cc=grub-devel@gnu.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.