Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iBLjP-0000ri-PT for mharc-grub-devel@gnu.org; Fri, 20 Sep 2019 12:26:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53799) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBLjL-0000lY-9F for grub-devel@gnu.org; Fri, 20 Sep 2019 12:26:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBLjJ-000281-NP for grub-devel@gnu.org; Fri, 20 Sep 2019 12:25:59 -0400 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:40248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBLjJ-00027q-J7 for grub-devel@gnu.org; Fri, 20 Sep 2019 12:25:57 -0400 Received: by mail-qt1-x843.google.com with SMTP id x5so9315739qtr.7 for ; Fri, 20 Sep 2019 09:25:56 -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=mT+ik3x3sGGK1+D+vzPfyS1Nrrg91PoSeo9mL9pJ+lE=; b=pQRXCPIcovrA3sEzQ+zXeB4V5VyMfcQP+rhUjwZlzV2VgfLAd3UZr87VnNZWHDw43d 1G3zWlpVsVNXtTBa8wwTSh+kzKi5dYEMAzUVO31zMFpLQNx4yhbh8RcKdkktyzHHKAEq w88yiHpF8TysaKg/8kecvhy9lr6y5+i0rCI1QU0rwyqEU5voW/RM34gfm1QFhjD3g1f5 upATOElovwCGlKU7neysQWccbrHliKEVpp082AFyq1oxNm0oK3qMH8DcjRRufw8/ajTL SMj20JLh6ZOOoPjpOfYdg3+TvYdVqVHs6Lfxvo7y53VptOsnca3zHSdLd/wNKaUmDR5W 3/WA== 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=mT+ik3x3sGGK1+D+vzPfyS1Nrrg91PoSeo9mL9pJ+lE=; b=XAR9h3NuojUf5ETcIUXRlsdGQAnRN+sRWMLVB2A9Kh13uYgXbRfOfcq9DrvEk7XR33 u447Dtvu73BqfkCJBzOMuadhJFrWnf+YZxfTSdg1cIwJf/5qv/5yqfVJ9LZ9QQmQ49o2 Rn/Fbk9ywhSV8wdd4g5a7bMF1fV/pf0Bb5+bUFjxSa0OE3RlnolNGdmi5/zGTmbSQDKX 6l67akaReM7PKHUvBwdphZLIbhHJSb5/TJUxp0ZdnkZHTRr50PY4rcCR21sr/RmweC66 2gQ06oDRytnl1I2Ep98kO9KDJtAAajud+LkfNC7k9RoI8vWM/f90VBJrHOnjSsf3TykG ronw== X-Gm-Message-State: APjAAAULjkOZppgDzWZh4xBBpdLi1fc2E08BzGGHLS0pxUXwwBcGzy5n 5IxoV4TTiYu+OSqyVyq3skWpHJ+w X-Google-Smtp-Source: APXvYqxZrZghhrGynOqEMUFeLRhY22VsLKn2sTT0lDn30AIFQdRzyP7rQ+vwnZud6iQ3VfFuXjISAA== X-Received: by 2002:ac8:4a12:: with SMTP id x18mr4121675qtq.84.1568996755947; Fri, 20 Sep 2019 09:25:55 -0700 (PDT) Received: from ?IPv6:2606:a000:111d:3fe:3806:10d:d948:445f? (cpe-2606-A000-111D-3FE-3806-10D-D948-445F.dyn6.twc.com. [2606:a000:111d:3fe:3806:10d:d948:445f]) by smtp.gmail.com with ESMTPSA id z141sm1260088qka.126.2019.09.20.09.25.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2019 09:25:55 -0700 (PDT) Subject: Re: [PATCH] Add GRUB_DISABLE_UUID. To: grub-devel@gnu.org 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: Nicholas Vinson Message-ID: <820adfee-520d-a373-40e4-e8f94312242f@gmail.com> Date: Fri, 20 Sep 2019 12:25:53 -0400 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-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::843 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 16:26:01 -0000 On 9/20/19 11:03, 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 >>> 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. > > It has support to search using the PARTUUID in case of a GPT, cf. commit > f2b9083f859c7dbf44a7a8e96ee0cf202f9a4187 > > 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. > > Maybe Jacob could propose a patch for that, as he did for gpt? I have a patch for that. I just have not tested it yet. Thanks, Nicholas Vinson > >>>> 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, > > Best regards, > > Didier > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel