Re: Better handle systemd-boot and installkernel changes in HB
Immolo <[email protected]> Tue, 2 Dec 2025 12:26:50 +0000
| Newsgroups | gmane.linux.gentoo.documentation |
|---|---|
| Message-ID | <CAHfWF5mCCdcEgxisAcgHo0MbPLPS3QPoQHSiMZAvXcqudapvvg@mail.gmail.com> |
--00000000000072d40e0644f73616 Content-Type: text/plain; charset="UTF-8" On Tue, 2 Dec 2025 at 11:36, Nowa Ammerlaan <[email protected]> wrote: > On 02/12/2025 11:50, Immolo wrote: > > 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. > > I did a quick test just now, and I definitely need to touch both > /etc/cmdline and /etc/kernel/cmdline if > INSTALLKERNEL_INITRD_GENERATOR=dracut and INSTALLKERNEL_LAYOUT=bls. > > Huh, I'll do a second test, but that was not the result I saw. Not worth worrying about beyond this point though, and we'll focus below. > 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. > > Symlinking is definitely the way to go, having two config files > potentially going out of sync will be a headache for the user later on. > > > > > > 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/ > > I think the following should be safe to recommend: > > mkdir -p /etc/cmdline.d > ln -s /etc/kernel/cmdline /etc/cmdline.d/00-installkernel.conf > > Excellent, we both have the same idea so I'll do some user testing today and get it added to the HB. > We could even safely put that in the installkernel ebuild, but portage > will complain about a dead symlink if the target does not exist. We > could of course do it in postinst to avoid that problem. > > I think keeping simple in the HB is the answer for now, we can revisit if a need arises. Thanks again for the help immolo Best regards, > Nowa > > Best r > --00000000000072d40e0644f73616 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 11:36, 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:50, Immolo wrote:<br> > Ah that's why we are on different pages, currently you only need o= ne of the<br> > files to be set not both which is why my solution only includes one.<b= r> <br> I did a quick test just now, and I definitely need to touch both <br> /etc/cmdline and /etc/kernel/cmdline if <br> INSTALLKERNEL_INITRD_GENERATOR=3Ddracut and INSTALLKERNEL_LAYOUT=3Dbls.<br> <br></blockquote><div><br></div><div>Huh, I'll do a second test, but th= at was not the result I saw.</div><div>Not worth worrying about beyond this= point though, and we'll</div><div>focus below.</div><div><br></div><bl= ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef= t:1px solid rgb(204,204,204);padding-left:1ex"> >=C2=A0 =C2=A0 =C2=A0Alternatively we could instruct the user to symlink= one to the<br> >=C2=A0 =C2=A0 =C2=A0other, or<br> >=C2=A0 =C2=A0 =C2=A0disable hostonly_cmdline (which is what I do on my = systems).<br> > <br> > <br> > My thought was to get the user to symlink here so the user has one les= s <br> > thing<br> > to worry about.<br> <br> Symlinking is definitely the way to go, having two config files <br> potentially going out of sync will be a headache for the user later on.<br> <br> > <br> >=C2=A0 =C2=A0 =C2=A0 > This was part of the reason why I stuck to ju= st using SD-boot<br> >=C2=A0 =C2=A0 =C2=A0while we<br> >=C2=A0 =C2=A0 =C2=A0 > discuss, as it gets real confusing when you s= tart summarising so many<br> >=C2=A0 =C2=A0 =C2=A0 > different options.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 > Does this general idea sound workable to you?= <br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0We could patch dracut to u= se the same file to make things less<br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0confusing, but this would = be a breaking change for some users.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 > It's a shame we can't just symlink th= e two files as it would make<br> >=C2=A0 =C2=A0 =C2=A0 > all this so much simpler.<br> > <br> >=C2=A0 =C2=A0 =C2=A0Well, we can, but we would then be potentially over= writing existing<br> >=C2=A0 =C2=A0 =C2=A0config files with a symlink. I don't think<br> >=C2=A0 =C2=A0 =C2=A0portage+etc-update/dispatch-conf can handle that.<b= r> > <br> > <br> > I meant presetup if I wasn't clear, the issue of course doing that= means<br> > the file exists and the chroot script becomes pointless.<br> > <br> > I'll do some tests on distpatch-conf=C2=A0and seeing I can break i= t/<br> <br> I think the following should be safe to recommend:<br> <br> mkdir -p /etc/cmdline.d<br> ln -s /etc/kernel/cmdline /etc/cmdline.d/00-installkernel.conf<br> <br></blockquote><div><br></div><div>Excellent, we both have the same idea = so I'll do some user testing=C2=A0</div><div>today and get it added to = the HB.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex"> We could even safely put that in the installkernel ebuild, but portage <br> will complain about a dead symlink if the target does not exist. We <br> could of course do it in postinst to avoid that problem.<br> <br></blockquote><div><br></div><div>I think keeping simple in the HB is th= e answer for now, we can revisit=C2=A0</div><div>if a need arises.</div><di= v><br></div><div>Thanks again for the help</div><div><br></div><div>immolo<= /div><div><br></div><div><br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex"> Best regards,<br> Nowa<br> <br> Best r<br> </blockquote></div></div> --00000000000072d40e0644f73616--