Re: Better handle systemd-boot and installkernel changes in HB

Immolo <[email protected]> Sun, 30 Nov 2025 21:16:31 +0000
Newsgroups gmane.linux.gentoo.documentation
Message-ID <CAHfWF5nQ9k+BBdRFfTMA3KCOJk1dfAbGhfCGLD9deuNgqxnHmA@mail.gmail.com>
--0000000000000ab6dc0644d66103
Content-Type: text/plain; charset="UTF-8"

Hi,

Apologies on the delay, it's been one of those months!

I have been about to use this time to follow how the newer community
members interact with the HB and then use that with guidance that
Nowa has provided.

For ease I'm just going to show how this change works with
systemd-boot as adding all together just adds confusion

https://wiki.gentoo.org/wiki/User:Immolo/Sandbox/SDboot

I'll fluff it up to match the HB standards, however this has
been repeatedly proven to solve the detection issue and
the new user trap, where users got lost between how the
OpenRC and systemd options began and ended.

If happy I will proceed to clean up each section and how
they interact with later parts f the HB.

Kind regards

immolo

On Sat, 8 Nov 2025 at 18:01, Nowa Ammerlaan <[email protected]> wrote:

> On 08/11/2025 18:36, Immolo wrote:
> >  > I agree, this should not be required, if /etc/kernel/cmdline is
> present
> >  >> then the check will pass.
> >
> >  > The path is also different for systemd kernel-install versus
> > installkernel.
> >
> > Oh that explains why I originally read your chroot warning as vague
> before.
> >
> > I'll update once we have agreed on how we want  it to look.
> >
> >>>
> >>> Note I can live with us mentioning this suppression file but I just
> want
> >>> to be clear on why we're doing it.
> >>>
> >>>>   This gives systemd-boot a blank kernel cmdliine to use rather than
> using the installcd's cmdine and gets around the
> >>>>   chroot check if the user
> >>>>>   decides to use ~ARCH.
> >>>>
> >>>>   For GRUB:
> >>>>
> >>>>     Create the following to pass chroot checks for
> {{Package|sys-kernel/installkernel}}:
> >>>>        touch /etc/kernel/install.d/05-check-chroot.install
> >>>>
> >>> I'm not following this bit.. can't we just disable the check for grub
> >>> instead somehow?
> >
> >  > It is disabled for grub (or well it should be, that is how I intended
> > for this to work).
> >
> > The disabled check is currently not working, So far confirmed by a user
> > on Reddit
> > and on my test VM.
> >
> > As I didn't understand why your code isn't working yet, I opted to
> > handle this in the
> > cleanup pass (It's how we deal with major faults in telecoms and I just
> > noticed today
> > I apply this logic in Gentoo bugs I deem major.)
> >
>
>
> I think we are conflating two (unfortunately separate things), there's
> the check for the dracut cmdline (which runs if dracut is selected):
> /etc/cmdline(.d) or dracut.conf and the check for systemd-boot/ukify
> (which runs if layout is bls type 1 or type 2): /etc/*kernel/*cmdline.
> The latter is the one that I was talking about here and it should not
> run for grub (since the layout is set to something else)
>
> I hate that these two paths are different, but there is unfortunately
> nothing I can do about that. I think the user on Reddit was hitting the
> other check for dracut. But I'd have to see logs to be sure.
>
> Best regards,
> Nowa
>
>
>
>

--0000000000000ab6dc0644d66103
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,</div><div><br></div><div>Apologies on the delay, =
it&#39;s been one of those months!</div><div><br></div><div>I have been abo=
ut to use this time to follow how the newer community</div><div>members int=
eract with the HB and then use that with guidance=C2=A0that=C2=A0</div><div=
>Nowa has provided.</div><div><br></div><div>For ease I&#39;m just going to=
 show how this change=C2=A0works with</div><div>systemd-boot as adding=C2=
=A0all together=C2=A0just adds confusion</div><div><br></div><div><a href=
=3D"https://wiki.gentoo.org/wiki/User:Immolo/Sandbox/SDboot">https://wiki.g=
entoo.org/wiki/User:Immolo/Sandbox/SDboot</a></div><div><br></div><div>I&#3=
9;ll fluff=C2=A0it up to match the HB standards, however this has=C2=A0</di=
v><div>been repeatedly=C2=A0proven to solve the detection issue and=C2=A0</=
div><div>the new user trap, where users got lost between how the=C2=A0</div=
><div>OpenRC and systemd options began and ended.</div><div><br></div><div>=
If happy I will proceed to clean up each section and how=C2=A0</div><div>th=
ey interact=C2=A0with later parts f the HB.</div><div><br></div><div>Kind r=
egards</div><div><br></div><div>immolo</div></div><br><div class=3D"gmail_q=
uote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, 8=
 Nov 2025 at 18:01, Nowa Ammerlaan &lt;<a href=3D"mailto:[email protected]">n=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">On 08/11/2025 18:36, Immolo wrote:<br>
&gt;=C2=A0 &gt; I agree, this should not be required, if /etc/kernel/cmdlin=
e is present<br>
&gt;=C2=A0 &gt;&gt; then the check will pass.<br>
&gt; <br>
&gt;=C2=A0 &gt; The path is also different for systemd kernel-install versu=
s <br>
&gt; installkernel.<br>
&gt; <br>
&gt; Oh that explains why I originally=C2=A0read=C2=A0your chroot warning a=
s vague before.<br>
&gt; <br>
&gt; I&#39;ll update=C2=A0once we have agreed=C2=A0on how we want=C2=A0 it =
to look.<br>
&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Note I can live with us mentioning this suppression file but I=
 just want<br>
&gt;&gt;&gt; to be clear on why we&#39;re doing it.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0This gives systemd-boot a blank kernel cmdliin=
e to use rather than using the installcd&#39;s cmdine and gets around the<b=
r>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0chroot check if the user<br>
&gt;&gt;&gt;&gt;&gt;=C2=A0 =C2=A0decides to use ~ARCH.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0For GRUB:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0Create the following to pass chroot che=
cks for {{Package|sys-kernel/installkernel}}:<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 touch /etc/kernel/install.d/05-=
check-chroot.install<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt; I&#39;m not following this bit.. can&#39;t we just disable the=
 check for grub<br>
&gt;&gt;&gt; instead somehow?<br>
&gt; <br>
&gt;=C2=A0 &gt; It is disabled for grub (or well it should be, that is how =
I intended<br>
&gt; for this to work).<br>
&gt; <br>
&gt; The disabled check is currently not working, So far confirmed by a use=
r <br>
&gt; on Reddit<br>
&gt; and on my test VM.<br>
&gt; <br>
&gt; As I didn&#39;t understand why your code isn&#39;t working yet, I opte=
d to <br>
&gt; handle this in the<br>
&gt; cleanup pass (It&#39;s how we deal with major faults in telecoms and I=
 just <br>
&gt; noticed today<br>
&gt; I apply this logic in Gentoo bugs I deem major.)<br>
&gt; <br>
<br>
<br>
I think we are conflating two (unfortunately separate things), there&#39;s =
<br>
the check for the dracut cmdline (which runs if dracut is selected): <br>
/etc/cmdline(.d) or dracut.conf and the check for systemd-boot/ukify <br>
(which runs if layout is bls type 1 or type 2): /etc/*kernel/*cmdline. <br>
The latter is the one that I was talking about here and it should not <br>
run for grub (since the layout is set to something else)<br>
<br>
I hate that these two paths are different, but there is unfortunately <br>
nothing I can do about that. I think the user on Reddit was hitting the <br=
>
other check for dracut. But I&#39;d have to see logs to be sure.<br>
<br>
Best regards,<br>
Nowa<br>
<br>
<br>
<br>
</blockquote></div>

--0000000000000ab6dc0644d66103--