Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iBIt5-0004Fm-Fq for mharc-grub-devel@gnu.org; Fri, 20 Sep 2019 09:23:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53749) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBIt3-0004F5-0d for grub-devel@gnu.org; Fri, 20 Sep 2019 09:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBIt1-00060g-0o for grub-devel@gnu.org; Fri, 20 Sep 2019 09:23:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52962) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iBIt0-0005yH-M7 for grub-devel@gnu.org; Fri, 20 Sep 2019 09:23:46 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3FA2983F3C for ; Fri, 20 Sep 2019 13:23:44 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id n3so1222479wmf.3 for ; Fri, 20 Sep 2019 06:23:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZqZKLDp2Yw4qASL5Dw2+FdMuHiXzKSYoFhacNjgUT34=; b=WSN2VS4mbzm8+TpT8wk5J24bSLoifpZoeNan9oEzxjksqY7ksVnnqgj0LhiEGIMF+b f+YZGP58gsDh6hNbuAz6+S36o7V1xAp1gBoYR+D51ywzzvc4RA/nEAik/3iAKBAW/0pt djoFyTJhU0SOEq83kkKmBQc3MD4uY1fpsv++3GT6Kru+sXzp8mDeOF0bJNE5h+ZFcUIM 49UtCyMeR9v3fEWt6QMxnqKfaoQWmrzFyX98vNo8Pn3khHNsBH4h7piqHwJOX6ZM4EHX a6ZmYNBwEV87BnmKY8FLN/Bhh2j6EMuHAfcZ0+bikM2xnPOG+g1iglMD6mX5GuPI45Pp lFmQ== X-Gm-Message-State: APjAAAW9dUxqevW1Uli6MAlkgc3wvvBqRlLKQ1UDKe3dKpnj340F4xmi I/htebl3XKtari3hyabNQlbS998jAgJ+8XxwzDi0KYVYqSd/iw9XpV+TXcfZCE1tOJTcVmJYQ8i LfiY+LR5cQ0o= X-Received: by 2002:a5d:69c7:: with SMTP id s7mr5367436wrw.295.1568985823013; Fri, 20 Sep 2019 06:23:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxvviXSi/vNQbg2zIrnyuVAbdFr5MThJ7ixM9dFGlowUmcXzNSj7om+MD9+HndjAsSSNh3Bw== X-Received: by 2002:a5d:69c7:: with SMTP id s7mr5367424wrw.295.1568985822819; Fri, 20 Sep 2019 06:23:42 -0700 (PDT) Received: from [192.168.1.13] ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id l10sm2664040wrh.20.2019.09.20.06.23.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Sep 2019 06:23:42 -0700 (PDT) Subject: Re: [PATCH] Add GRUB_DISABLE_UUID. To: Daniel Kiper Cc: nvinson234@gmail.com, grub-devel@gnu.org, Peter Jones , Vladimir Serbinenko References: <20190917154845.1937-1-javierm@redhat.com> <20190918123909.gkwdjrlqj65jcrkn@tomti.i.net-space.pl> <07dd1b5f-797b-627a-d47d-28b0048ac204@redhat.com> <20190920124219.6gflaua6od6jjexw@tomti.i.net-space.pl> From: Javier Martinez Canillas Message-ID: Date: Fri, 20 Sep 2019 15:23:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190920124219.6gflaua6od6jjexw@tomti.i.net-space.pl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 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: Fri, 20 Sep 2019 13:23:50 -0000 On 9/20/19 2:42 PM, Daniel Kiper wrote: > On Thu, Sep 19, 2019 at 02:20:06PM +0200, Javier Martinez Canillas wrote: >> Hello Daniel, >> >> On 9/18/19 2:39 PM, Daniel Kiper wrote: >>> Adding Nicholas... >>> >>> On Tue, Sep 17, 2019 at 05:48:45PM +0200, Javier Martinez Canillas wrote: >>>> From: Peter Jones >>>> >>>> This will cause "search --fs-uuid --set=root ..." not to be generated by >>>> grub2-mkconfig, and instead simply attempt to use the grub device name >>>> as it understands it. >>>> >>>> Signed-off-by: Peter Jones >>>> Signed-off-by: Javier Martinez Canillas >>> >>> We have this functionality in GRUB upstream. Please take a look at >>> commit 51be3372e (templates: Update grub script template files). >>> Could you pick it up in RH/Fedora? >>> >> >> That commit does something different if I'm reading it correctly. It's about >> allowing to set the root kernel command line parameter to a PARTUUID instead >> of a UUID or a device name, by using the grub-probe --target=partuuid option. >> >> But Peter's patch is about setting the root param to a device name instead >> of a UUID. >> >> And also about not adding search commands in the grub.cfg to set the $root >> and $boot grub environment variables by searching using a UUID. >> >> Now digging more I found that there's already a GRUB_DISABLE_LINUX_UUID option > > There are two variables: GRUB_DISABLE_LINUX_UUID and GRUB_DISABLE_LINUX_PARTUUID. > Yes. I didn't mention the GRUB_DISABLE_LINUX_PARTUUID variable because the search command only has support to search using the UUID and not the PARTUUID. >> for the first part, so we only need to add an option for the second part. > > OK. > >> Since this is not about Linux not using a UUID but grub not using it, I think >> that we should add another option as this patch does. So GRUB_DISABLE_LINUX_UUID >> would disable using a UUID for the root param and GRUB_DISABLE_UUID would be >> about disabling using a UUID to set the $root (and $boot) variables in grub. >> >> GRUB_DISABLE_UUID=true probably should imply GRUB_DISABLE_LINUX_UUID=true also > > OK but only if GRUB_DISABLE_LINUX_UUID is not set explicitly. And what > about GRUB_DISABLE_LINUX_PARTUUID? > That's a good question. Would disabling using UUID mean "always use device name for both GRUB and Linux" or "don't use the filesystem UUID for both GRUB and Linux but allow Linux to use the partition UUID" ? Peter's patch does the former. And yes, agreed that setting GRUB_DISABLE_LINUX* to true should only be done if they weren't explicitly set. >> I think. But I guess is OK to have separate options and the user could set both >> if want to disable using the UUID for Linux and grub. >> >> Another option is to extend GRUB_DISABLE_LINUX_UUID semantics and don't add >> search commands if this is set to true, but I'm not sure if that's correct. > > Hmmm... Probably I prefer former approach... Agreed. I also prefer to introduce a new variable for this. > > Daniel > Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat