[Top][All Lists]

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

[GRUB PARTUUID PATCH V5 0/3] Add PARTUUID detection support

From: Nicholas Vinson
Subject: [GRUB PARTUUID PATCH V5 0/3] Add PARTUUID detection support
Date: Sun, 4 Feb 2018 11:47:34 -0800

One new update for this patch series.  This update allows for the
partition UUID to be unconditionally passed via the kernel root=... boot

I have tested this patch using a setup similar to the one described by
[1].  This could also be done by embedding the code inside the kernel
image.  However, updating the microcode via initramfs allows the
microcode to be updated independently of kernel updates.  However, there
doesn't seem to be any standard naming scheme for the microcode
initramfs, so I chose not to include that change in this patch set.

Nicholas Vinson


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

    - Updated logic to favor the PARTUUID when
      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

    - 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

    - Removed added NT disk signature copy logic from

    - Removed modifications to partition number increment logic

    - Removed added guid union definition.

    - Added GRUB_ENABLE_LINUX_PARTUUID to 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

    - Updated UUID logic in to enable root=PARTUUID feature
      only if GRUB_DISABLE_LINUX_UUID is not set to true,
      is set to true.


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.

Nicholas Vinson

Nicholas Vinson (3):
  Update grub_gpt_partentry; centralize guid prints
  Add PARTUUID detection support to grub-probe
  Update grub script template files

 docs/grub.texi               |  9 +++++
 grub-core/disk/ldm.c         |  2 +-
 grub-core/partmap/gpt.c      |  4 +--
 include/grub/gpt_partition.h |  8 ++---
 util/grub-install.c          |  2 +-
 util/        |  3 ++
 util/grub-probe.c            | 81 ++++++++++++++++++++++++++++++++++++--------
 util/grub.d/      | 12 +++++--
 8 files changed, 95 insertions(+), 26 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]