Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oe9uk-0006ay-Sc for mharc-grub-devel@gnu.org; Fri, 30 Sep 2022 02:54:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oe9ue-0006am-Id for grub-devel@gnu.org; Fri, 30 Sep 2022 02:54:20 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:47058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oe9ua-0008V8-VE for grub-devel@gnu.org; Fri, 30 Sep 2022 02:54:19 -0400 Received: by mail-wr1-x42c.google.com with SMTP id bk15so5333664wrb.13 for ; Thu, 29 Sep 2022 23:54:07 -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 :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date; bh=g9I7dkfSoxAZFnPhra0zDnep0lrzG5FefIkjf0oFmOE=; b=pMD6Q2n5FDo2Sao4k17vTwdDlEH7fiZZL8ZvZT47uJvDlUsXawAgTIwBJwZ4049wai e2g0B/O3SpdIZWW4inzc+f7RHbht4YuztdZgHp+MHdEvZlMflkJSrnVNnSGOILA/9JNw q82z6pTGfMuDnJee09YIX4AOwm5mWyeD+lDywH0X42aBAuU7+AyqvaEbqaqKpflLeFGz CjI3WeqrJLIJ+SN7vwSp7efFhVu2JgrgmvADKeeN7VtBejygTI0TS77C+sFm6b++mi6O z3q+JDGtcf/kREgzdPw5suVVWTqZRu512Gu/81RXBZc+slbXdM2Z5Zd6E8ztflxJ86f5 96AA== 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 :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=g9I7dkfSoxAZFnPhra0zDnep0lrzG5FefIkjf0oFmOE=; b=mBGS0Yt4jVhuyWYOxJceZtFlLfF3rWZBpK3qLKrz6v8x9IoAPjm1VcmrLLTf9SjMsS vR6D/VEenhKBvlVO9wWCsVxLeoat57dvNNy1gByAMSEixErW5pdIQ1gMuHLNdUT9eEXv zswp22ITAHnzJoGTzDa3INvsH1/RpALPwrijEvn8B/A/RatRT3d8mHimvSqSlbwE10fT Qrl1dp4xbPL/M+h16Feji5yE5y9L37BEg0DlplVEThCMfOdSPlSfAUCteQKsXDEvnEh6 IxUYtcxCT6wBtR8rvbPqYTXewDsygenwSWQhdZyOx7mrKQQ7OMJhnZunAmoiMdKKW0Bk x83w== X-Gm-Message-State: ACrzQf3RANH6OJs3Xdd+Ny7mFvPAw73ILn4N4+YG3UB/+mjpnf2uSDdK LBiK2+4SWmoj0Wlm/XDUwZ3gtfyIC3I= X-Google-Smtp-Source: AMsMyM6erBB/61ezTRBdu1qrzZeEmuCEFlKuMQhKbBqx8FPSQP36biu+0xexlpZu7LN6u3rviKPUDQ== X-Received: by 2002:a05:6000:1acb:b0:22a:d11b:5eb9 with SMTP id i11-20020a0560001acb00b0022ad11b5eb9mr4758141wry.492.1664520845800; Thu, 29 Sep 2022 23:54:05 -0700 (PDT) Received: from dj3ntoo (171.sub-72-110-15.myvzw.com. [72.110.15.171]) by smtp.gmail.com with ESMTPSA id m21-20020a056000025500b00224f7c1328dsm1198982wrz.67.2022.09.29.23.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 23:54:04 -0700 (PDT) Date: Fri, 30 Sep 2022 01:53:59 -0500 From: Oskari Pirhonen To: The development of GNU GRUB Cc: Daniel Kiper , Denton Liu Subject: Re: [RESEND RESEND RESEND PATCH] templates: introduce GRUB_TOP_LEVEL_* vars Message-ID: Mail-Followup-To: The development of GNU GRUB , Daniel Kiper , Denton Liu References: <20220921112225.145616-1-liu.denton@gmail.com> <20220927123045.100271-1-liu.denton@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1mscpm0CpYhnqZ2N" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=xxc3ncoredxx@gmail.com; helo=mail-wr1-x42c.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: Fri, 30 Sep 2022 06:54:21 -0000 --1mscpm0CpYhnqZ2N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 29, 2022 at 03:23:07 -0700, Denton Liu wrote: > Thanks for the response, Oskari! >=20 > On Thu, Sep 29, 2022 at 01:08:03AM -0500, Oskari Pirhonen wrote: > > On Tue, Sep 27, 2022 at 05:30:45 -0700, Denton Liu wrote: > > > A user may wish to use an image that is not sorted as the "latest" > > > version as the top-level entry. For example, in Arch Linux, if a user > > > has the LTS and regular kernels installed, `/boot/vmlinuz-linux-lts` > > > gets sorted as the "latest" compared to `/boot/vmlinuz-linux`. Howeve= r, > > > a user may wish to use the regular kernel as the default with the LTS > > > only existing as a backup. > > >=20 > > > Introduce the GRUB_TOP_LEVEL_LINUX and GRUB_TOP_LEVEL_XEN variables to > > > allow users to specify the top-level entry. > > >=20 > >=20 > > A couple questions: > >=20 > > - If all you're looking for is /boot/vmlinuz-linux to be booted, is > > setting GRUB_DEFAULT in /etc/default/grub "good enough" for your use > > case? >=20 > I think it is "good enough" for what I need but it feels a little bit > weird that grub doesn't give the user any choice as to what the > top-level kernel is. >=20 Perhaps no one has felt the need up until now ;) > > - Is it possible to make this solution more universal? Maybe BSD users > > would like to set their top level entry. >=20 > I'm not too familiar with what end-users might want. If we want to make > this more universal, we could either do GRUB_TOP_LEVEL_KERNEL and have > that shared amongst all of the 10_* files or we could have multiple > variables, e.g. GRUB_TOP_LEVEL_LINUX, GRUB_TOP_LEVEL_BSD, etc. >=20 A single GRUB_TOP_LEVEL or something is what I was thinking. I'm not familiar with Xen, but based on your original patch, it may warrant its own. > > - What about for os-prober? My understanding is that it creates its own > > top level entries as well. >=20 > The same thing could work with os-prober, although it wouldn't be a > cut-and-paste. >=20 os-prober would probably have its own GRUB_TOP_LEVEL_OS_PROBER or something as well. > I'm open to all ideas here and I can cook up the patches. The thing is > that I'm not sure what the project's conventions are regarding > too-granular/not-granular-enough configurations so some advice here > would be very much appreciated! >=20 Generating a config for multiple OS's would use os-prober, so a single "main" variable for top level entries would be simpler and should be enough IMO. - Oskari --1mscpm0CpYhnqZ2N Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCYzaSgQAKCRCp8he9GGIf EdQQAP9gthHsDQZzQD/FdOHGbyMC66TkvuTNQj/koJLA/oWorwEA91r0ZY+kFup5 r80NN3y3XuQ0cbISkAiWVuLEzKcBago= =oIVs -----END PGP SIGNATURE----- --1mscpm0CpYhnqZ2N--