Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ci93q-0005sb-Tv for mharc-grub-devel@gnu.org; Sun, 26 Feb 2017 19:21:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci93n-0005qn-Vf for grub-devel@gnu.org; Sun, 26 Feb 2017 19:21:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci93m-0007rZ-SE for grub-devel@gnu.org; Sun, 26 Feb 2017 19:21:03 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:32924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ci93m-0007r4-AQ for grub-devel@gnu.org; Sun, 26 Feb 2017 19:21:02 -0500 Received: by mail-pg0-x242.google.com with SMTP id 5so10829499pgj.0 for ; Sun, 26 Feb 2017 16:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=/uUdfwxpEVAOWchARkXBqjLVQ/x5nT09Gv6Jbmiqn/I=; b=bvhHeHkoSGuQK1HFmui40GFIt7Q9XB456sg8GETA3Zmu8lufKlNZTgojLMSPaTIY7E NtvOB1bpt7Bjc9JBBHpDacCGhXYcm2/83wtL2nJ4ewVokxheC/CJu5deRXTIR38Z9qT9 jstzNyWpZ+GSFO575Fb6TOqEzUAPK0x2Bk95OQ5EQNK/Htr+S7cVXKPoT/wb+ut3vvdV ulihRWbyypU8liHW6fk2Xp21HRF3mU8GDO9FZgRtiAZyZ7Q23bKE1k9sur6oPJqpGP2X iATvQfGWPR/yxaYGIJAsvIj392Zes5ZNjR9ptlDjApIduuezDWbTw9U9Nnde0tsUzM9A h04w== 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=/uUdfwxpEVAOWchARkXBqjLVQ/x5nT09Gv6Jbmiqn/I=; b=ujfI745cnGRJohyVLCgZXwt8Mo6q6p6WV2q3KUe3ONyuRxEz68xlwpPEPv2IHeTEjX mK3YqENtBOV5vlQ/lEFBFh4L2rSzjM7dkfG4TZunj26+n53eVnsh022TggoWZf6CeIeP dYcD6TouFG2ReGKF3mKhBvCPvLsqwWSNSZ+XQ1viHlfrjzr7lx62XsodklpYnA6WjEpJ kTW6YYFu6leogtS9G6pPM+fRPMnHu86LcSpJLDExVgtxBUr52Pe+8xJnu07gLlPGtMaL mi8fknvUb2tEpD3Qd68tfPwkTtN5PX+lJfBgTXjDu79EzgW59nbXSxppJ3L/UeLQkmpl Qa/A== X-Gm-Message-State: AMke39kjRGevJ+95w+KOoYu+18YQK09foZ64pfnhU677T/J1wjIHPJ9mGpaL3XohS0SL3A== X-Received: by 10.99.144.73 with SMTP id a70mr9005391pge.187.1488154859892; Sun, 26 Feb 2017 16:20:59 -0800 (PST) Received: from localhost.localdomain ([2601:602:9c01:e86a:1fb0:47b:8245:c067]) by smtp.googlemail.com with ESMTPSA id u82sm26523453pfd.7.2017.02.26.16.20.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Feb 2017 16:20:58 -0800 (PST) From: Nicholas Vinson To: skenton@ou.edu, grub-devel@gnu.org Subject: [GRUB PARTUUID PATCH V3 0/5] Add PARTUUID detection support Date: Sun, 26 Feb 2017 16:20:50 -0800 Message-Id: <20170227002055.5829-1-nvinson234@gmail.com> X-Mailer: git-send-email 2.12.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::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: Mon, 27 Feb 2017 00:21:05 -0000 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): Fix flex-2.6.3 incompatbility issue Add PARTUUID detection support to grub-probe Update grub script template files Harmonize patches Steve Kenton (1): Support both EFI and NT Disk Signature for passing to kernel as root=PARTUUID=$val docs/grub.texi | 13 +++++++ grub-core/commands/probe.c | 78 ++++++++++++++++++++++++++++++++++++++++++ grub-core/disk/ldm.c | 2 +- grub-core/partmap/gpt.c | 4 +-- grub-core/script/yylex.l | 22 +++++++++--- 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 | 13 +++++-- 10 files changed, 197 insertions(+), 29 deletions(-) -- 2.12.0