### Dracut Module Setup Script Functions Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md Details the core functions within a `module-setup.sh` script: `install()` for non-kernel files, `installkernel()` for kernel files, `check()` for module installation validation, and `depends()` for specifying module dependencies. ```bash # install() - Installs non-kernel files. # dracut supplies specialized install functions for different file types. install() { # Example: Copying a file from the module directory # inst "$moddir/my_file.txt" } # installkernel() - Installs kernel-related files. installkernel() { # Example: Installing a kernel module # instmods my_kernel_module } # check() - Checks if the module can be installed. # Exits 0 if files are present, 1 otherwise. # When called with $hostonly, also checks if functionality is used on the host. check() { # Example: Check for a required binary # command -v my_tool >/dev/null 2>&1 return $? } # depends() - Outputs a list of dracut modules this module relies on. depends() { # Example: Depends on the network module # echo network } ``` -------------------------------- ### Dracut Module Setup Scripting Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Illustrates the consolidation of `check`, `install`, and `installkernel` functionalities into a single `module-setup.sh` script. This streamlines module development and integration. ```sh merged check, install, installkernel to module-setup.sh ``` -------------------------------- ### Format Shell Files with shfmt (Go Get) Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md This snippet shows an alternative method to install and use 'shfmt' via Go modules, assuming Go is installed and configured. It then executes 'shfmt' to format shell files. ```go GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt ``` ```console $GOPATH/bin/shfmt -w -s . ``` -------------------------------- ### Dracut Configuration Example Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md An example of how distribution-specific settings for dracut should be shipped in a configuration file. This allows for customization of dracut's behavior. ```bash # your distribution should ship those settings in # /etc/dracut.conf.d/01-distro.conf # see dracut.conf.d/fedora.conf.example ``` -------------------------------- ### Dracut Multipathd Systemd Start Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Starts the multipathd service using systemd. ```sh start multipathd via systemd service ``` -------------------------------- ### Install Binaries from PATH Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Installs all binaries found in the system's PATH, ensuring necessary executables are available in the initramfs. ```shell dracut --install ``` -------------------------------- ### Log Installed Files with --loginstall Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Records all files installed from the host filesystem into a specified directory. This is useful for tracking installed components for later removal or analysis. ```shell dracut --loginstall /path/to/install/log ``` -------------------------------- ### Dracut Syslog Start Move Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The start of the syslog service has been moved from udev to initqueue/online. ```bash move start from udev to initqueue/online ``` -------------------------------- ### Debug a Specific Dracut Test Case Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md This guide explains how to debug an individual dracut test case. It involves navigating to the specific test directory, performing setup, running the test, and then re-running the test without the setup phase if modifications are made to kernel parameters or test scripts. ```console cd TEST-01-BASIC sudo make clean setup run ``` ```console # ... change some kernel parameters in test.sh ... sudo make run ``` -------------------------------- ### Dracut Crypto Module Installation Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Crypto modules are now installed in the `90kernel-modules` stage to ensure they are available early in the boot process. ```bash # Install crypto modules in 90kernel-modules ``` -------------------------------- ### Dracut lsinitrd Command Example Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Example of using the lsinitrd command to list loaded kernel modules when hostonly mode is enabled, by specifying the path to the loaded kernel modules text file. ```bash lsinitrd $image -f */lib/dracut/loaded-kernel-modules.txt ``` -------------------------------- ### Dracut Module Directory Structure Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md Illustrates the standard file and directory layout for a dracut module, including the module setup script and other necessary files. ```bash dracut_install_dir/modules.d/ 00modname/ module-setup.sh check ``` -------------------------------- ### Install Thin Utils for Non-Hostonly LVM Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Installs LVM thin provisioning utilities when not using the hostonly configuration. ```shell # LVM thin utils installed for non-hostonly setups. ``` -------------------------------- ### Dracut: Grub Configuration for Multiple Initramfs Images Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Example GRUB configuration showing how to load multiple initramfs images, including the main initrd, a kernel-specific image, and a configuration image. ```bash title Fedora (2.6.29.5-191.fc11.i586) root (hd0,0) kernel /vmlinuz-2.6.29.5-191.fc11.i586 ro rhgb quiet initrd /initrd-20090722.img /initrd-kernel-2.6.29.5-191.fc11.i586.img /initrd-config.img ``` -------------------------------- ### Require Binaries in Module Setup Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces new functions, require_binaries() and require_any_binary(), to be used in the check() section of module-setup.sh for dependency management. ```shell require_binaries("binary1", "binary2") require_any_binary("binaryA", "binaryB") ``` -------------------------------- ### Install All Crypto Modules in Generic Initrd Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures that all necessary crypto modules are installed in the generic initrd image. This is crucial for supporting encrypted root filesystems. ```bash install all crypto modules in the generic initrd ([10f9e569](https://github.com/dracutdevs/dracut/commit/10f9e569c52654ff54678a626a0f5dd14233716d)) ``` -------------------------------- ### Dracut Configuration: Install Items Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Demonstrates how to add custom files to the initramfs using the `install_items` option in `dracut.conf`. This allows for including specific files or directories needed during the early boot process. ```sh install_items+=" [ ...] " ``` -------------------------------- ### Install Optional Items with --install-optional Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Installs optional items into the initramfs. This can be specified either as a command-line argument or via a configuration option. ```shell dracut --install-optional ``` ```shell install_optional_items=" " ``` -------------------------------- ### Install All Depmod Relevant Configuration Files Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Installs all configuration files relevant to `depmod` within `dracut.sh`. This ensures proper module dependency handling. ```bash install all depmod relevant configuration files ([50a01dd4](https://github.com/dracutdevs/dracut/commit/50a01dd4b28471c0dfa810a705e219963bd5ec3c)) ``` -------------------------------- ### Install All Host Filesystem Drivers in Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This states that dracut now installs all available host filesystem drivers. ```shell install all host filesystem drivers ``` -------------------------------- ### Multipath: Start before local-fs-pre.target Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures that the multipath service starts before the 'local-fs-pre.target' systemd unit. ```shell start before local-fs-pre.target ``` -------------------------------- ### Dracut-install Globbing for Firmware Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The dracut-install utility now supports globbing for resolving 'firmware:' entries, allowing for more flexible installation of firmware files. ```shell install: Globbing support for resolving "firmware:" ``` -------------------------------- ### Dracut: QEMU and QEMU-NET Modules Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces new dracut modules, qemu and qemu-net, designed to install necessary kernel drivers for QEMU environments, facilitating network and storage access. ```bash # new dracut module qemu and qemu-net to install all kernel driver ``` -------------------------------- ### Dracut: Remove unnecessary setup steps in tests Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Removes redundant setup steps from dracut tests. This streamlines the testing process and improves efficiency. ```shell #!/bin/bash # remove unnecessary setup steps # ... (implementation details) ``` -------------------------------- ### 90kernel-modules: Install Generic Crypto Modules Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Configures the 90kernel-modules module to install generic crypto modules when `hostonly` is unset. This ensures that essential cryptographic functionalities are available in the initramfs. ```shell # 90kernel-modules script snippet for installing crypto modules if [ "$hostonly" = "no" ]; then inst_crypto_modules fi ``` -------------------------------- ### Dracut FCoE Pre-trigger Stage Fix Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The pre-trigger stage in `95fcoe` has been fixed by replacing `exit` with `return` in `lldpad.sh`. The default for `rd.nofcoe` is now `false`, and the module is not installed if no FCoE hostonly devices are present. ```bash # fix pre-trigger stage by replacing exit with return in lldpad.sh # default rd.nofcoe to false # don't install if there is no FCoE hostonly devices ``` -------------------------------- ### Dracut: Using PARTUUID for Root Filesystem Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Shows how to specify the root filesystem using the PARTUUID parameter. This is a reliable way to identify partitions, especially in complex storage setups. ```bash # add PARTUUID as root=PARTUUID= parameter ``` -------------------------------- ### Install multipathd.socket Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit ensures that the `multipathd.socket` unit is installed. This is necessary for the proper functioning of the multipath daemon, allowing it to manage device paths effectively. ```bash install -m 644 ${srcdir}/multipathd.socket ${initramfs_root}/usr/lib/systemd/system/ ``` -------------------------------- ### Dracut Command Line Options for i18n Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This snippet details command-line options for controlling the installation of internationalization (i18n) files in Dracut. It explains how to either install all i18n files or only host-specific ones. ```bash --no-hostonly-i18n -> install_i18n_all=yes --hostonly-i18n -> install_i18n_all=no ``` -------------------------------- ### Install: Add default for --firmwaredirs Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This feature adds a default value for the `--firmwaredirs` option in the install module, simplifying its usage. ```shell --firmwaredirs ``` -------------------------------- ### Dracut Rngd Module Updates Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The 06rngd module now ensures that dependent libraries are installed and prevents the rngd service from starting inside a container. ```shell install dependant libs too Do not start inside container ``` -------------------------------- ### Kernel-network-modules: Install from mdio Subdirectory Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Extends the kernel-network-modules module to also install network modules found in the `mdio` subdirectory. This ensures broader network driver support. ```shell # kernel-network-modules script snippet inst_modules "$(find /lib/modules/$(uname -r)/kernel/drivers/net/mdio/ -name '*.ko')" ``` -------------------------------- ### Plymouth: Install Binaries with Dependencies Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures that Plymouth binaries are installed along with their required dependencies by the plymouth module. This guarantees that Plymouth functions correctly within the initramfs. ```shell # plymouth module script snippet inst_multiple plymouthd plymouth-quit-wait inst_hook -b plymouth-start 99 "/usr/bin/plymouth --ping" ``` -------------------------------- ### Install: Configure logging earlier Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This change configures logging at an earlier stage in the installation process, potentially resolving issues related to logging initialization. ```shell install ``` -------------------------------- ### Generate Release Notes with Clog Source: https://github.com/dracutdevs/dracut/blob/master/docs/RELEASE.md Uses the clog-cli tool to generate a first template for release notes by fetching data from the Dracut GitHub repository. ```bash clog -F -r https://github.com/dracutdevs/dracut ``` -------------------------------- ### Repair dracut-util Installation Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Addresses an issue with the installation process of the 'dracut-util' package, ensuring it installs correctly and its components are properly set up. ```bash d7acf107 ``` -------------------------------- ### Dracut Module: Initqueue/Timeout Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces the `initqueue/timeout` queue mechanism, useful for handling scenarios like starting degraded RAID arrays after a delay. ```sh initqueue/timeout queue e.g. for starting degraded raids ``` -------------------------------- ### install: Segfault on popen Error Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit addresses a segmentation fault that occurred when handling errors from the 'popen' function within the install utility. This improves the robustness of the installation process. ```c // Example of handling popen error in C: // FILE *fp = popen("command", "r"); // if (!fp) { // perror("popen failed"); // // Handle error gracefully to prevent segfault // } ``` -------------------------------- ### Dracut FCoE Initialization Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Specifies that FCoE initialization now starts with 'fcoemon' instead of 'fipvlan'. ```sh fcoe: start with fcoemon instead of fipvlan ``` -------------------------------- ### Install Non-HWCAP Libraries in Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This indicates that dracut now installs non-HWCAP libraries. ```shell also install non-hwcap libs ``` -------------------------------- ### Dracut-install Debugging Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Demonstrates how to debug the dracut-install utility itself when it's run by dracut, without debugging the dracut scripts. This allows for focused debugging of the installation process. ```shell DRACUT_INSTALL="valgrind dracut-install" DRACUT_INSTALL="dracut-install --debug" ``` -------------------------------- ### Check for nm-initrd-generator in Multiple Locations Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The system now checks for 'nm-initrd-generator' in both '/usr/libexec' and '/usr/lib' directories. This improves compatibility with different installation layouts. ```bash check for nm-initrd-generator in both /usr/{libexec,lib} ``` -------------------------------- ### Default Installed Font in Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This states that the default installed font in dracut is now 'latarcyrheb-sun16'. ```shell default installed font is now latarcyrheb-sun16 ``` -------------------------------- ### Create Initramfs Image with Dracut Source: https://github.com/dracutdevs/dracut/blob/master/README.md The dracut tool is used to generate an initramfs image. It achieves this by copying necessary tools and files from the installed system and integrating them with the dracut framework, typically located in /usr/lib/dracut/modules.d. ```Shell dracut ``` -------------------------------- ### Dracut Kernel Module Installation Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md States that all HID drivers are now installed as kernel modules. ```sh kernel-modules: install all HID drivers ``` -------------------------------- ### Dracut Module Introduction: systemd-integritysetup Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This entry announces the introduction of the systemd-integritysetup module into Dracut. This module provides functionality related to integrity-protected block devices as managed by systemd. ```Shell # Conceptual inclusion of systemd-integritysetup module in dracut configuration # add_dracutmodule systemd-integritysetup ``` -------------------------------- ### Dracut Systemd: Add systemd-tmpfiles-setup-dev-early.service Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit adds the `systemd-tmpfiles-setup-dev-early.service` to Dracut's systemd integration. This service is responsible for setting up temporary files early in the boot process, potentially for device initialization. ```bash # Example of a systemd unit file that might be added: # [Unit] # Description=Setup /dev early with tmpfiles # DefaultDependencies=no # Before=sysinit.target # # [Service] # Type=oneshot # ExecStart=/usr/bin/systemd-tmpfiles --create --early # # [Install] # WantedBy=initrd.target ``` -------------------------------- ### install: Use size_t to Avoid -Wsign-compare Warning Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit replaces integer types with 'size_t' for size-related operations in the install utility. This resolves a compiler warning (-Wsign-compare) and promotes safer integer handling. ```c // Example of using size_t: // size_t file_size = get_file_size("file.txt"); // if (file_size > MAX_SIZE) { ... } ``` -------------------------------- ### No Code Found Source: https://github.com/dracutdevs/dracut/wiki/Wiki-LICENSE The provided content does not contain any code snippets. It is a legal document defining terms. -------------------------------- ### Install systemd-sysroot-fstab-check Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Installs the 'systemd-sysroot-fstab-check' utility, enhancing systemd integration for root filesystem checks. ```bash 23684e4a ``` -------------------------------- ### DMSquash-live: Enable OverlayFS for LiveOS root filesystem Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Enables the use of OverlayFS as the root filesystem for LiveOS, with the 'rd.live.overlay.overlayfs' option controlling its activation. Supports transient, in-RAM, and persistent overlays. ```shell enable the use of the OverlayFS for the LiveOS root filesystem ``` ```shell Patch notes: Integrate the option to use an OverlayFS as the root filesystem into the 90dmsquash-live module for testing purposes. The rd.live.overlay.overlayfs option allows one to request an OverlayFS overlay. If a persistent overlay is detected at the standard LiveOS path, the overlay & type detected will be used. Tested primarily with transient, in-RAM overlay boots on vfat- formatted Live USB devices, with persistent overlay directories on ext4-formatted Live USB devices, and with embedded, persistent ``` -------------------------------- ### Update install script in Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The install script in Dracut is updated to prevent undefining _FILE_OFFSET_BITS. ```bash # do not undef _FILE_OFFSET_BITS ``` -------------------------------- ### Dracut: dracut-install Speedup Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces a new binary 'dracut-install' to significantly speed up the installation process. It's used by dracut-functions.sh if available. ```bash # dracut-install: # - new binary to significanlty speedup the installation process # - dracut-functions.sh makes use of it, if installed ``` -------------------------------- ### Dracut DASD Configuration File Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The `/etc/dasd.conf` file is only installed if it is present. ```bash # only install /etc/dasd.conf if present ``` -------------------------------- ### Create LVM Thin Snapshot Source: https://github.com/dracutdevs/dracut/blob/master/modules.d/80lvmmerge/README.md Creates a read-only LVM thin snapshot named 'reset' from the 'rhel/root' logical volume. ```bash # lvm lvcreate -pr -s rhel/root --name reset ``` -------------------------------- ### S390 CMS Setup Fixes in Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This mentions fixes related to the s390 CMS setup in dracut. ```shell s390: fixed cms setup ``` -------------------------------- ### Dracut Initramfs Live Image Support Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Explains the support for generic `rootfs.img` in live images, offering more flexibility than the previous `ext3fs.img` requirement. ```sh live image: support for generic rootfs.img (instead of ext3fs.img) ``` -------------------------------- ### Dracut Initramfs Support for /run Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Confirms the integration of `/run` support within the initramfs, aligning with modern systemd practices. ```sh support for /run ``` -------------------------------- ### Configure FCoE Booting with Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This snippet shows how to configure FCoE booting using dracut. It supports specifying the network device or MAC address and includes options for DCB support, although only 'nodcb' is currently functional. ```bash fcoe=: fcoe=: Examples: fcoe=eth0:nodcb fcoe=4A:3F:4C:04:F8:D7:nodcb ``` -------------------------------- ### Dracut FIPS HMAC Installation Fix Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Fixes the installation of `.hmac` files when Dracut is running in FIPS mode. ```bash fixed .hmac installation in FIPS mode ``` -------------------------------- ### install: Extend hwcaps Library Handling Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit extends the handling of hwcaps libraries to include those located under the glibc-hwcaps/ directory. This ensures that hardware-specific optimizations are correctly utilized. ```bash # Conceptual handling of glibc-hwcaps: # for lib in /usr/lib/glibc-hwcaps/*; do # if [ -f "$lib/libfoo.so.1" ]; then # # Install library # fi # done ``` -------------------------------- ### Fs-lib: Install fsck utilities Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit ensures that the necessary fsck utilities are installed as part of the fs-lib module. ```shell fsck ``` -------------------------------- ### Add OverlayFS Option for dmsquash-live Root Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces an option to use 'overlayfs' on a block device root for the dmsquash-live module. This allows for more flexible live system configurations. ```bash 813577e2 ``` -------------------------------- ### Add inst_libdir_dir() Helper in dracut-init.sh Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Adds a new helper function 'inst_libdir_dir()' to dracut-init.sh, likely for simplifying the installation of directory structures within the library path. ```bash cc669250 ``` -------------------------------- ### Pull in network.target in nm-initrd.service Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The 'nm-initrd.service' now pulls in 'network.target'. This ensures that network services are properly started and available during the initramfs stage when NetworkManager is used. ```bash pull in network.target in nm-initrd.service ``` -------------------------------- ### Format Shell Files with shfmt (Download) Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md This snippet demonstrates how to download, make executable, and use the 'shfmt' tool to format shell scripts recursively within a directory. It specifies a version for the download. ```console $ shfmt_version=3.2.4 $ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt $ chmod u+x shfmt $ ./shfmt -w -s . ``` -------------------------------- ### Dracut: New dracut-install Binary Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces a new binary, dracut-install, designed to significantly speed up the installation process. It's utilized by dracut-functions.sh when available. ```bash # dracut-install: # - new binary to significanlty speedup the installation process # - dracut-functions.sh makes use of it, if installed ``` -------------------------------- ### Format Shell Files with shfmt (PATH) Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md This snippet assumes 'shfmt' is already installed and available in the system's PATH. It then uses the 'make indent' target, which internally calls 'shfmt' if it's accessible. ```console make indent ``` -------------------------------- ### Restore musl Support in Install Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Reinstates support for the musl C library in the install process, ensuring compatibility with musl-based systems. ```shell #!/bin/bash # install: restore musl support # Commit: ce55a85ed5d902c19d75895508856f96ec2ceb1a ``` -------------------------------- ### Multipath: Do not fail startup on missing configuration Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Prevents the multipath service from failing during startup if configuration files are missing. ```shell do not fail startup on missing configuration ``` -------------------------------- ### Dracut Module: LVM Mirror Support Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Highlights the added support for LVM mirrors, including the ability to start degraded mirrors after a timeout, improving RAID resilience. ```sh support lvm mirrors start degraded lvm mirrors after a timeout ``` -------------------------------- ### Dracut: Man Pages Added Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md New man pages for 'lsinitrd' and 'mkinitrd' have been added. ```bash # man pages: lsinitrd and mkinitrd added ``` -------------------------------- ### Multipath: Start daemon after udev settle Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures that the multipath daemon starts only after the udev events have settled, preventing race conditions. ```shell start daemon after udev settle ``` -------------------------------- ### install: Use Wrapper for asprintf Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit replaces direct calls to 'asprintf' with a wrapper function. This can be done to add error handling, logging, or other custom behavior around the 'asprintf' call. ```c // Example of a wrapper for asprintf: // int safe_asprintf(char **strp, const char *fmt, ...) { // va_list ap; // va_start(ap, fmt); // int ret = vasprintf(strp, fmt, ap); // va_end(ap); // if (ret < 0) { // // Handle error // } // return ret; // } ``` -------------------------------- ### Dracut-init.sh: Specify missing or un-installable modules Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Enhances dracut-init.sh to explicitly indicate when a module cannot be found or installed. This provides clearer error reporting for module-related issues during initramfs creation. ```Shell dracut-init.sh --module-error-reporting ``` -------------------------------- ### Test DMSquash-Live Without ISO Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces a test case for dmsquash-live that does not require an ISO image. This allows for more flexible testing of live image functionality. ```bash dmsquash-live test without an iso ``` -------------------------------- ### Error Out Only in install() for dbus-daemon Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Modifies the `dbus-daemon` component to only error out within the `install()` function. This prevents potential issues during other stages of the build process. ```bash only error out in install() ([ae4fbb3d](https://github.com/dracutdevs/dracut/commit/ae4fbb3db4136e6e03a1c74d05ecc2a73b916401)) ``` -------------------------------- ### Require and Install NFS Binaries Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures that necessary binaries for NFS functionality are required and installed. This resolves potential missing dependency issues. ```bash require and install needed binaries ``` -------------------------------- ### Dracut: Install systemd-executor Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures that 'systemd-executor' is installed as part of the Dracut build. This component is necessary for proper systemd integration within the initramfs. ```Shell dracut --install=systemd-executor ``` -------------------------------- ### Dracut-init.sh: inst_libdir_file with dracutsysrootdir Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Updates dracut-init.sh to ensure that `inst_libdir_file` functions correctly when `dracutsysrootdir` is set. This allows for proper installation of library files within the specified sysroot. ```shell # dracut-init.sh function for installing library files inst_libdir_file() { local target_dir="$dracutsysrootdir/usr/lib" # ... rest of the function logic ... } ``` -------------------------------- ### Dracut: NVMF no did-setup file creation Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Removes the creation of the 'did-setup' file in NVMF configurations. This change simplifies the process and may resolve issues related to file system detection or setup. ```shell #!/bin/bash # Don't create did-setup file # ... (implementation details) ``` -------------------------------- ### Live Image Torrent Support Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Enables support for live images using torrents as a download handler. This allows booting from a live environment distributed via BitTorrent. ```shell root=live:torrent://example.com/liveboot.img.torrent ``` -------------------------------- ### Dracut Bug Fixes: DRM Module Setup Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md A fix for the DRM module in dracut to skip empty modalias files during module setup. ```shell skip empty modalias files in drm module setup ``` -------------------------------- ### Dracut NFS Server Order and Hostonly Mode Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md RPC services for NFS < 4 are only installed when hostonly is strict. The order of NFS servers during boot is changed to prioritize the `next-server` option. ```bash # only install rpc services for NFS < 4 when hostonly is strict # Change the order of NFS servers during the boot # (next-server option has higher priority than DHCP-server itself) # install less module if hostonly mode is strict ``` -------------------------------- ### Add ZFS Detection Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Implements detection for ZFS filesystems. This allows dracut to correctly identify and mount ZFS volumes during the boot process, ensuring ZFS-based systems can start. ```bash git commit --amend --no-edit 9582f02773c5115e14fe0992ec2db3935cb0e6eb ``` -------------------------------- ### Handle MAC Addresses with ip= Parameter in Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This example demonstrates how to handle MAC addresses using the 'ip=' kernel command line parameter in dracut. It specifies a MAC address followed by a network configuration method. ```shell ip=77-77-6f-6f-64-73:dhcp ``` -------------------------------- ### Bash: Safely manage shopt settings with trap Source: https://github.com/dracutdevs/dracut/blob/master/docs/BASH.md Explains how to use `trap` to restore `shopt` settings to their default state after a function executes, ensuring predictable behavior. ```bash func() { trap "$(shopt -p globstar)" RETURN shopt -q -s globstar } ``` -------------------------------- ### Drop Collect Installation for s390_rules Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The 's390_rules' module has had its 'collect' installation removed. This change likely simplifies the module's dependencies or build process. ```bash drop collect installation ``` -------------------------------- ### Run Dracut Testsuite on Bare Metal Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md Instructions for executing the dracut testsuite directly on a bare metal system. It covers basic execution, enabling verbose output for detailed logging, and selectively running specific tests by providing a list of test identifiers. ```console sudo make clean check ``` ```console sudo make V=1 clean check ``` ```console sudo make TESTS="01 20 40" clean check ``` -------------------------------- ### Do Not Install Systemd Files if Systemd is Disabled Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Prevents the installation of systemd files when systemd is not enabled in the build. This avoids unnecessary files and potential conflicts. ```bash bf8738d3 ``` -------------------------------- ### Add initrd-root-device.target to Dracut Flow Chart Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit updates the Dracut man pages by adding the `initrd-root-device.target` to the systemd unit file flow chart. This provides clearer documentation on the boot process and dependencies. ```bash # This commit likely modifies a .dot or .png file used for documentation. # No direct code execution snippet is applicable here, but it relates to systemd unit files. # Example of a systemd unit file that might be referenced: # [Unit] # Description=Wait for root device # DefaultDependencies=no # Before=local-fs.target # # [Install] # WantedBy=initrd.target ``` -------------------------------- ### Ask for Kernel Command Line Parameters with rd.cmdline=ask Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Prompts the user on the console to enter additional kernel command line parameters during boot. This is useful for interactive troubleshooting or specific boot configurations. ```shell rd.cmdline=ask ``` -------------------------------- ### Use Documentation= for Man Page Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Updates the dracut-systemd integration to use the `Documentation=` field to point to the relevant man page. This improves discoverability and documentation access for systemd services. ```bash git commit --amend --no-edit 42e8f17c2481d33a3d6ba23f653c835e0cda6994 ``` -------------------------------- ### Install: Sane default for --kerneldir Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit introduces a more sensible default value for the `--kerneldir` option in the install module, addressing issue #1505. ```shell --kerneldir ``` -------------------------------- ### Populate UEFI Cmdline in dracut.sh Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Ensures the 'uefi_cmdline' is populated in dracut.sh when no other command line arguments are provided, improving UEFI boot compatibility. ```bash 1157143d ``` -------------------------------- ### Do not install iscsi module if unsupported Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This change prevents the installation of the iSCSI module if the kernel does not support iSCSI functionality. This avoids unnecessary components and potential errors. ```bash if ! kernel_supports_iscsi; then exit 0 fi ``` -------------------------------- ### Dracut Mount /usr Logic Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Explains the logic for mounting `/usr` if the init path resides within `/usr`, improving flexibility in system layouts. ```sh try to mount /usr, if init points to a path in /usr ``` -------------------------------- ### Log Installed Files with -H flag Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Logs all installed files to /lib/dracut/hostonly-files when using the '-H' flag with inst* functions or dracut-install. This aids in managing hostonly files. ```shell dracut-install -H ``` -------------------------------- ### Dracut Cryptroot-Ask Warning Suppression Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The `cryptroot-ask` script will no longer issue a warning if `/run/cryptsetup` already exists. ```bash # cryptroot-ask: no warn if /run/cryptsetup exist ``` -------------------------------- ### Dracut DMSquash Timeout and Snapshots Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Details improvements to the dmsquash module, including increased timeout for checkisomd5, use of non-persistent metadata snapshots for transient overlays, overflow support for persistent snapshots, and avoidance of overlays for specific live installation scenarios. ```sh fixup for checkisomd5 - increase timeout for checkisomd5 - use non-persistent metadata snapshots for transient overlays. - overflow support for persistent snapshot. - use non-persistent metadata snapshots. - avoid an overlay for persistent, uncompressed, read-write live installations. ``` -------------------------------- ### Dracut QEMU Network Hostonly Mode Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md In hostonly mode, the QEMU network module is only installed if networking is required. Fewer modules are installed for strict hostonly mode. ```bash # in hostonly mode, only install if network is needed # install less module for strict hostonly mode ``` -------------------------------- ### Dracut iSCSI Systemd Integration Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Details how iSCSI startup is handled using systemd-run for asynchronous parallel execution. It also covers conditional startup based on network availability and route checks, with a fallback retry mechanism. ```sh iscsid now present in the initramfs - iscsistart is done with systemd-run asynchrone to do things in paralllel. Also restarted for every new interface which shows up. - If rd.iscsi.waitnet (default) is set, iscsistart is done only after all interfaces are up. - If not all interfaces are up and rd.iscsi.testroute (default) is set, the route to a iscsi target IP is checked and skipped, if there is none. - If all things fail, we issue a "dummy" interface iscsiroot to retry everything in the initqueue/timeout. ``` -------------------------------- ### Virtiofs Root Filesystem Support Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Introduces support for using virtiofs as the root filesystem. This enables dracut to mount and boot from filesystems shared via virtiofs, commonly used in containerized environments. ```bash git commit --amend --no-edit 4632f799954c18eb8f655efe05b1e6ce30246828 ``` -------------------------------- ### img-lib: Install rmdir Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit ensures that the 'rmdir' command is installed as part of the img-lib utilities. This is necessary for proper directory removal operations during image creation or manipulation. ```bash # Example of installing a command: # install -m755 /usr/bin/rmdir /usr/bin/rmdir ``` -------------------------------- ### Squash: Remove Trailing Slash for ld.so.conf.d Installation Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Removes the trailing slash when installing files into ld.so.conf.d. This ensures correct path formation and avoids potential configuration errors. ```C echo "cbd85597" ``` -------------------------------- ### Dracut-install: Catch ldd message 'cannot execute binary file' Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md The dracut-install binary helper now catches the specific 'cannot execute binary file' message from 'ldd', improving error handling. ```shell catch ldd message "cannot execute binary file" ``` -------------------------------- ### Dracut UEFI Boot Executable Creation Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Describes the '--uefi' argument for creating a UEFI boot executable. This combines the kernel, initramfs, and kernel command line into a single UEFI executable bootable by UEFI BIOS. ```sh support for creating a UEFI boot executable via argument "--uefi" With an EFI stub, the kernel, the initramfs and a kernel cmdline can be glued together to a single UEFI executable, which can be booted by a UEFI BIOS. ``` -------------------------------- ### install: Improve gettid Definition Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit refines the definition of the 'gettid' function within the install utility. This likely ensures a more accurate and reliable way to retrieve the thread ID. ```c // Example of gettid definition (conceptual): // #ifndef HAVE_GETTID // pid_t gettid(void) { // return syscall(SYS_gettid); // } // #endif ``` -------------------------------- ### Dracut Initramfs Driver Arguments Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Details the `rd.driver.{blacklist|pre|post}` arguments, which accept comma-separated lists of drivers for advanced control. ```sh rd.driver.{blacklist|pre|post} accept comma separated driver list ``` -------------------------------- ### Ensure 'tr' is Installed for Dracut Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This fix ensures that the 'tr' command-line utility is installed and available when building or running Dracut. 'tr' is a dependency for certain text manipulation tasks. ```bash dfbfd33b ``` ```bash a93fbc4a ``` -------------------------------- ### New dmsquash-live-autooverlay Module Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Adds a new module named 'dmsquash-live-autooverlay' to the dmsquash-live component, likely for automated overlay filesystem management in live environments. ```bash a3c67d27 ``` -------------------------------- ### Dracut NetworkManager Support Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Dracut now includes support for NetworkManager, allowing for more dynamic network configuration during boot. ```bash # NetworkManager support added to the network module ``` -------------------------------- ### install: Add Missing ret Value Assignment Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit adds a missing assignment for the 'ret' variable in the install utility. This ensures that the return value is correctly set, which is important for error handling. ```c // Example of assigning a return value: // int ret; // ret = some_operation(); // // ... // return ret; ``` -------------------------------- ### Format C Files with astyle Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md This snippet shows how to reformat C source files using the 'astyle' tool with a specified options file. It also mentions a Makefile target for convenience. ```console $ astyle --options=.astylerc ``` ```console make indent-c ``` -------------------------------- ### Add --verbose to KERNEL_INSTALL_VERBOSE Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit adds the `--verbose` flag to the kernel installation process when `KERNEL_INSTALL_VERBOSE` is set to 1. This provides more detailed output during kernel installations, aiding in debugging. ```bash if [ "$KERNEL_INSTALL_VERBOSE" = "1" ]; then kernel-install --verbose add "$kernel" "$version" fi ``` -------------------------------- ### Run Dracut Testsuite in Podman Container Source: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md This snippet outlines the steps to set up and run the dracut testsuite within a Podman container. It includes pulling a container image, running it with necessary volume mounts and capabilities, configuring dracut, compiling it, and executing the test suite, specifying kernel versions and tests to skip. ```console cd podman pull [CONTAINER] podman run --rm -it \ --cap-add=SYS_PTRACE --user 0 \ -v /dev:/dev -v ./:/dracut:z \ [CONTAINER] \ bash -l # cd /dracut # ./configure # make -j $(getconf _NPROCESSORS_ONLN) # cd test # make KVERSION="$(cd /lib/modules && ls -1 | tail -1)" V=1 SKIP="16 60 61" clean check ``` -------------------------------- ### Crypt: Add basic LUKS detached header support Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md Provides basic support for LUKS (Linux Unified Key Setup) with detached headers, allowing for more flexible disk encryption setups. ```shell add basic LUKS detached header support ``` -------------------------------- ### Bash: Create /run directories for NetworkManager Source: https://github.com/dracutdevs/dracut/blob/master/NEWS.md This commit adds logic to create necessary '/run' directories for the NetworkManager module. This ensures that runtime directories are available when needed. ```sh 49b61496: create /run directories ```