From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1okn6I-0005ZB-GR for mharc-grub-devel@gnu.org; Tue, 18 Oct 2022 09:57:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okn6G-0005Rm-UZ for grub-devel@gnu.org; Tue, 18 Oct 2022 09:57:44 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:46620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okn6E-0001Gy-6U for grub-devel@gnu.org; Tue, 18 Oct 2022 09:57:44 -0400 Received: by mail-pj1-x1034.google.com with SMTP id t12-20020a17090a3b4c00b0020b04251529so14052774pjf.5 for ; Tue, 18 Oct 2022 06:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UB/TlnNYsdNPB64JcYN58oKOc/BijMwEPi/j10gC6mU=; b=DOfpZpkvwLL0QoaOZOMbcptHsCgdeop4zAPIoCfdcWrTtU4CCk0S01yi07lZCilLFw IH9N5p0ELman9A1Is4rG4iD97WR5e1pSvs+X0Zueky4feV4WLe53BQNs5bioVo5xFFOT Pmo9kB9gz/AXfeG4pmRqsgUN+73OJZV67mQNLyY3KvViTHxaqcEkTFqY+jzVMfolT32+ av//szEDB24IgsvDviYyn58IWukUU6BvC6yFO9wfI75Dv6GLVjSfxE03CT0OiiVmsQ23 FiEvlXy9IhPKfrw3lFgUnAFBbM8jS8i52AMwD3cVicH8WhsMnfpUlQ0krrWFQK2a7XH1 seVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UB/TlnNYsdNPB64JcYN58oKOc/BijMwEPi/j10gC6mU=; b=lP0BURzd0uBhDVHxfscnjyJ7awTu7ADkhRb4LJaD14HvUXaJc1NlEtqy8qj3aEqwQF J1kVRqkTPnmRifkkUgM8Y86vVp28WtaC3Uj8h5hVBBiTnsFY88Cmh70NEjAmj6seJUnw aWjkg8/JB/xPdSQkIUgNZH2TBb2wU+mgOym16629Kld4FuacA3JL8MYBN5P+SsE5sJpO nbPd9gEAFvQ31zpl7fLacuuwskzUlmWeR5x7CI+E+DFsx/G2/RHtI2uWqSBYHGkcI5tM tBJhBTUiNI3nu9HGEqdOLOW0Tm3zBME7l+7x28ntkHxBPO2oYSwzt6DjUFf37CUz/scE axHA== X-Gm-Message-State: ACrzQf2bAiNYOz0/AAhjI4Zq2tGGH1obD9eCEeLDQAwszFgCCsBeM8oF LxU54dlGCferKL3JMjLSYX0= X-Google-Smtp-Source: AMsMyM5KE8Pew8snuRuW41KbHugJ5K70JaRVKTiStYdtAFtcpyET6zZR9tkLt42iwt82AQr2C9a17Q== X-Received: by 2002:a17:902:7296:b0:180:1330:b3c0 with SMTP id d22-20020a170902729600b001801330b3c0mr3142346pll.170.1666101459718; Tue, 18 Oct 2022 06:57:39 -0700 (PDT) Received: from generichostname (136-25-1-99.cab.webpass.net. [136.25.1.99]) by smtp.gmail.com with ESMTPSA id p184-20020a625bc1000000b005618189b0ffsm9283724pfb.104.2022.10.18.06.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 06:57:39 -0700 (PDT) Date: Tue, 18 Oct 2022 06:57:36 -0700 From: Denton Liu To: Olaf Hering Cc: grub-devel@gnu.org, Daniel Kiper , Oskari Pirhonen , mathieu.desnoyers@efficios.com, rharwood@redhat.com, samuel.thibault@ens-lyon.org, debian-bsd@lists.debian.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars Message-ID: References: <20221017103532.845293-1-liu.denton@gmail.com> <20221018131235.5e70f0bc.olaf@aepfle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018131235.5e70f0bc.olaf@aepfle.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=liu.denton@gmail.com; helo=mail-pj1-x1034.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: , X-List-Received-Date: Tue, 18 Oct 2022 13:57:45 -0000 Hi Olaf, On Tue, Oct 18, 2022 at 01:12:35PM +0200, Olaf Hering wrote: > Mon, 17 Oct 2022 03:35:32 -0700 Denton Liu : > > > A user may wish to use an image that is not sorted as the "latest" > > version as the top-level entry. > > Correct. > > What is really required is some form of file pattern matching and to use --id= in "menuentry title" commands. > > That way one can have the "latest" of /boot/${short_pattern} as default entry, in case there are multiple variants of files matching ${short_pattern}. The pattern gets enabled with "grub-set-default pattern". If I'm understanding correctly, what you're proposing is a mechanism for setting the default entry. If I'm not mistaken, this seems like an orthogonal discussion to me. My patch proposes a method of setting the top-level menu entry while this method only sets the default entry, which may be hidden behind a submenu. In my case, I keep a LTS kernel as backup but primarily use the latest kernel as my daily driver. I only ever boot into the LTS kernel in case there are any breakages, which is quite rare. As such, while it is possible for me to configure my default to point within a submenu to the non-LTS kernel, it seems like a bad user experience for Grub to impose a top-level entry on the user, even if that entry is almost never used. Allowing users to configure the top-level entry to fit their needs would certainly make for happier users. Thanks, Denton