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

Immolo <[email protected]> Tue, 2 Dec 2025 10:50:27 +0000
Newsgroups gmane.linux.gentoo.documentation
Message-ID <CAHfWF5msRjqg4erWLirxhcgE3Qf464vR-nZyHRJX1-Lr=aWp7g@mail.gmail.com>
--000000000000c5f7470644f5dd1d
Content-Type: text/plain; charset="UTF-8"

On Tue, 2 Dec 2025 at 10:40, Nowa Ammerlaan <[email protected]> wrote:

> On 02/12/2025 11:26, Immolo wrote:
> > Thanks, this was my understanding of the code.
> >
> >     If you've configured the kernel installation to use
> systemd-boot/ukify
> >     *and* dracut, *with* hostonly_cmdline=yes (the default) then the
> check
> >     will check for presence of *both* files.
> >
> >
> > My idea with the HB is to flowchart the solutions as I don't see another
> > way of handling it right now.
> >
> > i.e.: Use openrc -> dracut -> systend-boot = /etc/cmdline
> > Use systemd -> dracut -> systemd-booot = /etc/kernel/cmdline
>
> But in this configuration the user needs to set both of those files.
> Otherwise the script will complain (or it should, if it does not then
> that is a bug I need to fix). So if a new user follows these
> instructions they will be faced with a complaint about a missing
> /etc/cmdline for the systemd case, and a missing /etc/kernel/cmdline for
> the openrc case.
>
>
Ah that's why we are on different pages, currently you only need one of the
files to be set not both which is why my solution only includes one.


> Alternatively we could instruct the user to symlink one to the other, or
> disable hostonly_cmdline (which is what I do on my systems).
>

My thought was to get the user to symlink here so the user has one less
thing
to worry about.


> > This was part of the reason why I stuck to just using SD-boot while we
> > discuss, as it gets real confusing when you start summarising so many
> > different options.
> >
> > Does this general idea sound workable to you?
> >
> >     We could patch dracut to use the same file to make things less
> >     confusing, but this would be a breaking change for some users.
> >
> >
> > It's a shame we can't just symlink the two files as it would make
> > all this so much simpler.
>
> Well, we can, but we would then be potentially overwriting existing
> config files with a symlink. I don't think
> portage+etc-update/dispatch-conf can handle that.
>

I meant presetup if I wasn't clear, the issue of course doing that means
the file exists and the chroot script becomes pointless.

I'll do some tests on distpatch-conf and seeing I can break it/


> >
> >
> > Kind regards,
> >
> > immolo
>
>

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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, 2 Dec 2=
025 at 10:40, Nowa Ammerlaan &lt;<a href=3D"mailto:[email protected]">nowa@ge=
ntoo.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex">On 02/12/2025 11:26, Immolo wrote:<br>
&gt; Thanks, this was my understanding of the code.<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0If you&#39;ve configured the kernel installation to=
 use systemd-boot/ukify<br>
&gt;=C2=A0 =C2=A0 =C2=A0*and* dracut, *with* hostonly_cmdline=3Dyes (the de=
fault) then the check<br>
&gt;=C2=A0 =C2=A0 =C2=A0will check for presence of *both* files.<br>
&gt; <br>
&gt; <br>
&gt; My idea with the HB is to flowchart the solutions as I don&#39;t see a=
nother<br>
&gt; way of handling it right now.<br>
&gt; <br>
&gt; i.e.: Use openrc -&gt; dracut -&gt; systend-boot=C2=A0=3D /etc/cmdline=
<br>
&gt; Use systemd -&gt; dracut -&gt; systemd-booot=C2=A0=3D /etc/kernel/cmdl=
ine<br>
<br>
But in this configuration the user needs to set both of those files. <br>
Otherwise the script will complain (or it should, if it does not then <br>
that is a bug I need to fix). So if a new user follows these <br>
instructions they will be faced with a complaint about a missing <br>
/etc/cmdline for the systemd case, and a missing /etc/kernel/cmdline for <b=
r>
the openrc case.<br>
<br></blockquote><div><br></div><div>Ah that&#39;s why we are on different =
pages, currently you only need one of the=C2=A0</div><div>files to be set n=
ot both which is why my solution only includes one.</div><div>=C2=A0</div><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex">
Alternatively we could instruct the user to symlink one to the other, or <b=
r>
disable hostonly_cmdline (which is what I do on my systems).<br></blockquot=
e><div><br></div><div>My thought was to get the user to symlink here so the=
 user has one less thing</div><div>to worry about.</div><div>=C2=A0</div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex">
&gt; This was part of the reason why I stuck to just using SD-boot while we=
<br>
&gt; discuss, as it gets real confusing when you start summarising so many<=
br>
&gt; different options.<br>
&gt; <br>
&gt; Does this general idea sound workable to you?<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0We could patch dracut to use the same file to make =
things less<br>
&gt;=C2=A0 =C2=A0 =C2=A0confusing, but this would be a breaking change for =
some users.<br>
&gt; <br>
&gt; <br>
&gt; It&#39;s a shame we can&#39;t just symlink the two files as it would m=
ake<br>
&gt; all this so much simpler.<br>
<br>
Well, we can, but we would then be potentially overwriting existing <br>
config files with a symlink. I don&#39;t think <br>
portage+etc-update/dispatch-conf can handle that.<br></blockquote><div><br>=
</div><div>I meant presetup if I wasn&#39;t clear, the issue of course doin=
g that means</div><div>the file exists and the chroot script becomes pointl=
ess.</div><div><br></div><div>I&#39;ll do some tests on distpatch-conf=C2=
=A0and seeing I can break it/</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex">
&gt; <br>
&gt; <br>
&gt; Kind regards,<br>
&gt; <br>
&gt; immolo<br>
<br>
</blockquote></div></div>

--000000000000c5f7470644f5dd1d--