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 <<a href=3D"mailto:[email protected]">nowa@ge= ntoo.org</a>> 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> > Thanks, this was my understanding of the code.<br> > <br> >=C2=A0 =C2=A0 =C2=A0If you've configured the kernel installation to= use systemd-boot/ukify<br> >=C2=A0 =C2=A0 =C2=A0*and* dracut, *with* hostonly_cmdline=3Dyes (the de= fault) then the check<br> >=C2=A0 =C2=A0 =C2=A0will check for presence of *both* files.<br> > <br> > <br> > My idea with the HB is to flowchart the solutions as I don't see a= nother<br> > way of handling it right now.<br> > <br> > i.e.: Use openrc -> dracut -> systend-boot=C2=A0=3D /etc/cmdline= <br> > Use systemd -> dracut -> 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'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"> > This was part of the reason why I stuck to just using SD-boot while we= <br> > discuss, as it gets real confusing when you start summarising so many<= br> > different options.<br> > <br> > Does this general idea sound workable to you?<br> > <br> >=C2=A0 =C2=A0 =C2=A0We could patch dracut to use the same file to make = things less<br> >=C2=A0 =C2=A0 =C2=A0confusing, but this would be a breaking change for = some users.<br> > <br> > <br> > It's a shame we can't just symlink the two files as it would m= ake<br> > 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't think <br> portage+etc-update/dispatch-conf can handle that.<br></blockquote><div><br>= </div><div>I meant presetup if I wasn'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'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"> > <br> > <br> > Kind regards,<br> > <br> > immolo<br> <br> </blockquote></div></div> --000000000000c5f7470644f5dd1d--