From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d9wLg-0001FF-6t for mharc-grub-devel@gnu.org; Sun, 14 May 2017 12:26:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9wLd-0001Ev-Ek for grub-devel@gnu.org; Sun, 14 May 2017 12:26:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9wLc-0003YV-7Q for grub-devel@gnu.org; Sun, 14 May 2017 12:26:21 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:33172) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9wLb-0003XI-Vy for grub-devel@gnu.org; Sun, 14 May 2017 12:26:20 -0400 Received: by mail-pg0-x243.google.com with SMTP id s62so13769635pgc.0 for ; Sun, 14 May 2017 09:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wvAIFNggJyMOEcqE+5kRZxcFQZJpLSSlwvmZMvPif7Y=; b=BDsCHOnA8i27HMWNQeT4Xgq7zRq2hTOFAHRIMRKbwS8gl4LD1ujNlXWF241ct1B1o5 1SkgARV6uUQzsJDYg39MZ5E/Xaqykgq5T0rT8gFWhTmgNJW7Whrxs8LaFCaWt77Ud4oh yXuEf/K30D01IEWFHdLu9IyBCios/Rf5oYmC/C//wv/SoemxsmamaYk9Xu0n4QTH8Pkh p2shNFxXQWkg9vxB2KEnaluCx03us0q5Ba0spKmVibLOBPMeNlFNC6GvNerxux8A31zE 4h3wbMXPoscqprh9jLjXSvYuaPyxsSnGK/Yo63GyOVyOlFMOnGwDURb6ycg1rZooBeYC mVdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wvAIFNggJyMOEcqE+5kRZxcFQZJpLSSlwvmZMvPif7Y=; b=M6SYxLOFWYLDLx0SWGRT4FnkgVBLvGwdIZ83yVMhQ77CjdF0GwsmsIJzjcPoTgVJfl EQV2xLkuAFU1dOiGtYPJfXtRGuo31YP3iCtAfQWBfRxPy9Voyia2prAlh8DkZo885hZw 4/h2RTsq+1boaMxeV7xClRHKPr+MbJ5kkBkNrmrEKw7YlCXeeSp+th2p1jGq+H4BgEam 2yWn4eM0LTucj61EQBlDzb1KmpFvmvnFyf++RdloExynsDauaPo+mPbaQFedvwVw2Qlr gR2e9VlZyvD7FFvX2s+XUSq0b1dsi12AeCjNsLN3OOxomHCqRTGTZbS5aIw/ojJ9GLnG agwQ== X-Gm-Message-State: AODbwcC0Svl1ppsYVkzi3vkvhCHXqjvuk72ajoMnxlKSqLWFW5HfLmrc rI2031ctKpOlGA== X-Received: by 10.99.117.66 with SMTP id f2mr2086596pgn.58.1494779178766; Sun, 14 May 2017 09:26:18 -0700 (PDT) Received: from localhost.localdomain ([2601:602:9c01:e86a:2ec2:3a19:cd81:76ab]) by smtp.googlemail.com with ESMTPSA id s18sm16060921pfi.16.2017.05.14.09.26.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 09:26:17 -0700 (PDT) From: Nicholas Vinson To: grub-devel@gnu.org Cc: skenton@ou.edu Subject: [GRUB PARTUUID PATCH V4 0/3] Add PARTUUID detection support Date: Sun, 14 May 2017 09:26:10 -0700 Message-Id: X-Mailer: git-send-email 2.13.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 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, 14 May 2017 16:26:22 -0000 This is an updated patch set for PARTUUID support. I've retested against GRUB 2.03 and found no errors. Because including Steve Kenton's patches in the last iteration caused confusion, I have removed them from this version. I have also removed the flex-2.6.3 compatibility patch as flex-2.6.4 has been released and is not affected by the same issues. Thanks, Nicholas Vinson 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 (3): Update grub_gpt_partentry; centralize guid prints Add PARTUUID detection support to grub-probe Update grub script template files docs/grub.texi | 13 +++++++ 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 | 13 +++++-- 8 files changed, 101 insertions(+), 25 deletions(-) -- 2.13.0