Dracut (software)

Last updated
Dracut
Original author(s) Harald Hoyer and others
Initial releaseJuly 2009;15 years ago (2009-07)
Stable release
105 / 13 October 2024;20 days ago (2024-10-13)
Repository
Written in C, Bash, Rust
Operating system Linux
Platform Linux kernel
Type Initial_ramdisk
License GPLv2+, LGPLv2+
Website dracut-ng.github.io

Dracut is a set of tools that provide enhanced functionality for automating the Linux boot process. The tool named dracut is used to create a Linux boot image (initramfs) by copying tools and files from an installed system and combining it with the Dracut framework, which is usually found in /usr/lib/dracut/modules.d.

Contents

Unlike existing Linux boot images, the Dracut framework attempts to introduce as little hard-coded logic into the initramfs as possible. [1] The initramfs has essentially one purpose: locating and mounting the real root file system so that the boot process can transition to it. [1] This functionality is dependent on device availability. [1] Therefore, instead of having hard-coded scripts to determine device availability and suitability, Dracut's initramfs depends on the Linux device manager (udev) to create symbolic links to device nodes. When the root file system's device node appears, Dracut mounts it as the new root file system. This helps to minimize the time required in initramfs so that things like a 5-second boot are now made possible. [1]

Most of the initramfs generation functionality in Dracut is provided by generator modules that are sourced by the main dracut tool to install specific functionality into the initramfs. [1] They live in the modules subdirectory, and use functionality provided by dracut-functions to do their work. [1]

Currently, dracut supports booting from ext2, ext3, ext4, btrfs, ISO_9660, DM RAID, MD RAID, LVM2, device mapper multipath I/O, dm-crypt, cifs, FCoE, iSCSI, NBD and NFS. [2]

Adoption

Red Hat is the original author of dracut. Red Hat-derived Linux distributions use dracut for initramfs creation.

Distributions which include dracut, but do not use it by default for initramfs creation:

Most other distributions have made dracut available as an optional package to replace the distribution's default initramfs generator.

See also

Related Research Articles

<span class="mw-page-title-main">Linux distribution</span> Operating system based on the Linux kernel

A Linux distribution is an operating system made from a software collection that includes the Linux kernel and often a package management system. They are often obtained from the website of each distribution, which are available for a wide variety of systems ranging from embedded devices and personal computers to servers and powerful supercomputers.

<span class="mw-page-title-main">Mandriva Linux</span> Linux distribution

Mandriva Linux is a discontinued Linux distribution developed by Mandriva S.A.

<span class="mw-page-title-main">Security-Enhanced Linux</span> Linux kernel security module

Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including mandatory access controls (MAC).

<span class="mw-page-title-main">GNU GRUB</span> Boot loader package

GNU GRUB is a boot loader package from the GNU Project. GRUB is the reference implementation of the Free Software Foundation's Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system's partitions.

Technical variations of Linux distributions include support for different hardware devices and systems or software package configurations. Organizational differences may be motivated by historical reasons. Other criteria include security, including how quickly security upgrades are available; ease of package management; and number of packages available.

In Linux systems, initrd is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted.

cdrtools is a collection of independent projects of free software/open source computer programs for CD and DVD authoring.

Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is also the name of free software, licensed under the GPL, for accessing Squashfs filesystems.

Dynamic Kernel Module Support (DKMS) is a program/framework that enables generating Linux kernel modules whose sources generally reside outside the kernel source tree. The concept is to have DKMS modules automatically rebuilt when a new kernel is installed.

<span class="mw-page-title-main">PulseAudio</span> Sound server for Unix-like operating systems

PulseAudio is a network-capable sound server program distributed via the freedesktop.org project. It runs mainly on Linux, including Windows Subsystem for Linux on Microsoft Windows and Termux on Android; various BSD distributions such as FreeBSD, OpenBSD, and macOS; as well as Illumos distributions and the Solaris operating system. It serves as a middleware in between applications and hardware and handles raw PCM audio streams.

<span class="mw-page-title-main">Mondo Rescue</span>

Mondo Rescue is free disaster recovery software. It supports Linux and FreeBSD (i386). It's packaged for multiple distributions. It also supports tapes, disks, USB devices, network and CD/DVD as backup media, multiple filesystems, LVM, software and hardware RAID. Restoration may be done from a physical media including OBDR tape support, or CD/DVD/USB media, or from the network through PXE.

