Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iNSaQ-0003Np-Hi for mharc-grub-devel@gnu.org; Wed, 23 Oct 2019 22:10:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51799) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNSaN-0003Mj-W2 for grub-devel@gnu.org; Wed, 23 Oct 2019 22:10:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNSaM-0000vd-DR for grub-devel@gnu.org; Wed, 23 Oct 2019 22:10:47 -0400 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]:43022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNSaM-0000u6-8n for grub-devel@gnu.org; Wed, 23 Oct 2019 22:10:46 -0400 Received: by mail-qk1-x742.google.com with SMTP id a194so17817999qkg.10 for ; Wed, 23 Oct 2019 19:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=rRB1PlsJsUBQKic2NrysugJy0dx2xEKPxgzs9rQqH68=; b=W345JfRrwFWXK2Ob+1Dh5MGzYswwr4eGdiYj2h6vD2pwGRZuPCJ2K2aCxPoFAeT8f9 FWfaVc8hlWoWyRnDrPTcLjgaN+gM652pN2DvNXAYZ+hQhD8cd9PJHgVvLqI6xvbqz+Jk QSlErMyZuPgtPh6wGY/Expeo8MgDkQaZ/y3mgO6JWE3qwDtxYLUy1phBObfagtmC/SXj oFLPkoTxWHfDT725k08sw+NDwdd6NONUyE52qHgReLQa9MOp7f3EGwpXIWCFnS8rv/FX Hk2vN5xLTge3dBaMf8N55ggnRjE3mGAY34EftzM4l9ioBrnfj1azMsBBRyfdCl1kx8C1 aLYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rRB1PlsJsUBQKic2NrysugJy0dx2xEKPxgzs9rQqH68=; b=X9MBTw8yI8XTeU8cCZDgTqMXkknQqPvuHwX4DMh/3/F3X3ov1jEnASgKRwxx6sww2W DGabvpMXeoTf0ZEzmljbySdGdWyhcrKN8ajspiUlaX2SammL8xy9aN6Ukm2vitxHUxHW RGSr7FHbgiaUtxVH8TNCGQrh/X9ishKm9tkjIXoWyGN5dH9bVQj0hTLr/2gJuwIqJO0y y0v5sYMGzCEGzbWqkvqtb4uHUOduxXdk+fN0YJmbONzVWUWFownAWWFzKWxQ1zWZ6Rpx w9jN47f3bDC9mOlVBXkZrhqFy2Net5IcZ+90JLskVUz+vdWC5jdhfW72r5+UA43isMWO en1w== X-Gm-Message-State: APjAAAWRydm/Tf5aAlQoSnnVjQgyPazTySwSBVSoNNx4IuuL8LNF6RRd k6p0glG5TJFl6daL1joWSDHCn7HU X-Google-Smtp-Source: APXvYqybpM7QHDiNdBOw1jBmA08915uLVpaF0hLZN74o0KWLi6vjQsVil4Wmb4HMbSVZOLorgeTxzQ== X-Received: by 2002:a05:620a:208a:: with SMTP id e10mr11920504qka.189.1571883044044; Wed, 23 Oct 2019 19:10:44 -0700 (PDT) Received: from ?IPv6:2606:a000:111d:3fe:ecd4:961c:ab13:f3a0? (cpe-2606-A000-111D-3FE-ECD4-961C-AB13-F3A0.dyn6.twc.com. [2606:a000:111d:3fe:ecd4:961c:ab13:f3a0]) by smtp.gmail.com with ESMTPSA id a18sm2882848qkc.2.2019.10.23.19.10.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Oct 2019 19:10:43 -0700 (PDT) Subject: Re: [PATCH v3] Add GRUB_DISABLE_UUID To: grub-devel@gnu.org References: <20191022084428.5974-1-javierm@redhat.com> <20191023085500.7a36kkljuliufsgt@tomti.i.net-space.pl> From: Nicholas Vinson Message-ID: <928b4940-e904-4d69-dae6-b80788a03853@gmail.com> Date: Wed, 23 Oct 2019 22:10:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191023085500.7a36kkljuliufsgt@tomti.i.net-space.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::742 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2019 02:10:49 -0000 On 10/23/19 04:55, Daniel Kiper wrote: > Adding Nicholas... > > On Tue, Oct 22, 2019 at 10:44:28AM +0200, Javier Martinez Canillas wrote: >> From: Peter Jones >> >> The grub-mkconfig and 10_linux scripts by default attempt to use a UUID to >> set the root kernel command line parameter and the $root GRUB environment >> variable. >> >> The former can be disabled by setting the GRUB_DISABLE_LINUX_UUID variable >> to "true", but there is currently no way to disable the latter. >> >> The generated grub config uses the search command with the --fs-uuid option >> to find the device that has to be set as $root, i.e: >> >> search --no-floppy --fs-uuid --set=root ... >> >> This is usually more reliable but in some cases it may not be appropriate, >> so this patch introduces a new GRUB_DISABLE_UUID variable that can be used >> to disable searching for the $root device by filesystem UUID. >> >> When disabled, the $root device will be set to the value specified in the >> device.map as found by the grub-probe --target=compatibility_hint option. >> >> When setting GRUB_DISABLE_UUID=true, the GRUB_DISABLE_LINUX_UUID and >> GRUB_DISABLE_LINUX_PARTUUID variables will also be set to "true" unless >> these have been explicitly set to "false". >> >> That way, the GRUB_DISABLE_UUID variable can be used to force using the >> device names for both GRUB and Linux. >> >> Signed-off-by: Peter Jones >> Signed-off-by: Javier Martinez Canillas >> Reviewed-by: Daniel Kiper > > Nicholas, are you OK with that patch right now? If yes and you could > add your RB that would be perfect. I don't see any issues. Looks good to me. "Reviewed-by: Nicholas Vinson " Thanks, Nicholas Vinson > >> --- >> >> Changes in v3: >> - Make the patch more consistent with the logic in commit 51be3372ec8 >> ("templates: Update grub script template files"). >> - Add Reviewed-by tag from Daniel Kiper. >> >> Changes in v2: >> - Explain better in the commit message why the GRUB_DISABLE_UUID variable >> is needed and the difference with the existing GRUB_DISABLE_LINUX_UUID/ >> GRUB_DISABLE_LINUX_PARTUUID variables. >> - Remove logic that disabled setting the root cmdline param to either the >> filesystem UUID or partition UUID and instead use the existing variables >> to disable this. >> >> docs/grub.texi | 9 +++++++++ >> util/grub-mkconfig.in | 10 ++++++++++ >> util/grub-mkconfig_lib.in | 4 ++-- >> 3 files changed, 21 insertions(+), 2 deletions(-) >> >> diff --git a/docs/grub.texi b/docs/grub.texi >> index d788efe440f..c25ab7a5fe7 100644 >> --- a/docs/grub.texi >> +++ b/docs/grub.texi >> @@ -1441,6 +1441,15 @@ enable the use of partition UUIDs, set this option to @samp{false}. >> If this option is set to @samp{true}, disable the generation of recovery >> mode menu entries. >> >> +@item GRUB_DISABLE_UUID >> +Normally, @command{grub-mkconfig} will generate menu entries that use >> +universally-unique identifiers (UUIDs) to identify various filesystems to >> +search for files. This is usually more reliable, but in some cases it may >> +not be appropriate. To disable this use of UUIDs, set this option to >> +@samp{true}. Setting this option to @samp{true}, will also set the options >> +@samp{GRUB_DISABLE_LINUX_UUID} and @samp{GRUB_DISABLE_LINUX_PARTUUID} to >> +@samp{true}, unless they have been explicilty set to @samp{false}. >> + >> @item GRUB_VIDEO_BACKEND >> If graphical video support is required, either because the @samp{gfxterm} >> graphical terminal is in use or because @samp{GRUB_GFXPAYLOAD_LINUX} is set, >> diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in >> index a6ce375ed18..fb7fd4902f4 100644 >> --- a/util/grub-mkconfig.in >> +++ b/util/grub-mkconfig.in >> @@ -158,6 +158,15 @@ if test -f ${sysconfdir}/default/grub ; then >> . ${sysconfdir}/default/grub >> fi >> >> +if [ "x${GRUB_DISABLE_UUID}" = "xtrue" ]; then >> + if [ -z "${GRUB_DISABLE_LINUX_UUID}" ]; then >> + GRUB_DISABLE_LINUX_UUID="true" >> + fi >> + if [ -z "${GRUB_DISABLE_LINUX_PARTUUID}" ]; then >> + GRUB_DISABLE_LINUX_PARTUUID="true" >> + fi >> +fi >> + >> # XXX: should this be deprecated at some point? >> if [ "x${GRUB_TERMINAL}" != "x" ] ; then >> GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}" >> @@ -227,6 +236,7 @@ export GRUB_DEFAULT \ >> GRUB_DISABLE_LINUX_UUID \ >> GRUB_DISABLE_LINUX_PARTUUID \ >> GRUB_DISABLE_RECOVERY \ >> + GRUB_DISABLE_UUID \ > > I will move this before GRUB_DISABLE_LINUX_UUID before committing. > I hope this is not a problem for you. > > Daniel > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >