From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 20 Apr 2026 11:33:46 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f59.google.com (mail-qv1-f59.google.com [209.85.219.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 63K9Xi6Q021971 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 20 Apr 2026 11:33:45 +0200 Received: by mail-qv1-f59.google.com with SMTP id 6a1803df08f44-8a3bc7f5d43sf54676796d6.2 for ; Mon, 20 Apr 2026 02:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1776677619; x=1777282419; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=wlo9+/cU0eMZ0IlF6xIHBQv2+W249LyHvPdmUgjgFQw=; b=hMSk7+YY4zlzdM/v9xwKf4sXh/oEzwbvkmP5Mr1UJMW8mNlSqA62Fuh/BW8aYXV2bU Fv7lQL/DE+IeEW+/GnRFP05sigRhJldeqUr3sMeHFnmDWHQSWDCic6wc8Wcz45LRYQUu 9RF90UBc7Dl9xLh9Oouf8mp1KDJ2+dTEqa0R52ERB73S+HWNu394kIriSHTxmA5D43vQ 31x4Tvbj3Fm/hYKVzQcsBC7aCSH/ik3I1p2kvcNv6MTBNVj+RE34+CcjKS6J2LzZsuuR 6n48PX1TH0/BatSZDJx/M8r1cHQ1991pDUHz4qhuT+aA+a1o8SVixbSq4lxG/6gK182e iKRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776677619; x=1777282419; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=wlo9+/cU0eMZ0IlF6xIHBQv2+W249LyHvPdmUgjgFQw=; b=RPxGimyT1PkEQ9l6RlGQQ7i61gewJOoZaxdn33J5SuflpE8JJH+K4hHHvk7X6wYwLW yJ+iJAXTh83dd2cNA7Qi8S6uCSipOipX8q46L7ljJanKQ6xbB/Z2QS2I/SDfxa4CVxdN ebzoG6gmtRBZUU4b5arzkwBza2proEB9QoOSxm8cvkV0GixSUWcVaukjKpSE1SB5N3/L FhThZR//FFxY7kXsQTdUqCnFxAToYVY6ALufHUlUEO4QJ+jkEW7AAGIzrSh5jBLAr1Qg UI4OlMGiv/AEpjIWy2KOsxpRcmnfDy4jZPLRpAOT78WI9bDpQcESD7ST84wZ1WCCmZf7 37lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776677619; x=1777282419; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=wlo9+/cU0eMZ0IlF6xIHBQv2+W249LyHvPdmUgjgFQw=; b=BpPaQ4qhKodQvwYxrjnrshSmGIPv1vrjdr0eti37+CYMZTRiby+G9XqFnUxSCIq/Eh wOoCRIC3lqUvUg5iM8sHEyCd9ZJ80FUFZm/Pl4n7Ky+gjjq24mwBQyZuREDcnJj+sjrm Oxkfr/xX4xZIOuHPoqYoEVWGVRH4eTVnmkFAiLIHuBhNRrrJg7887GTLYRgfXMNji4rH 8j+9Bj7fnpoq8IHrpmG4Z8H866s6kdHFTOM4/4IVp6AwhpdbsvA/9Bj+eWtnPMOtXBWo qCo7bhxSlH1vIQGcVvOncJd4+X87c90O0LE78CKUAvAovqx8/WlsFFGNlweJ9vdfN2n6 trwg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=1; AFNElJ8V3BgmrJs0i4A4ZS9DMMEGzyABDt9+vRdGub1g5Q0a5oy1If8tjx47kpVgV/r19lhV1zqE@ilbers.de X-Gm-Message-State: AOJu0YyhoVJIr7HoetC7S4DkllX0Togg/+uo3ETlsZpxPQkdN9C3M4Ee 6jgqiDARtmAv3iCO7YhF6Bj1CsDMbCWToF/vsn9XQZLP05UrKOIUFOMi X-Received: by 2002:a0c:e018:0:b0:8ac:7d13:d18a with SMTP id 6a1803df08f44-8b028100756mr195210726d6.39.1776677618870; Mon, 20 Apr 2026 02:33:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AYAyTiIQ3eJvz7II/kXxEG7eS7q6HA/Ci04XVYHJ0aDrI1T2/g==" Received: by 2002:ac8:7d8b:0:b0:501:47f4:eaf7 with SMTP id d75a77b69052e-50e2585731als77069721cf.2.-pod-prod-05-us; Mon, 20 Apr 2026 02:33:38 -0700 (PDT) X-Received: by 2002:a05:620a:4143:b0:8cd:871c:909d with SMTP id af79cd13be357-8e792276312mr1722260285a.53.1776677618053; Mon, 20 Apr 2026 02:33:38 -0700 (PDT) Date: Mon, 20 Apr 2026 02:33:37 -0700 (PDT) From: Srinuvasan Arjunan To: isar-users Message-Id: <43ab5336-c573-4027-abd2-6f088519b866n@googlegroups.com> In-Reply-To: <5793656d-dbda-4b46-95ad-c6fc0422e1c8n@googlegroups.com> References: <20260415125522.458497-1-srinuvasan.a@siemens.com> <7e120fa6-703a-4b7e-b242-bea198ea10ce@siemens.com> <5793656d-dbda-4b46-95ad-c6fc0422e1c8n@googlegroups.com> Subject: Re: [PATCH] rootfs: run kernel-install after update-initramfs MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_14644_1298921063.1776677617146" X-Original-Sender: srinuvasanasv@gmail.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-3.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: D7NhafpmMEdw ------=_Part_14644_1298921063.1776677617146 Content-Type: multipart/alternative; boundary="----=_Part_14645_142887882.1776677617146" ------=_Part_14645_142887882.1776677617146 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Please ignore my previous message=E2=80=94it was accidentally sent from m= y end. Apologies for the confusion. Many thanks, Srinu On Monday, April 20, 2026 at 2:53:20=E2=80=AFPM UTC+5:30 Srinuvasan Arjunan= wrote: > On Wednesday, April 15, 2026 at 6:35:30=E2=80=AFPM UTC+5:30 Jan Kiszka wr= ote: > > On 15.04.26 14:55, srinuvasan.a via isar-users wrote:=20 > > From: srinuvasan =20 > >=20 > > When efibootguard is used as the primary bootloader and=20 > > systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux=20 > > to contain a unified kernel image for first boot.=20 > >=20 > > Err, where/how do you define "primary" and "secondary" EFI bootloaders?= =20 > Note that EBG is isar-cip-core, and there we definitely do not have such= =20 > a concept. Can you elaborate what you want to achieve?=20 > > > Run kernel-install after update-initramfs to ensure the unified=20 > > kernel image is generated and placed correctly.=20 > >=20 > > Invoke kernel-install for UKI generation only when:=20 > > - ukify binary is available=20 > > - /usr/lib/kernel/install.conf exists=20 > >=20 > > Signed-off-by: Shivaschandra KL =20 > > Signed-off-by: srinuvasan =20 > > ---=20 > > meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---=20 > > 1 file changed, 17 insertions(+), 3 deletions(-)=20 > >=20 > > diff --git a/meta/classes-recipe/rootfs.bbclass=20 > b/meta/classes-recipe/rootfs.bbclass=20 > > index a9233111..9024f006 100644=20 > > --- a/meta/classes-recipe/rootfs.bbclass=20 > > +++ b/meta/classes-recipe/rootfs.bbclass=20 > > @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?=3D "${DISTRO}"=20 > > ROOTFS_USE_DRACUT ??=3D ""=20 > >=20 > > def initramfs_generator_cmdline(d):=20 > > - rootfs_packages =3D d.getVar('ROOTFS_PACKAGES') or ''=20 > > + rootfs_packages =3D d.getVar('ROOTFS_PACKAGES') or ''=20 > > +=20 > > if 'dracut' in rootfs_packages or=20 > bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')):=20 > > - return "dracut --force --kver \"$kernel_version\""=20 > > - return "update-initramfs -u -v -k \"$kernel_version\""=20 > > + return 'dracut --force --kver "$kernel_version"'=20 > > +=20 > > + cmdline =3D 'update-initramfs -u -v -k "$kernel_version"'=20 > > +=20 > > + cmdline +=3D (=20 > > + '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ]= =20 > && '=20 > > Who is using ukify? No one in isar or isar-cip-core at least. Are you=20 > referring to an out-of-tree wic plugin with these changes?=20 > > In-tree (Isar), we still need to enable=20 > meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py to generate=20 > UKIs. But that would be systemd-boot UKI-only, no EBG then.=20 > > Jan > > > Hi Jan, > > In our downstream project, we use a combination of EBG and systemd-boot,= =20 > along with UKI (ukify) images. > > EBG acts as the primary bootloader to enable watchdog support during earl= y=20 > boot, while systemd-boot is used as a secondary bootloader to select the= =20 > appropriate Btrfs snapshot along with its corresponding UKI image. > > If the system fails to be successfully =E2=80=9Cblessed=E2=80=9D (e.g., d= ue to issues=20 > detected during validation of a newly created Btrfs snapshot), we need a= =20 > mechanism to fall back to a previously working snapshot and its associate= d=20 > UKI image. This fallback selection is handled by systemd-boot. > > To support this flow, the WIC plugin expects /boot/EFI/Linux to contain= =20 > the unified kernel image required for the first boot. > Therefore, we run kernel-install after update-initramfs to ensure that th= e=20 > unified kernel image is properly generated and placed in the expected=20 > location.=20 > > Many thanks, > Srinu > > > + 'kernel-install add "$kernel_version" "/boot/${kernel##*/}" '=20 > > + '"/boot/initrd.img-$kernel_version" || :'=20 > > + )=20 > > +=20 > > + return cmdline=20 > >=20 > > ROOTFS_PACKAGES ?=3D ""=20 > > ROOTFS_VARDEPS ?=3D ""=20 > > @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {=20 > > }=20 > >=20 > > rootfs_generate_initramfs[progress] =3D=20 > "custom:rootfs_progress.InitrdProgressHandler"=20 > > +rootfs_generate_initramfs:prepend() {=20 > > + export kernel=20 > > +}=20 > > +=20 > > rootfs_generate_initramfs() {=20 > > if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')"= =20 > ]; then=20 > > for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do=20 > > > --=20 > Siemens AG, Foundational Technologies=20 > Linux Expert Center=20 > > --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= 43ab5336-c573-4027-abd2-6f088519b866n%40googlegroups.com. ------=_Part_14645_142887882.1776677617146 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =C2=A0 Please ignore my previous message=E2=80=94it was accidentally sent f= rom my end.

=C2=A0 Apologies for the confusion.


Many t= hanks,

Srinu


On Monday, April 20, 2026 at 2:53:20=E2=80=AFPM UTC+5:30= Srinuvasan Arjunan wrote:
On Wednesday, April 15, 2026 at 6:35:3= 0=E2=80=AFPM UTC+5:30 Jan Kiszka wrote:
srinuv...@siemens.com= >
>=20
> When efibootguard is used as the primary bootloader and
> systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux
> to contain a unified kernel image for first boot.
>=20

Err, where/how do you define "primary" and "secondary&qu= ot; EFI bootloaders?
Note that EBG is isar-cip-core, and there we definitely do not have suc= h
a concept. Can you elaborate what you want to achieve?

> Run kernel-install after update-initramfs to ensure the unified
> kernel image is generated and placed correctly.
>=20
> Invoke kernel-install for UKI generation only when:
> - ukify binary is available
> - /usr/lib/kernel/install.conf exists
>=20
> Signed-off-by: Shivaschandra KL <shivasch..= .@siemens.com>
> Signed-off-by: srinuvasan <srinuv...@siemen= s.com>
> ---
> meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>=20
> diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-rec= ipe/rootfs.bbclass
> index a9233111..9024f006 100644
> --- a/meta/classes-recipe/rootfs.bbclass
> +++ b/meta/classes-recipe/rootfs.bbclass
> @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?=3D "${DISTRO}"
> ROOTFS_USE_DRACUT ??=3D ""
> =20
> def initramfs_generator_cmdline(d):
> - rootfs_packages =3D d.getVar('ROOTFS_PACKAGES') or &= #39;'
> + rootfs_packages =3D d.getVar('ROOTFS_PACKAGES') or &#= 39;'
> +
> if 'dracut' in rootfs_packages or bb.utils.to_boolean= (d.getVar('ROOTFS_USE_DRACUT')):
> - return "dracut --force --kver \"$kernel_version= \""
> - return "update-initramfs -u -v -k \"$kernel_version= \""
> + return 'dracut --force --kver "$kernel_version&q= uot;'
> +
> + cmdline =3D 'update-initramfs -u -v -k "$kernel_vers= ion"'
> +
> + cmdline +=3D (
> + '; command -v ukify >/dev/null && [ -f /us= r/lib/kernel/install.conf ] && '

Who is using ukify? No one in isar or isar-cip-core at least. Are you
referring to an out-of-tree wic plugin with these changes?

In-tree (Isar), we still need to enable
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py to generate
UKIs. But that would be systemd-boot UKI-only, no EBG then.

Jan

=C2=A0 Hi Jan,

=C2=A0In our downstream project, we use a combin= ation of EBG and systemd-boot, along with UKI (ukify) images.

EBG acts as the primary bootloader to enable watchdog support during ear= ly boot, while systemd-boot is used as a secondary bootloader to=C2=A0 sele= ct the appropriate Btrfs snapshot along with its corresponding UKI image.

If the system fails to be successfully =E2=80=9Cblessed=E2=80= =9D (e.g., due to issues detected during validation of a newly created Btrf= s snapshot), we need a mechanism to fall back to a previously working snaps= hot and its associated UKI image. This fallback selection is handled by sys= temd-boot.

To support this flow, the WIC plugin expects /boot/EFI/Linux to contain = the unified kernel image required for the first boot.

Therefore, we run kernel-install after update-initramfs to ensure that= the unified kernel image is properly generated and placed in the expected = location.=C2=A0

Many thanks,
Srinu
=
> + 'kernel-install ad= d "$kernel_version" "/boot/${kernel##*/}" '
> + '"/boot/initrd.img-$kernel_version" || := 9;
> + )
> +
> + return cmdline
> =20
> ROOTFS_PACKAGES ?=3D ""
> ROOTFS_VARDEPS ?=3D ""
> @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {
> }
> =20
> rootfs_generate_initramfs[progress] =3D "custom:rootfs_progr= ess.InitrdProgressHandler"
> +rootfs_generate_initramfs:prepend() {
> + export kernel
> +}
> +
> rootfs_generate_initramfs() {
> if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f= -name 'vmlinu[xz]*')" ]; then
> for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do


--=20
Siemens AG, Foundational Technologies
Linux Expert Center

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-use= rs+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-use= rs/43ab5336-c573-4027-abd2-6f088519b866n%40googlegroups.com.
------=_Part_14645_142887882.1776677617146-- ------=_Part_14644_1298921063.1776677617146--