Upstart is a discontinued event-based replacement for the traditional init daemon—the method by which several Unix-like computer operating systems perform tasks when the computer is started. It was written by Scott James Remnant, a former employee of Canonical Ltd. In 2014, Upstart was placed in maintenance mode, and other init daemons, such as systemd, were recommended in place of Upstart. Ubuntu moved away from Upstart with the release of version 15.04 in favor of migrating to systemd. As of June 2024, there have been no updates released for Upstart since September 2014.

<span class="mw-page-title-main">Software remastering</span>

Software remastering is software development that recreates system software and applications while incorporating customizations, with the intent that it is copied and run elsewhere for "off-label" usage. The term comes from remastering in media production, where it is similarly distinguished from mere copying.

The Linux booting process involves multiple stages and is in many ways similar to the BSD and other Unix-style boot processes, from which it derives. Although the Linux booting process depends very much on the computer architecture, those architectures share similar stages and software components, including system startup, bootloader execution, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons. Those are grouped into 4 steps: system startup, bootloader stage, kernel stage, and init process. When a Linux system is powered up or reset, its processor will execute a specific firmware/program for system initialization, such as the power-on self-test, invoking the reset vector to start a program at a known address in flash/ROM, then load the bootloader into RAM for later execution. In IBM PC–compatible personal computers (PCs), this firmware/program is either a BIOS or a UEFI monitor, and is stored in the mainboard. In embedded Linux systems, this firmware/program is called boot ROM. After being loaded into RAM, the bootloader will execute to load the second-stage bootloader. The second-stage bootloader will load the kernel image into memory, decompress and initialize it, and then pass control to this kernel image. The second-stage bootloader also performs several operation on the system such as system hardware check, mounting the root device, loading the necessary kernel modules, etc. Finally, the first user-space process starts, and other high-level system initializations are performed.

<span class="mw-page-title-main">RPM Package Manager</span> Package management system

RPM Package Manager (RPM) is a free and open-source package management system. The name RPM refers to the .rpm file format and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base.

<span class="mw-page-title-main">Linux-libre</span> Version of the Linux kernel without proprietary code

According to the Free Software Foundation Latin America, Linux-libre is a modified version of the Linux kernel that contains no binary blobs, obfuscated code, or code released under proprietary licenses. In the Linux kernel, those types of code are mostly used for proprietary firmware images. While generally redistributable, they do not give the user the freedom to audit, modify, or, consequently, redistribute their modified versions. The GNU Project keeps Linux-libre in synchronization with the mainline Linux kernel.

systemd Suite of system components for Linux

systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manager" — an init system used to bootstrap user space and manage user processes. It also provides replacements for various daemons and utilities, including device management, login management, network connection management, and event logging. The name systemd adheres to the Unix convention of naming daemons by appending the letter d. It also plays on the term "System D", which refers to a person's ability to adapt quickly and improvise to solve problems.

The Linux kernel can run on a variety of devices made by Apple, including devices where the unlocking of the bootloader is not possible with an official procedure, such as iPhones and iPads.

References

  1. 1 2 3 4 5 6 dracut Wiki, github.com, retrieved 2012-10-10
  2. dracut documentation, github.com, retrieved 2012-10-10
  3. Features/Dracut, FedoraProject, retrieved 2012-10-10
  4. RHEL6 SRPMS FTP, redhat.com, retrieved 2012-10-10
  5. openSUSE 13.2 Major features, openSUSE project, retrieved 2014-11-04
  6. Kernel - Void Linux Handbook, voidlinux.org, retrieved 2022-12-14
  7. dracut-010-6-mdv2011.0.noarch.rpm, pkgs.org, retrieved 2012-10-10
  8. Kernel [ permanent dead link ]
  9. Mageia App Db, mageia.madb.org, retrieved 2012-10-10
  10. kernel-install.eclass: Install logic for dist-kernels, Gentoo Foundation, retrieved 2022-11-06
  11. Dracut - Gentoo Wiki, wiki.gentoo.org, retrieved 2012-10-10
  12. Package: dracut (005-1), debian.org, retrieved 2012-10-10
  13. "Arch Linux - dracut 049-2 (x86_64)", www.archlinux.org, retrieved 2019-05-21
  14. Package: dracut (047-2) [universe], ubuntu.com, retrieved 2022-02-27
  15. "Alpine - dracut", www.alpinelinux.org, retrieved 2022-02-27