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:23:27 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f55.google.com (mail-qv1-f55.google.com [209.85.219.55]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 63K9NPg2021858 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 20 Apr 2026 11:23:26 +0200 Received: by mail-qv1-f55.google.com with SMTP id 6a1803df08f44-8a5f6110c1csf68830726d6.0 for ; Mon, 20 Apr 2026 02:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1776677000; x=1777281800; 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=dM9nTO4lEXGV9571rVa8gQFRSqv+MfDOmdYfZUIWr60=; b=QyEk9JfnzlC2+X6VHc0HFH88+xSOGwA4ZcbJCkMWUXYGxISXElF5Wo5DdwYyl4IInZ +3hYRtwHoApraIk7PaEG8Fy8lPz7ihmG9yx+n8cRol4BXeO7bOtk736rUe3lJCeJXaZK 7PcUTrecE18+paDFerLmkBu1aD/ufY05hnPuknbgUIK0NnidONxdmE2nxiwgTjh/mHhS HUUtGt1SOGtZ0QkooJCxKwXoc6D5CiFbrMdIR5panx97mLBijU9u/oenrP5vcZ4L8ZEB p6TcGiIcGCDkhcKEWDRE4gxgNblQIqjxWz2hNpLpOtHkoeZ5CLRKm5WBYacR68OcLYz0 Pntw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776677000; x=1777281800; 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=dM9nTO4lEXGV9571rVa8gQFRSqv+MfDOmdYfZUIWr60=; b=oCSR/mLVu6NCC84STvwvazuhBQpv6pTePKKOuP+f+ugeUlM+c9fdK2HW7x/tWfWqnH /NvMSa+tDJIITq1Gts725UKTdD1oI+WSBozHVCxyh6Y0nuexyV2UFaXF45zUMLTZsi3H c+eS9tmxlHvjzITPlR/bW/ttMlz1/uKNyQkQa0R+n4BSBl09HImaKbZGLUMzGUrs/2O9 b63l+uJOcf2+1cLiMuz9Y8vQsRSECD48ueNkYUhkOKTA5Y3CAPpk98bIdCjKNfDydwJ6 f7fiyhmMtIWa5LrW59ZU/32t7TNsV7aL/GnM4O21ztKlqyMBR3vx0nZDX7OtibUK7Dk6 ghKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776677000; x=1777281800; 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:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=dM9nTO4lEXGV9571rVa8gQFRSqv+MfDOmdYfZUIWr60=; b=RWA3cjFyxtJjZ20fDXCI+oyr4V2ff2HLR8NjZ+3848KdMKKN1EUL10Lg4Ss9U7Q/qh l3PLXRCZ6T84UiN05ij4pjtBBaMiwT5MR52WGsoUSkFdsZS5PR2YhalSGUW/iAcfOqsl B7sp/WXMtJppLTVEhE2C7777ZgWQOtkYwZTVsrLrEgdcuDNVF3DgHTHotkwGOS99G5pp KICQihLvlx/jL7QoFocbJIZuamXZjMAJOzeKx8rz2a5llOsfH0plYUDkqqucRzCl3Pqn pl3sSzHOhTN220r3EL8lk6d+HixAv5OeoWYKpt92QRl4xIx0NZ1goTVfW5lbwAmp7EW+ PpBg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=1; AFNElJ977zC7sOWXvEO8pKd54nojA/kVyf8jrWa1BHHLcrGQMoq+5WrCOZMQ8baTDYzCxjUCyt+k@ilbers.de X-Gm-Message-State: AOJu0Ywe12z2Qw8Wyj/T4Yx1uI+CULJQOkUesDBMfZGcR+CaEN87wZFX 2utRXENHwT9BSC61NebLqk1gsWivGPbYHQHCMjm9xW3eUf9LKIQg8Yyv X-Received: by 2002:a05:6214:470b:b0:89c:5110:751a with SMTP id 6a1803df08f44-8b02812c55emr164955506d6.44.1776676999959; Mon, 20 Apr 2026 02:23:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AYAyTiJ6A+gTBK4iKRDaMryoVP/kANIMDjvgunFbg+9IzGo5dQ==" Received: by 2002:ac8:7dcb:0:b0:50d:e712:ae8e with SMTP id d75a77b69052e-50e257fb992ls89498241cf.1.-pod-prod-06-us; Mon, 20 Apr 2026 02:23:19 -0700 (PDT) X-Received: by 2002:a05:620a:4412:b0:8eb:f3c7:2248 with SMTP id af79cd13be357-8ebf4137328mr123091785a.42.1776676999585; Mon, 20 Apr 2026 02:23:19 -0700 (PDT) Received: by 2002:a05:620a:4045:b0:8d6:1bc4:a7bc with SMTP id af79cd13be357-8e65762f909ms85a; Thu, 16 Apr 2026 05:16:56 -0700 (PDT) X-Received: by 2002:a05:620a:4012:b0:8cd:83d2:cad7 with SMTP id af79cd13be357-8ddcecbbc12mr3834016385a.33.1776341816251; Thu, 16 Apr 2026 05:16:56 -0700 (PDT) Date: Thu, 16 Apr 2026 05:16:56 -0700 (PDT) From: Srinuvasan Arjunan To: isar-users Message-Id: <5793656d-dbda-4b46-95ad-c6fc0422e1c8n@googlegroups.com> In-Reply-To: <7e120fa6-703a-4b7e-b242-bea198ea10ce@siemens.com> References: <20260415125522.458497-1-srinuvasan.a@siemens.com> <7e120fa6-703a-4b7e-b242-bea198ea10ce@siemens.com> Subject: Re: [PATCH] rootfs: run kernel-install after update-initramfs MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_112954_2098690736.1776341816096" X-Original-Sender: srinuvasanasv@gmail.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: 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: DaQ3HlcUdhvf ------=_Part_112954_2098690736.1776341816096 Content-Type: multipart/alternative; boundary="----=_Part_112955_24004559.1776341816096" ------=_Part_112955_24004559.1776341816096 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, April 15, 2026 at 6:35:30=E2=80=AFPM UTC+5:30 Jan Kiszka wrot= e: 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 early= =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., due= 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 associated= =20 UKI image. This fallback selection is handled by systemd-boot. To support this flow, the WIC plugin expects /boot/EFI/Linux to contain the= =20 unified kernel image required for the first boot. Therefore, we run kernel-install after update-initramfs to ensure that the= =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/= 5793656d-dbda-4b46-95ad-c6fc0422e1c8n%40googlegroups.com. ------=_Part_112955_24004559.1776341816096 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wednesday, April 15, 2026 at 6:35:30= =E2=80=AFPM UTC+5:30 Jan Kiszka wrote:
On 15.04.26 14:55, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuv...@sie= mens.com>
>=20
> When efibootguard is used as the primary bootloader and
> systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linu= x
> to contain a unified kernel image for first boot.
>=20

Err, where/how do you define "primary" and "secondary" EFI bootloader= s?
Note that EBG is isar-cip-core, and there we definitely do not have s= uch
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 <srin= uv...@siemens.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-r= ecipe/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 ''
> + rootfs_packages =3D d.getVar('ROOTFS_PACKAGES') or ''
> +
> if 'dracut' in rootfs_packages or bb.utils.to_boolean(d.get= Var('ROOTFS_USE_DRACUT')):
> - return "dracut --force --kver \"$kernel_version\""
> - return "update-initramfs -u -v -k \"$kernel_version\""
> + return 'dracut --force --kver "$kernel_version"'
> +
> + cmdline =3D 'update-initramfs -u -v -k "$kernel_version"'
> +
> + cmdline +=3D (
> + '; command -v ukify >/dev/null && [ -f /usr/= 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 combination 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 Btrfs snapshot)= , we need a mechanism to fall back to a previously working snapshot and its= associated UKI image. This fallback selection is handled by systemd-boot.<= /p>

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 add "$kernel_version" "/boot/${kernel##= */}" '
> + '"/boot/initrd.img-$kernel_version" || :'
> + )
> +
> + 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_progress= .InitrdProgressHandler"
> +rootfs_generate_initramfs:prepend() {
> + export kernel
> +}
> +
> rootfs_generate_initramfs() {
> if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vml= inu[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/5793656d-dbda-4b46-95ad-c6fc0422e1c8n%40googlegroups.com.
------=_Part_112955_24004559.1776341816096-- ------=_Part_112954_2098690736.1776341816096--