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; Wed, 05 Nov 2025 10:37:35 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f63.google.com (mail-wr1-f63.google.com [209.85.221.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5A59bYVO016663 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 5 Nov 2025 10:37:34 +0100 Received: by mail-wr1-f63.google.com with SMTP id ffacd0b85a97d-429be5aee5bsf2212690f8f.3 for ; Wed, 05 Nov 2025 01:37:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1762335446; cv=pass; d=google.com; s=arc-20240605; b=g1K5EbkGC7UhDhC16Yt859uWUMljoe6lmqEH9qMb+em7P2BgVSRlx2W+P0Mho5sbTW kbiSV8mGCJmcUeV1O8Qt91uAbh/5r8/SR0uIO/dhwRc3qg0EP3Txg2pF/Dzv9H16J2qt J9HHQpe110dZUjzSgshqf+pL+ag5TvynuG/tt67KyrphJIPM77XwIYoaHQQAbnYGw20v BNt/fbv0ZzaKL6zAG5Xn4yIspta7H/R1w209Fwng7ho3h1TWwkwb731m6I/qgIhLAptk WFsTEES4rDW98n4ubMERuDuNqPQlJCM/SO1WA8TI6z9+lCGM9q5X8FYcEVc+BIiT3xPL pBIg== 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=cR/gojB4BUPLmhisLjWmBWBkxz55qSUyHvlEhjz/dHo=; fh=UfnTWrXFr63cwyrDkCr2nz2GrmCU0xG++rn+IIWtObA=; b=I6UkZvVKQ7xUm/rZSaH1+384O9sSd1uQqCjlQ1QkHWdwNhZmsxqRfznCf7n9rK5raj boT4ztr6mtnNHd7v3d2tpuwuFoBadWC/+8OeYNAkS0KMkOT6wKTFoqtv3iEt5tBDtRsR sEyVUJkYFXvMavlhlql2R1SNhdIsNVzIwM4BpLK+7Xp+rzJRVB0XrY3589Y3kukRjMgL Mmsjr6hYJeTKK2mJU5kaf26zY5CvPjxlSYl5g7rKe7tjbhNe3s2ofvK5BSzlGZT5D6NJ R8aKrqZElSOOgeiUL5Y2eOq7KnNImeuMbZEBWRmZq8XfEbNNRH4CpwpKb/ECelNyZ7O+ fpyg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=dvxLodkt; spf=pass (google.com: domain of fm-51332-2025110509372226c5324568000207e3-imcolh@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-2025110509372226c5324568000207e3-imcOLh@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=1762335446; x=1762940246; 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=cR/gojB4BUPLmhisLjWmBWBkxz55qSUyHvlEhjz/dHo=; b=Qhe6HA7thLnASB2u+gB2dtexHoSFbPgDI/X+PutUHUWDAgRMx7kPT1eELPmZHxPbvn apT0+L4d1gqFNOii/OxxRXQfY6K1NXf0bRnDfF3A6yUhqKHEitt6DRNKS11fvVcExQh6 IjvmDNI2KaLuhP6Wv5v0IVHzkpYHWVV6ZL9kyjN2jRUdETAKFrhM38PiO8PuU5askFEc P2fPPEhK84AKsqVitSlLyf5j1wlJsoiUz0uA/C9UtAOBE9mznMdHqaEyQmm6LKWXlPtu WD9JFlgCScEhZZQDihtKYmSQOPlqLDbAYP3YE3T9z/Ylhp3WbPxcdZULentjjb8WN9Md M5ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762335446; x=1762940246; 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=cR/gojB4BUPLmhisLjWmBWBkxz55qSUyHvlEhjz/dHo=; b=oJFIikVX7ZRSwqGQuuharp7nL+ouKXq9TZZ2UWy2fUecCBHp+sq9K6DZEFXDLuRD9w FBbAnTCGor3yzZZE1AZ3Ie2YLqLpml+xGicb3ZYzotGrUwB137DlMZdO2CwEMZ0TIZCo Xmm+0r+MvO7nDheqzsk8bgRqSp1kXhxQsQSuIqsbxman3Yr9iVEbWNUGSL0HfWtqyeG0 GbuNoHH/7ATHvJV8HfgL2cImfEs982bkc5KNm3QWQ4VY+yTU71u95fJ4Ngj2CN63XFwt zjaZBtv6wop+K/vibxaEn/v6aeGW87iBcAwLObt4ZwXEdpzyCXwJr9VbLPOL5mgVZD9B b0AQ== X-Forwarded-Encrypted: i=2; AJvYcCX8po2BBKVPQSbOyuR9NTFe0bzlDnGHXgBK1I6jOcyLpeTD9L3DHSeaBnj0jWEk/UgtBVKO@ilbers.de X-Gm-Message-State: AOJu0Yw4PH52EiahAxty702/psW81g8/B0q+KzlA3SGC0s6aYXH9uCeu vtMxHr8hYKVaDSPWHbxJnVhSziPIMqiB/f03X0MzsyDxKi9OJRB/Anni X-Google-Smtp-Source: AGHT+IF0M1z1nN3RwjEQZNA7NWBP3lY2rIHSd3agpXZZb1JisGKfp0KFXIbsvxwEOpSHFTgpOO5s6A== X-Received: by 2002:a05:6000:2681:b0:429:d41b:9fe0 with SMTP id ffacd0b85a97d-429e3305c49mr2303886f8f.38.1762335445940; Wed, 05 Nov 2025 01:37:25 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+bDin7SN8QJTq3gMfDVaHRbsXkLE1yeU+RZ4Q04IF/ZWg==" Received: by 2002:a5d:5d03:0:b0:426:f2f7:295c with SMTP id ffacd0b85a97d-429b4e07237ls2814299f8f.1.-pod-prod-04-eu; Wed, 05 Nov 2025 01:37:22 -0800 (PST) X-Received: by 2002:a05:6000:2c10:b0:427:630:4106 with SMTP id ffacd0b85a97d-429e3305d60mr1839015f8f.34.1762335442308; Wed, 05 Nov 2025 01:37:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762335442; cv=none; d=google.com; s=arc-20240605; b=k1+zB6CwpPsXIySzZ0f9+ODW67HDSvIgNWk4arASkxqJa5uF5NrK/x3U+X8/hBdcYx ipcQts1oC1vQlE4y/joiZcg72LmWFjf7q+yPNPyfqLaIwhPwnhA0njcaSzBh6vGoHoy/ ML/D0KoNWvpii89h/hLSnzOXVHU8YdFFK2tPq4tmWxgBTEoPw8CYPNrHwVR1nhqy6PEW P5KQc7ucL8nIoShDk8BLzKszdHWZzWY10QTZju1vMhSJddnW+McImTpiSOq82BGPRVIe 5/GC7UmJMXfDDHAleDx3GZ6kOf++lCcRUULO7Tuao4Jq/8zM7TE6GSocB+tP6k8cRlOw FFng== 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=blTQUz7aZnZ1URz08BIOGlryZsfskvrWBVtxsy8aow0=; fh=pD9NMAE6punlmxDz2SM7DMFwkWrKOHAvTYxfub7CxRs=; b=gGHAf5AoVKRcpcC1a3a2nqcpei/hVJVZFS/nALmx6Ux1pCMdeYG1tqQjwYTJ4qZN5c ZC43wWhkNe2MwcCrSo+P6PGt1CZkdHEB8S3Dclg/LIs+4+rLB8JCGMeCN0N8/Ch1MO6G VihEvq7ONXaDFAzc9qFPtVPTwfrYCZioPQUUCHn+MThIv6XcjmPSoh0fIp7AqO/+56rA a9K+qkfDa/hAdDVniWWab83e5LU0ESNzXC0WJP7HQO+SKZ9E+/MPEjKDwJiwBwI0ZPlB OwltX2/l2l/gH0S+x3J4ezhAFkI6+i9DAxsIhGv2UJXw0OF6WzS70wDHk+T7AOOxS51v L5/g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=dvxLodkt; spf=pass (google.com: domain of fm-51332-2025110509372226c5324568000207e3-imcolh@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-2025110509372226c5324568000207e3-imcOLh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-429dc1f3281si95523f8f.8.2025.11.05.01.37.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Nov 2025 01:37:22 -0800 (PST) Received-SPF: pass (google.com: domain of fm-51332-2025110509372226c5324568000207e3-imcolh@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 2025110509372226c5324568000207e3 for ; Wed, 05 Nov 2025 10:37:22 +0100 From: "'Quirin Gylstorff' via isar-users" To: isar-users@googlegroups.com, jan.kiszka@siemens.com, felix.moessbauer@siemens.com, cedric.hombourger@siemens.com Subject: [PATCH v6 13/13] user_manual: Add dracut for initramfs generation Date: Wed, 5 Nov 2025 10:29:28 +0100 Message-ID: <20251105093710.19582-14-Quirin.Gylstorff@siemens.com> In-Reply-To: <20251105093710.19582-1-Quirin.Gylstorff@siemens.com> References: <20251105093710.19582-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=fm1 header.b=dvxLodkt; spf=pass (google.com: domain of fm-51332-2025110509372226c5324568000207e3-imcolh@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-2025110509372226c5324568000207e3-imcOLh@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=-4.9 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_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: dqMMnEko6Ujo From: Quirin Gylstorff Signed-off-by: Quirin Gylstorff --- doc/user_manual.md | 73 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index ecb1fb2c..e7955c12 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -1682,13 +1682,36 @@ CONTAINER_DELETE_AFTER_LOAD = "1" SRC_URI += "docker://debian;digest=sha256:f528891ab1aa484bf7233dbcc84f3c806c3e427571d75510a9d74bb5ec535b33;tag=bookworm-20240701-slim" ``` + +## Switch from initramfs-tools to dracut + +To build a Isar image with dracut as the initramfs generator instead +of initramfs-tools in Debian 13(trixie) or previous versions add dracut +as a package to the image: + +``` +IMAGE_PREINSTALL += "dracut" +``` + +An dracut based initrd contains the file `/usr/lib/initrd-release`. In +case of trixie the file has the following content: + +```bash +NAME=dracut +ID=dracut +VERSION_ID="106-6" +ANSI_COLOR="0;34" +``` + + ## 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 @@ -1725,6 +1748,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 class `dracut-module`. +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 @@ -1738,4 +1788,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/20251105093710.19582-14-Quirin.Gylstorff%40siemens.com.