Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iBQR0-0007u9-LD for mharc-grub-devel@gnu.org; Fri, 20 Sep 2019 17:27:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50461) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBQQv-0007tw-VI for grub-devel@gnu.org; Fri, 20 Sep 2019 17:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBQQt-0004Kt-98 for grub-devel@gnu.org; Fri, 20 Sep 2019 17:27:17 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55430 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iBQQt-0004KW-0h for grub-devel@gnu.org; Fri, 20 Sep 2019 17:27:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569014834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6SOQsxxuQ1mMO4d+w/0RkdNXpsZ4ZUaGtXvYSDPtw+E=; b=ccTH4ZYj92FLi+DIKl31+RDh78aw7ZQWiUuSUXY+w4ZxuJw4fo5+RyrXVmvkQnlYo8xfWc clSMstgfQkM9N3fBCMh1uf3dcHjCOwursFLsP17AQatO/uGRIu438NNzdo2RhwyZe25aZR 1eaQrEnC/4ZnA+7jW6JFh1KM4zUDx6Q= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-QCVoSBfTPAqXEgGs4pBSgA-1; Fri, 20 Sep 2019 17:27:10 -0400 Received: by mail-wr1-f69.google.com with SMTP id f11so2737468wrt.18 for ; Fri, 20 Sep 2019 14:27:09 -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=oUrRXXiFacK7MuQD4CUF+HH7jRRmKFj4mvXY5WoqJQM=; b=Jf9o7Nh7aYq7UZka0dA74FK6j3fLXIVL0pYvZXiEo3naP3yHREkT27Q9LIUElVbTlz 07ayCVhdTYjK7cuA5wUYp9EJcXaubD4CFEyAC7jWjvTlhixExs5TpfDLMEKBI47Q3NTb vaIVwUkaEFplCY3n+Y3XCNCfHenwcYA8L69O//m93offul4HQ2UQyelgRLv+UdGESi6n eKNucuT8JMAWS+ymiVcuobNmZH2eY649pUkiGduEs6UrJxLMiVWbS82CYl9psgSN/sFC wC23OEJtTEoadnKd+wZS3xktDwOtZQz+FcppdqVYtt/99TX+Omb5yAxWaL7MieLeUA1e AWPw== X-Gm-Message-State: APjAAAXBKeGTj04VF9QYvha++YreTF6UwbR17Y16IviZdFjnTd0f+bws MGDuAe3fEG6SydrYjKjW3eJY6NJC5byZyk+5xTgxJSQfjNpWZ9HiDxYDp+gmju0C+gouXt70cB5 eiuNWElXhZUk= X-Received: by 2002:a05:600c:2108:: with SMTP id u8mr5080564wml.13.1569014828900; Fri, 20 Sep 2019 14:27:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrQOeYl9CCXO5zUd+BdpU7FMeGQ0D9ldaT91gQJJ4YinwRKpaIeEXAyqKbgOsU6ShRJSkv8Q== X-Received: by 2002:a05:600c:2108:: with SMTP id u8mr5080555wml.13.1569014828616; Fri, 20 Sep 2019 14:27:08 -0700 (PDT) Received: from [192.168.1.13] ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id j26sm4781161wrd.2.2019.09.20.14.27.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Sep 2019 14:27:07 -0700 (PDT) Subject: Re: [PATCH] Add GRUB_DISABLE_UUID. To: The development of GNU GRUB , Didier Spaier Cc: Jacob Kroon 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> <981d70e1-62c4-5a82-254c-f6198a94c880@slint.fr> From: Javier Martinez Canillas Message-ID: <7c527cda-77c9-5463-e472-a4ec9cc6ac8d@redhat.com> Date: Fri, 20 Sep 2019 23:27:06 +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: <981d70e1-62c4-5a82-254c-f6198a94c880@slint.fr> Content-Language: en-US X-MC-Unique: QCVoSBfTPAqXEgGs4pBSgA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 207.211.31.120 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 21:27:21 -0000 On 9/20/19 5:03 PM, Didier Spaier wrote: > On 20/09/2019 15:23, Javier Martinez Canillas wrote: >> On 9/20/19 2:42 PM, Daniel Kiper wrote: >>> On Thu, Sep 19, 2019 at 02:20:06PM +0200, Javier Martinez Canillas wrot= e: >>>> 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 wr= ote: >>>>>> From: Peter Jones >>>>>> >>>>>> This will cause "search --fs-uuid --set=3Droot ..." not to be genera= ted by >>>>>> grub2-mkconfig, and instead simply attempt to use the grub device na= me >>>>>> 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 i= nstead >>>> of a UUID or a device name, by using the grub-probe --target=3Dpartuui= d option. >>>> >>>> But Peter's patch is about setting the root param to a device name ins= tead >>>> 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_UUI= D 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 t= he search >> command only has support to search using the UUID and not the PARTUUID. >=20 > It has support to search using the PARTUUID in case of a GPT, cf. commit > f2b9083f859c7dbf44a7a8e96ee0cf202f9a4187 > I see. I missed that commit since is newer than grub-2.04 which is what we are using as the base for our package now. But that commit adds PARTUUID support to the probe command, not the search command. We can later add a GRUB_DISABLE_PARTUUID variable to disable the search using a PARTUUID, once the search command gets a --part-uuid option and a command using that option is added to grub.cfg to search the devices. > As an aside, it would be very useful to extend this support to dos > partition tables. I believe that all partition tools create a disk > identifier when creating a dos partition table (at least fdisk, cfdisk > and parted do) so if I am not mislead-ed all dos partitions should have > a partuuid in the form DisklabelPartitionnumber. > > This would allow e.g. to find the root Linux partitions from a rescue > media, even if the kernel has no associated initrd. > Agreed. Best regards, --=20 Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat