From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2E46CA0ECB for ; Tue, 12 Sep 2023 02:55:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qftYN-0003oX-HM; Mon, 11 Sep 2023 22:55:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qftYM-0003oM-Fl for grub-devel@gnu.org; Mon, 11 Sep 2023 22:55:02 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qftYH-0004lT-41 for grub-devel@gnu.org; Mon, 11 Sep 2023 22:54:59 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-401b0d97850so56769825e9.2 for ; Mon, 11 Sep 2023 19:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694487295; x=1695092095; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=FaqOo6jyGoNvTRRA0Zs33X+DxAPOWvTh98nBCSC6bxs=; b=AwFjWxqrVUwdNeH9vCTFPoJQyw86c8oNN2Q4tQPm8KttYB/DcfMs9OawaXRaS8FrFo A5z0zz5U/DCUIqlUw/3oHS5KLExFIUP2pi2ZbCX1fi4kh2LUvXPoPwiAdx/To4Tpe9Qd OUnIFWO5agFZHXcTlFSEAnSAteU9COJvlQXxLozHrtaNXQ2xLfY8KZCxNVSKyO5if3cX DUGpuU87OXj+6JKJff5LMjYx8TsnAj/uM5HjACc7T0K0l+6T+wCnNJKyyx6oyQNJ9I7K QbEbpTStfFZDX6t4l0tKKCPJ7iO8ly5ry+NSQ1CtdH5CZujHJB72e0niXSVq7hJpDz74 sZKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694487295; x=1695092095; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FaqOo6jyGoNvTRRA0Zs33X+DxAPOWvTh98nBCSC6bxs=; b=aU2ADTrNmq3a4jaZBJZZ+XzxDB4DahPM4XwIbRXuBgHHs7pq5vHMJpdjc/yqbo1dfI uspeA77fDD2BGtn0UM9N3OXbQ+1RcZJcs0PW72g8SPsuT1zOQR9XUSXlVtto7tGFdfIb EBh/U8eMc1J4hAEJY7x2rvKEKFDMckc2Yz5e6JGd3HdnXEikAgavsTdELxeJMcOqlljJ MNvoL4Lk0BZjZZy5Yj7MW6b86qnBJLy+lqAPdFd3pEhCR3exWIheA9TuNZdA3FGfEgRP 7fjSFHB0oeIOLfHZxjNgZ9wRXJjpU5WPmOQGhGjp3kQ5Oy34hH/3IgM7DVS2WdbeWzDJ xj8Q== X-Gm-Message-State: AOJu0YzfgoYbwvMmOwD9T+59L9WxRq4lPXzbzIrNtQILXo9dKvZYNL1u 23FDFOLFbrA/njAFC2hiDL4I7CWbkcw= X-Google-Smtp-Source: AGHT+IE0HcrPLCe7uKs5ReGpTcrnZEh4sjgNEd0u/krF0+KBy7dyeayrRk3OgllxnmvlM1UZtVCoXA== X-Received: by 2002:a7b:cd12:0:b0:3fb:ff34:a846 with SMTP id f18-20020a7bcd12000000b003fbff34a846mr10080478wmj.22.1694487294924; Mon, 11 Sep 2023 19:54:54 -0700 (PDT) Received: from dj3ntoo (161.sub-97-139-114.myvzw.com. [97.139.114.161]) by smtp.gmail.com with ESMTPSA id ay7-20020a05600c1e0700b0040303a9965asm8643107wmb.40.2023.09.11.19.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 19:54:53 -0700 (PDT) Date: Mon, 11 Sep 2023 21:54:47 -0500 From: Oskari Pirhonen To: darkpenguin Cc: grub-devel@gnu.org Subject: Re: [PATCH] Add support for specifying the boot device by label Message-ID: Mail-Followup-To: darkpenguin , grub-devel@gnu.org References: <28419e65-2e40-a4a4-b94f-aeacd62715c7@posteo.de> <8b5065c5-3b54-5ca0-96ce-38710dd0e18e@posteo.de> MIME-Version: 1.0 In-Reply-To: <8b5065c5-3b54-5ca0-96ce-38710dd0e18e@posteo.de> Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=xxc3ncoredxx@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Content-Type: multipart/mixed; boundary="===============6571160665702548772==" Errors-To: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org Sender: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org --===============6571160665702548772== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rC8A/l671ommbmn4" Content-Disposition: inline --rC8A/l671ommbmn4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 11, 2023 at 06:48:58 +0000, darkpenguin wrote: > >> 3) I could not figure out how to source other variables from > >> /etc/defaults/grub and why not all of them are there. :) > >> > >=20 > > This looks to be in util/grub-mkconfig.in (lines 160-162 in git master > > at the time of writing): > >=20 > > if test -f ${sysconfdir}/default/grub ; then > > . ${sysconfdir}/default/grub > > fi > >=20 > > The vars then get exported further down (lines 213-258) before running > > the various config snippets: > >=20 > > # These are optional, user-defined variables. > > export GRUB_DEFAULT \ > > GRUB_HIDDEN_TIMEOUT \ > > GRUB_HIDDEN_TIMEOUT_QUIET \ > > GRUB_TIMEOUT \ > > GRUB_TIMEOUT_STYLE \ > > GRUB_DEFAULT_BUTTON \ > > # ... snip ... >=20 > Thanks for the explanation about the vars! I've found it. >=20 >=20 > >> The decision to reuse GRUB_DISABLE_LINUX_UUID was because: > >> 1) This is more of an addition on top of UUID rather than "disabling" > >> it, it still uses UUID internally, and it falls back to UUID > >> 2) I could not come up with a better way to do it > > > > I'm not a fan of overloading a "disable" var to mean "try something > > else first". Something like GRUB_DISABLE_LINUX_LABEL with the > > appropriate logic would make more sense IMO. >=20 > Then how should we do it? I wouldn't want this to be the default > behaviour - it's only useful in specific cases, so I think > GRUB_DISABLE_LINUX_LABEL is a bad idea. So then we have > GRUB_DISABLE_LINUX_UUID and GRUB_ENABLE_TRYING_LABEL_BEFORE_UUID, which > requires not disabling UUID. This looks much more like a mess. >=20 GRUB_DISABLE_LINUX_LABEL could be default-true if it's only useful in specific cases like you say. > My reasoning was: previously, we had two modes - "use UUID" and "don't > use UUID". Now we are introducing a third more - "try labels, then use > UUID". It feels like the mode should be controlled by one variable that > accepts one of three possible values. Since renaming the variable to > GRUB_LINUX_MODE would be too much of a breaking change, maybe we should > just make the old one accept one of three possible values? > - true - enable UUID > - LABEL - enable UUID, but try labels on top of UUID first > - anything else - don't use UUID >=20 > Maybe later we can figure out the best way to do this based on feedback, > but to minimize change when introducing a proof-of-concept feature, this > seems more appropriate, doesn't it? >=20 Is there a reason using labels can't be a separate third option? Completely distinct and not tied to UUID's at all. I haven't played around with it, whereas you probably have. If there isn't a need to have them together, then the third mode would be "use labels" (and possibly a fourth of "use labels or UUID's"). - Oskari --rC8A/l671ommbmn4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCZP/S8gAKCRCp8he9GGIf ETiLAP9FgzN+An1nQXKUtusxfu3riK91e7OftK/3NwBHGl7ZuAEAwjpqRkNuxF1C N6AzmPID1h6t+wWoNglsYzifHrWTqgM= =qqbE -----END PGP SIGNATURE----- --rC8A/l671ommbmn4-- --===============6571160665702548772== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR3J1Yi1kZXZl bCBtYWlsaW5nIGxpc3QKR3J1Yi1kZXZlbEBnbnUub3JnCmh0dHBzOi8vbGlzdHMuZ251Lm9yZy9t YWlsbWFuL2xpc3RpbmZvL2dydWItZGV2ZWwK --===============6571160665702548772==--