From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bErI7-0000CW-RX for mharc-grub-devel@gnu.org; Mon, 20 Jun 2016 00:58:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEoAK-0002YB-Te for grub-devel@gnu.org; Sun, 19 Jun 2016 21:38:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEoAI-0007My-RD for grub-devel@gnu.org; Sun, 19 Jun 2016 21:38:15 -0400 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]:34232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEoAI-0007Mq-KP for grub-devel@gnu.org; Sun, 19 Jun 2016 21:38:14 -0400 Received: by mail-pa0-x244.google.com with SMTP id us13so9762630pab.1 for ; Sun, 19 Jun 2016 18:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Yt4JxPSB8+tvUXaQoplLi4yaAdli6gBRZ4tN+lZoku0=; b=0vFPQsOFbY/4q8L/prDluOMhOeyB7eb8HA4kYFuFXATbZkNJ93tKWvGIAZJxainDcj xT6QZo9V+ybqJfNgLR6R6BX9N5jsGOFpLie5Rn98Zlf9JEvXH5NNF4j81Ovwnl3xruCq +U7YPELwV3HcfvNKpNcBg9m/IdARjiLerMq0dArPAwn24msMkl5SEJysvFx6GXpgilCN o3nQjSfKbATk9p2uVvEwLL15ltLGXoNZcwH9ZwNdQSkSQ5KU6y1FzhgW8Q8IIhc6zZSd Rn1jJ+YU5AVmrZUJf/ySECKB3we6QT9mlvP3AGSpj+obttOiloV2WJubMuvXzl203fQo RRmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Yt4JxPSB8+tvUXaQoplLi4yaAdli6gBRZ4tN+lZoku0=; b=eibAZPWPuimqQUJIDjygnNbyqzIs2zmqhTj36fP8fKzDxcWSKQNawOU4DPBMC6whOw QmPAuzMQR3R9618dNLe+cg1hyNgtsCRR256/GdJFltr9MiMhCuMnZexTBijtbd+tD80/ 8JrncF0a0a+/R5KzopgAD7EGjlf8LtGo+yUyThHc1w50Vl8x2f2kCf5Y2VpbP2K3gPP7 oKNsQBK3nMhZHIGC31/0VdSVF2N5C3D0zCyHq9nCrenZN8EEVeciIVUGCk6lJUDAKC4O QQNq8lt1LIrlgoBqk0HdXKQ5kpVTmG+c60+lSiA2F8PnX/ZYwKeLTg7+DIG4DP6q3CHP rgtw== X-Gm-Message-State: ALyK8tIzDk3aG3Mc1aW7B5GgqUs0MFfimjJDzNpMsFd/edqmru4nmA5Y1U3G3jq/1Lb/Vw== X-Received: by 10.66.222.202 with SMTP id qo10mr18208655pac.141.1466386693706; Sun, 19 Jun 2016 18:38:13 -0700 (PDT) Received: from localhost.localdomain ([2601:602:9c00:cf41:a15c:1ca:cdf1:57a3]) by smtp.googlemail.com with ESMTPSA id 81sm62391443pfo.74.2016.06.19.18.38.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Jun 2016 18:38:13 -0700 (PDT) From: Nicholas Vinson To: grub-devel@gnu.org Cc: Nicholas Vinson Subject: [GRUB PARTUUID PATCH 2/2] Update grub script template files Date: Sun, 19 Jun 2016 18:37:48 -0700 Message-Id: X-Mailer: git-send-email 2.9.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::244 X-Mailman-Approved-At: Mon, 20 Jun 2016 00:58:26 -0400 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, 20 Jun 2016 01:38:18 -0000 Update grub-mkconfig.in and 10_linux.in to support grub-probe's new partuuid target. Signed-off-by: Nicholas Vinson --- util/grub-mkconfig.in | 2 ++ util/grub.d/10_linux.in | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index f8496d2..fc42462 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -134,6 +134,7 @@ fi # Device containing our userland. Typically used for root= parameter. GRUB_DEVICE="`${grub_probe} --target=device /`" GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true +GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true # Device containing our /boot partition. Usually the same as GRUB_DEVICE. GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`" @@ -182,6 +183,7 @@ if [ "x${GRUB_ACTUAL_DEFAULT}" = "xsaved" ] ; then GRUB_ACTUAL_DEFAULT="`"${grub # override them. export GRUB_DEVICE \ GRUB_DEVICE_UUID \ + GRUB_DEVICE_PARTUUID \ GRUB_DEVICE_BOOT \ GRUB_DEVICE_BOOT_UUID \ GRUB_FS \ diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index de9044c..8081fdb 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -220,8 +220,15 @@ while [ "x$list" != "x" ] ; do gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2 elif test -z "${initramfs}" ; then # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's - # no initrd or builtin initramfs, it can't work here. - linux_root_device_thisversion=${GRUB_DEVICE} + # no initrd or builtin initramfs, it can't work here. However, if + # GRUB_DEVICE_PARTUUID is not empty we can use that here if + # GRUD_DISABLE_LINUX_UUID is not set to true. + if [ "x${GRUB_DISABLE_LINUX_UUID}" != "xtrue" ] + && [ "x${GRUB_DEVICE_PARTUUID}" != "x" ]; then + linux_root_device_thisversion="PARTUUID=${GRUB_DEVICE_PARTUUID}" + else + linux_root_device_thisversion=${GRUB_DEVICE} + fi fi if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then -- 2.9.0