From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1exddI-0006SO-Dv for mharc-grub-devel@gnu.org; Sun, 18 Mar 2018 15:06:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exddF-0006Rk-Vu for grub-devel@gnu.org; Sun, 18 Mar 2018 15:06:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exddE-0007rR-PC for grub-devel@gnu.org; Sun, 18 Mar 2018 15:06:13 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:39195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1exddE-0007qS-IB for grub-devel@gnu.org; Sun, 18 Mar 2018 15:06:12 -0400 Received: by mail-pf0-x242.google.com with SMTP id u5so6161579pfh.6 for ; Sun, 18 Mar 2018 12:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=vqA4vx69hkVW1IwJRIXAsGdHsPdhz1xhFSM2prwrxLA=; b=gd2ukiZHRf98x9GsvybG5qMEhIJPJPwHbY0v8T0IEaUBWyeX0Tu/BM1/XNkZBKOFid 0cnFjf1ZHBE7MXnGX3udDCTqv+Kz7tMYEcwNRU2ezmhhvpekNZFrQTGZxouEHDSKOI7V SmC7yGxy9Q016mOjX7kEEkEPG/Bri+MGhw4kIQDkWpbjVcvX/b7xltvR7pT3WQrHqaR1 pzU0gz4KgEZp+mTJnjh7dqv7Rg7/RmVN7S73/La8rTuroSIX9S/wVTOgacHgEYYcVun/ mZ+/1Ef9H6dsWTPRpew90QKTrdwbNrRI2QRIt9fYiDUFlwbyxuKIllzH9hOosXtprqFT eYvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=vqA4vx69hkVW1IwJRIXAsGdHsPdhz1xhFSM2prwrxLA=; b=inaKLidWYR1Po7p7qJjC2Feyhcd7xk+Wxq9tL2UV+SMTst0+ZYidmPMwvHNnKIryHD pDWj7EmkH+8OHMMqK9D6Bv0nutU9rxWwXMH3SkKKCuyagaoiKnwJMCL0P2w46vdZUUxF U2NJG1nksbSAkhl67I/llaLE31kFRnp3eRq9PjXTztpGFkZM46ASSAGYdN0mOjT1kjxs +39B4G0TNpKr1KXJ085PjF7mRxcjjnbGEYn32g9rySaJy2lZFxhXiFEJKjvkDrFM5oHx q8t9KUYRyzInbG6vPM150ARQ7AxYwgDFj12wbgBvmdgPcw3wbdTMssJuJOTYW4higY04 VPVA== X-Gm-Message-State: AElRT7HAdhRcOAdOmjMpWEqaMnbAHAXe+sHVkQARWhgi3WdfK6qZPV+2 QxWF/SEqYN3ercRpmEYcPzjISw== X-Google-Smtp-Source: AG47ELutC2fOqtBmmqAQfVy/t6EKEaVbFsjkQcMVBL2dlvvT9t/YrIcPFWwvnCCdRSu/pP5TwB2YNQ== X-Received: by 10.99.124.92 with SMTP id l28mr7125949pgn.51.1521399970687; Sun, 18 Mar 2018 12:06:10 -0700 (PDT) Received: from localhost.localdomain ([2601:602:9c01:e86a:2ec2:3a19:cd81:76ab]) by smtp.googlemail.com with ESMTPSA id 188sm18706437pfe.93.2018.03.18.12.06.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Mar 2018 12:06:09 -0700 (PDT) From: Nicholas Vinson To: grub-devel@gnu.org Subject: [GRUB PARTUUID PATCH V6 0/4] Add PARTUUID detection support Date: Sun, 18 Mar 2018 12:05:59 -0700 Message-Id: X-Mailer: git-send-email 2.16.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 19:06:15 -0000 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 (4): Centralize guid prints Update grub_gpt_partentry 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/grub-mkconfig.in | 3 ++ util/grub-probe.c | 81 ++++++++++++++++++++++++++++++++++++-------- util/grub.d/10_linux.in | 12 +++++-- 8 files changed, 95 insertions(+), 26 deletions(-) -- 2.16.2