Re: Better handle systemd-boot and installkernel changes in HB
Immolo <[email protected]> Tue, 2 Dec 2025 09:08:54 +0000
| Newsgroups | gmane.linux.gentoo.documentation |
|---|---|
| Message-ID | <CAHfWF5n=52pOEUrUicrMG1RqwupVgdb0LcEYJdJuBVEyx92FtA@mail.gmail.com> |
--0000000000009df5d00644f4723d Content-Type: text/plain; charset="UTF-8" On Mon, 1 Dec 2025 at 15:18, Nowa Ammerlaan <[email protected]> wrote: > Thanks immolo, > > This looks good, my only comment is that for the openrc section the path > for the cmdline should be /etc/kernel/cmdline as well. Following the code this what I thought should happen (my bash is still rough) however, unless I use /etc/cmdlline the chroot detection fails and I can't see why. > Systemd-boot uses > the systemd kernel-install always so the path is exactly the same apart > from the USE flag configuration. I never implemented systemd-boot in > openrc installkernel since the systemd build system has an unbreakable > dependency between sd-boot and kernel-install. > > Best regards, > Nowa > > On 30/11/2025 22:16, Immolo wrote: > > 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 <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] > > <mailto:[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 > > > > > > > > --0000000000009df5d00644f4723d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Mon, 1 Dec 2025 at 15:18, Nowa Ammerla= an <<a href=3D"mailto:[email protected]">[email protected]</a>> wrote:<br= ></div><div class=3D"gmail_quote gmail_quote_container"><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">Thanks immolo,<br> <br> This looks good, my only comment is that for the openrc section the path <b= r> for the cmdline should be /etc/kernel/cmdline as well. </blockquote><div><b= r></div><div>Following the code this what I thought should happen (my bash = is still rough)</div><div>however, unless I use /etc/cmdlline=C2=A0the chro= ot detection fails and I can't see=C2=A0</div><div>why.</div><div>=C2= =A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e= x;border-left:1px solid rgb(204,204,204);padding-left:1ex">Systemd-boot use= s <br> the systemd kernel-install always so the path is exactly the same apart <br= > from the USE flag configuration. I never implemented systemd-boot in <br> openrc installkernel since the systemd build system has an unbreakable <br> dependency between sd-boot and kernel-install.<br> <br> Best regards,<br> Nowa<br> <br> On 30/11/2025 22:16, Immolo wrote:<br> > Hi,<br> > <br> > Apologies on the delay, it's been one of those months!<br> > <br> > I have been about to use this time to follow how the newer community<b= r> > members interact with the HB and then use that with guidance=C2=A0that= <br> > Nowa has provided.<br> > <br> > For ease I'm just going to show how this change=C2=A0works with<br= > > systemd-boot as adding=C2=A0all together=C2=A0just adds confusion<br> > <br> > <a href=3D"https://wiki.gentoo.org/wiki/User:Immolo/Sandbox/SDboot" re= l=3D"noreferrer" target=3D"_blank">https://wiki.gentoo.org/wiki/User:Immolo= /Sandbox/SDboot</a> <https:// <br> > <a href=3D"http://wiki.gentoo.org/wiki/User:Immolo/Sandbox/SDboot" rel= =3D"noreferrer" target=3D"_blank">wiki.gentoo.org/wiki/User:Immolo/Sandbox/= SDboot</a>><br> > <br> > I'll fluff=C2=A0it up to match the HB standards, however this has<= br> > been repeatedly=C2=A0proven to solve the detection issue and<br> > the new user trap, where users got lost between how the<br> > OpenRC and systemd options began and ended.<br> > <br> > If happy I will proceed to clean up each section and how<br> > they interact=C2=A0with later parts f the HB.<br> > <br> > Kind regards<br> > <br> > immolo<br> > <br> > On Sat, 8 Nov 2025 at 18:01, Nowa Ammerlaan <<a href=3D"mailto:nowa= @gentoo.org" target=3D"_blank">[email protected]</a> <br> > <mailto:<a href=3D"mailto:[email protected]" target=3D"_blank">nowa@g= entoo.org</a>>> wrote:<br> > <br> >=C2=A0 =C2=A0 =C2=A0On 08/11/2025 18:36, Immolo wrote:<br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 > I agree, this should not be requir= ed, if /etc/kernel/cmdline<br> >=C2=A0 =C2=A0 =C2=A0is present<br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 >> then the check will pass.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 > The path is also different for sys= temd kernel-install versus<br> >=C2=A0 =C2=A0 =C2=A0 > installkernel.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 > Oh that explains why I originally=C2=A0read= =C2=A0your chroot warning as<br> >=C2=A0 =C2=A0 =C2=A0vague before.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 > I'll update=C2=A0once we have agreed=C2= =A0on how we want=C2=A0 it to look.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 >>><br> >=C2=A0 =C2=A0 =C2=A0 >>> Note I can live with us mentioning th= is suppression file but I<br> >=C2=A0 =C2=A0 =C2=A0just want<br> >=C2=A0 =C2=A0 =C2=A0 >>> to be clear on why we're doing it= .<br> >=C2=A0 =C2=A0 =C2=A0 >>><br> >=C2=A0 =C2=A0 =C2=A0 >>>>=C2=A0 =C2=A0This gives systemd-bo= ot a blank kernel cmdliine to use<br> >=C2=A0 =C2=A0 =C2=A0rather than using the installcd's cmdine and ge= ts around the<br> >=C2=A0 =C2=A0 =C2=A0 >>>>=C2=A0 =C2=A0chroot check if the u= ser<br> >=C2=A0 =C2=A0 =C2=A0 >>>>>=C2=A0 =C2=A0decides to use ~A= RCH.<br> >=C2=A0 =C2=A0 =C2=A0 >>>><br> >=C2=A0 =C2=A0 =C2=A0 >>>>=C2=A0 =C2=A0For GRUB:<br> >=C2=A0 =C2=A0 =C2=A0 >>>><br> >=C2=A0 =C2=A0 =C2=A0 >>>>=C2=A0 =C2=A0 =C2=A0Create the fol= lowing to pass chroot checks for {{Package|<br> >=C2=A0 =C2=A0 =C2=A0sys-kernel/installkernel}}:<br> >=C2=A0 =C2=A0 =C2=A0 >>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 touch = /etc/kernel/install.d/05-check-chroot.install<br> >=C2=A0 =C2=A0 =C2=A0 >>>><br> >=C2=A0 =C2=A0 =C2=A0 >>> I'm not following this bit.. can&= #39;t we just disable the check<br> >=C2=A0 =C2=A0 =C2=A0for grub<br> >=C2=A0 =C2=A0 =C2=A0 >>> instead somehow?<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 > It is disabled for grub (or well i= t should be, that is how I<br> >=C2=A0 =C2=A0 =C2=A0intended<br> >=C2=A0 =C2=A0 =C2=A0 > for this to work).<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 > The disabled check is currently not working, = So far confirmed by<br> >=C2=A0 =C2=A0 =C2=A0a user<br> >=C2=A0 =C2=A0 =C2=A0 > on Reddit<br> >=C2=A0 =C2=A0 =C2=A0 > and on my test VM.<br> >=C2=A0 =C2=A0 =C2=A0 ><br> >=C2=A0 =C2=A0 =C2=A0 > As I didn't understand why your code isn&= #39;t working yet, I opted to<br> >=C2=A0 =C2=A0 =C2=A0 > handle this in the<br> >=C2=A0 =C2=A0 =C2=A0 > cleanup pass (It's how we deal with major= faults in telecoms and<br> >=C2=A0 =C2=A0 =C2=A0I just<br> >=C2=A0 =C2=A0 =C2=A0 > noticed today<br> >=C2=A0 =C2=A0 =C2=A0 > I apply this logic in Gentoo bugs I deem majo= r.)<br> >=C2=A0 =C2=A0 =C2=A0 ><br> > <br> > <br> >=C2=A0 =C2=A0 =C2=A0I think we are conflating two (unfortunately separa= te things), there's<br> >=C2=A0 =C2=A0 =C2=A0the check for the dracut cmdline (which runs if dra= cut is selected):<br> >=C2=A0 =C2=A0 =C2=A0/etc/cmdline(.d) or dracut.conf and the check for s= ystemd-boot/ukify<br> >=C2=A0 =C2=A0 =C2=A0(which runs if layout is bls type 1 or type 2): /et= c/*kernel/*cmdline.<br> >=C2=A0 =C2=A0 =C2=A0The latter is the one that I was talking about here= and it should not<br> >=C2=A0 =C2=A0 =C2=A0run for grub (since the layout is set to something = else)<br> > <br> >=C2=A0 =C2=A0 =C2=A0I hate that these two paths are different, but ther= e is unfortunately<br> >=C2=A0 =C2=A0 =C2=A0nothing I can do about that. I think the user on Re= ddit was hitting the<br> >=C2=A0 =C2=A0 =C2=A0other check for dracut. But I'd have to see log= s to be sure.<br> > <br> >=C2=A0 =C2=A0 =C2=A0Best regards,<br> >=C2=A0 =C2=A0 =C2=A0Nowa<br> > <br> > <br> > <br> <br> </blockquote></div></div> --0000000000009df5d00644f4723d--