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, 06 Oct 2025 20:44:50 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qk1-f190.google.com (mail-qk1-f190.google.com [209.85.222.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 596IinBS030283 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 6 Oct 2025 20:44:49 +0200 Received: by mail-qk1-f190.google.com with SMTP id af79cd13be357-856c1aa079bsf1091728085a.0 for ; Mon, 06 Oct 2025 11:44:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1759776284; cv=pass; d=google.com; s=arc-20240605; b=i2yjR4jIeZg4WEE9htLZ7aySBW7bUYSJTIFOIpJllyZ3n7o5j2UP65KgC0omuFfDGw KVEvE95lAnJGrWFVmZuHqEwdQAz1CKINQpMDgfda+qG09iLb9jkk3NKtkfwu8ebqrr43 R1cN1pHsXEv6tFRymBSZjMOHZUET1X8/lcZb0IFmwADB5YZ3DdhmgaCdB9cFEl6qQUmg mBo9EcCbuY6U4Yf3CZPyTB6KKqqOqXc3vw3JYclyx3PMcqizN/IJm1fqiLd+DUhILAYl 8tBeQyq4sTek098QBptLQxnhw+IywQ7Wull5CZlI2htz4sxKxxYCFfxjosoZMyqVm86b hQqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=M0fatJ+shMO01Bo64zS0OhErrl7D4qtA6KE0TtVdkqA=; fh=OLNB0uH7vD11ZURaMxr0WOAj0wSCdRNPmOsWT6whqso=; b=lu0WW805qdh+n2JE4/fioD4hEL7XEGY5t0WdQZj8PStqOEOnqcgGt8qSh9TDSaWsfn jlol5Cm0kI5hXUMf2skRVKuaHb7yM6YJ87dW739ACm0wcOYJoDJIQVhTxNZg+7KBf8vf jrzuqJ6ojBN9uaMWByPcYtQl56aThkiDvVcG+QqKmQdzNVPiic5km+DZ4LBCVta4U4cV 0YFHYyjQ5to1f120Fu+R3aMuxstnb1VYnn2gsFp3TBu7UAf4++zoAn84CjWZzYUV28rH oyuE+Ce4/wNQi5DwolhG074bJECbt2nakuGQjNQWOL7bJnkB8IgKE7lMWWTbh1WfMVWo 29kg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=mY0zrmlc; spf=pass (google.com: domain of fm-51332-202510061832178764f69641000207d9-ahwvdw@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-51332-202510061832178764f69641000207d9-AHwVDW@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1759776284; x=1760381084; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=M0fatJ+shMO01Bo64zS0OhErrl7D4qtA6KE0TtVdkqA=; b=JwmLgf0TwNpjjZpZWFVOJKne8n+QabPyRZXTOQIf8dv4gbBTvAowmIw8sh9NOMVWRb i/+arScfgUpSgCs1Hk782u7qnYciatnazl2oFedBojDQi7CwmhYsVCnvoEdOTE4QbybF xVZ8vpjc92rNvA+u4du9q/ZRMnWWY92e6MFfhjZWmQ6cgA6Tfy2JWsbzbEQaBr4/wDaN 8eljvPKGDjaK5mvhDfAK6xDhHfO+mn69T9Qk3ejU679ilKQFhsDQYg2/7ywHJD/umA/P p3E3nCVPFGJ4Sie3b/JxoBoIOHKJGl6/7TrYuxw8qSzrG2lrbB7yjjXZG41tKD7WdYwL dV4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759776284; x=1760381084; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M0fatJ+shMO01Bo64zS0OhErrl7D4qtA6KE0TtVdkqA=; b=j/I1BNlZpU10hskeYA0Kxh/7OKD6ixEmfik8oBd4lYG9lF5P33c5AJr2UER+Cap65y nWimCIigrRaf+zWowzUfZfzl88L8nqMkq/jriY6CNpRTsY4WSjD1tJGi94BC7r+CuOhW T9D32JyznLWxX3OS1az+3+dBy8ssLA45soDP2z9rG3XrI9+kDnJ+ewJtne7AZj4ub4X+ FHtD6FfTegGrrCOGVi6LPcQUNwsXCZENWycy71bMg2n4EC+eRm2Ems3574bWU1JRPyZm ngTo7EHpQBjsR7E/dE5Q9SkUNE2EtpPcaVv+fGPO9BuImM/uPKNj3W6gF0EcKQJ4RdP0 eJQg== X-Forwarded-Encrypted: i=2; AJvYcCV41G4/tsMVBfLZ1XCeINb6pUAKnsX9p1pk8WY5Wu8bDrI5jGmCsGPvA+GV5gADkkSG204K@ilbers.de X-Gm-Message-State: AOJu0Ywjg0BzqxMALzHJ4I2ZYJBymeH8u/Ah+FKwKnYMRkYcgfMRVSnV AYyy7I0cNhz45ZF0aoIEqrOqCPbyJ34hB2b92vL81GyAxKiOoKbHAun8 X-Google-Smtp-Source: AGHT+IGqNPAH41kZs2skqhAc9EHTdkmLHdTkT/rqwFob7lR2LW3kZxpqvZkfTYJJE0VH2ul2YlAU+A== X-Received: by 2002:ac8:5307:0:b0:4e5:6f2d:97cb with SMTP id d75a77b69052e-4e6de7df07bmr9167781cf.2.1759775539368; Mon, 06 Oct 2025 11:32:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ARHlJd6zzDzKyc4q6FREmrH3M2iwAH3BnbWS+cH0+RBTGUWMtA==" Received: by 2002:ac8:540e:0:b0:4b7:a79d:1601 with SMTP id d75a77b69052e-4e41efed509ls40660971cf.0.-pod-prod-00-us-canary; Mon, 06 Oct 2025 11:32:18 -0700 (PDT) X-Received: by 2002:a05:620a:4411:b0:810:7a53:c62b with SMTP id af79cd13be357-8820c210840mr92577385a.34.1759775538205; Mon, 06 Oct 2025 11:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1759775538; cv=none; d=google.com; s=arc-20240605; b=WMSEjk14Et114JlOFcgNOJheB+517l35oRIznyxdfF3SYaLqOSLRJu7uT7cX2x2+sV XCI0JAT9dYHO3qgPmpDibgETfLrevvq57deSZPdkQo8Ensjr1BQrCBYw4fAmnVmrioki 6GBUtewBREJ0SdJl7AbUFl1kNKDDFv6SexsGn6PsH6sB4OK6WRPhisHRoeKxaN/x1HHU 3/U4sdgQ/zbmr9SIzfou7JiXogCljUH6krHqqRohqabBJo3jUI8M1ARJlWnHHDDexQp3 QHDQU/UDNfNZTNjV3VALt0ly8kJWEPWq3KovFwgN07gtJ2PeJpp9lsBiv9t5zlOY6p9K QJ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:to:from:dkim-signature; bh=zBUWrYD2T8UqpcXT3kVPMPICqVcLNBhfdCorkrYZzvg=; fh=pD9NMAE6punlmxDz2SM7DMFwkWrKOHAvTYxfub7CxRs=; b=fQhpuAePYoNwFoTd0MAilegi0kxWmAS5O4zCduRqGUwJHDvjbrR//6p+TE70VyeQT7 aLIi0PACOc87I2yBqD6UVeS4d6mfa8aLtNbPr9Bz0kBg3iamFJHaFlayJTohfgRAoVlW m/dZGwKerbtcD2c0hg+tnLGSHdTWFTBsMk2oFe/hX+HpxUWLrw3Dswc7MvG1j6JesXNu UJ3VTjeYOXbmanQQHI2Ni3eKqx7Li83Mim3/WI8+pvYCvdYy91Q1bSUXBhmoX2IpqEgH vkzUNW2EJicYvOwRGmzvBCI4/8TrFjgV3bSuIbXD4EOaw9HblfxKpV4eZoT0SV45shjx uRmw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=mY0zrmlc; spf=pass (google.com: domain of fm-51332-202510061832178764f69641000207d9-ahwvdw@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-51332-202510061832178764f69641000207d9-AHwVDW@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id d75a77b69052e-4e55ccdcdf6si26931cf.3.2025.10.06.11.32.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Oct 2025 11:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-51332-202510061832178764f69641000207d9-ahwvdw@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 202510061832178764f69641000207d9 for ; Mon, 06 Oct 2025 20:32:17 +0200 From: "'Quirin Gylstorff' via isar-users" To: isar-users@googlegroups.com, jan.kiszka@siemens.com, felix.moessbauer@siemens.com, cedric.hombourger@siemens.com Subject: [RFC PATCH v3 10/10] user_manual: Add dracut for initramfs generation Date: Mon, 6 Oct 2025 20:31:12 +0200 Message-ID: <20251006183214.1593195-11-Quirin.Gylstorff@siemens.com> In-Reply-To: <20251006183214.1593195-1-Quirin.Gylstorff@siemens.com> References: <20251006183214.1593195-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer X-Original-Sender: quirin.gylstorff@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=mY0zrmlc; spf=pass (google.com: domain of fm-51332-202510061832178764f69641000207d9-ahwvdw@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-51332-202510061832178764f69641000207d9-AHwVDW@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Quirin Gylstorff Reply-To: Quirin Gylstorff Content-Type: text/plain; charset="UTF-8" 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=-2.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_PSBL, 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: /GA15IGPXBB6 From: Quirin Gylstorff Signed-off-by: Quirin Gylstorff --- doc/user_manual.md | 51 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index 67f91973..a4707f0a 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -1680,10 +1680,11 @@ SRC_URI += "docker://debian;digest=sha256:f528891ab1aa484bf7233dbcc84f3c806c3e42 ## Customize the initramfs Isar supports the customization of initramfs images by providing an -infrastructure for quickly creating hooks and by allowing to replace the -Debian-generated image with a separately built one. +infrastructure for quickly creating hooks in case of `initramfs-tools` +or modules for `dracut` by allowing to replace the Debian-generated +image with a separately built one. -### Creating initramfs hooks +### Creating initramfs-tools hooks To create an initramfs hook that adds tools or modules to the image and may also run custom scripts during boot, use the include file @@ -1720,6 +1721,33 @@ initramfs. See `initramfs-example` for an exemplary hook recipe. +### Creating dracut modules + +To create a custom dracut module that adds tools, kernel-modules or services +to the initrd, use the include file `recipes-initramfs/dracut-module/dracut-module.inc`. +It is controlled by following variables: + +- `DRACUT_REQUIRED_BINARIES` defines the binaries required by the module. +- `DRACUT_MODULE_DEPENDENCIES` defines dependencies to other dracut modules. +- `DRACUT_MODULE_NO` defines the module number which prefixes the module name +to define the execution order.The default is `50`. +- `DRACUT_MODULE_NAME` the name of the module which is used to install the +module in the initrd or as a dependency to other modules. It defaults to +`${PN}` without the prefix `dracut-`. +- `DRACUT_MODULE_PATH` contains the path to the installed module. It is set +to `${D}/usr/lib/dracut/modules.d/${DRACUT_MODULE_NO}${DRACUT_MODULE_NAME}/` + +The `install()` function is added by storing the file `install.sh` in the +files directory of the dracut module. + +Other files can by added to the module by coping them to the Module folder +with: +```bash +install -m 666 ${WORKDIR}/lighttpd.service ${DRACUT_MODULE_PATH} +``` + +See `dracut-example-lighttpd` for an exemplary hook recipe. + ### Creating an initramfs image aside the rootfs To avoid shipping all tools and binaries needed to generate an initramfs, isar @@ -1733,4 +1761,19 @@ self-built packages and `INITRAMFS_PREINSTALL` for prebuilt ones, analogously to the respective `IMAGE_*` variables. Note that the kernel is automatically added to `INITRAMFS_INSTALL` if `KERNEL_NAME` is set. -See `isar-initramfs` for an example recipe. +See `isar-initramfs` or `isar-dracut` for an example recipes. + +#### dracut config + +A dracut initramfs can be configured by the command line or a configuration file. +The use configuration files is preferred: + - Debian provides dracut-config-* packages + - It is easier to upstream and to maintain. + +The configuration file can be chosen with the variable `DRACUT_CONFIG_PATH`. This variable +contains the absolut path to the used configuration in the root file system. + +Still there are some use cases like debugging to add modules via the command line. +For this the recipe meta/classes/initrd-dracut.bbclass provides the following options: + - `DRACUT_EXTRA_DRIVERS` add extra drivers to the dracut initrd + - `DRACUT_EXTRA_MODULES` add extra modules to the dracut initrd -- 2.51.0 -- 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 email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251006183214.1593195-11-Quirin.Gylstorff%40siemens.com.