Dracut (software)

Last updated
Dracut
Original author(s) Harald Hoyer and others
Initial releaseJuly 2009;14 years ago (2009-07)
Stable release
102 / 29 May 2024;0 days ago (2024-05-29)
Repository
Written in C, Bash, Rust
Operating system Linux
Platform Linux kernel
Type initramfs
License GPLv2+, LGPLv2+
Website github.com/dracut-ng/dracut-ng/wiki

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. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to 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.

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">Sugar (desktop environment)</span> Free desktop environment based on GTK+

Sugar is a free and open-source desktop environment designed for interactive learning by children. It was developed by SugarLabs. Developed as part of the One Laptop per Child (OLPC) project, Sugar was the default interface on OLPC XO-1 laptop computers. The OLPC XO-1.5 and later provided the option of either the Gnome or Sugar interfaces.

<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 March 2023, there have been no updates released for Upstart since September 2014.

OtherOS is a feature of early versions of the PlayStation 3 video game console, allowing user installed software, such as Linux or FreeBSD. The feature was removed since system firmware update 3.21, released on April 1, 2010.

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 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 personal computer (PC), not only limited to Linux-distro PC, this firmware/program is called BIOS, which is stored in the mainboard. In embedded Linux system, this firmware/program is called boot ROM. After being loaded into RAM, bootloader will execute to load the second-stage bootloader. The second-stage bootloader will load the kernel image into memory, decompress and initialize it then pass control to this kernel image. 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">Moblin</span> Operating system

Moblin, short for 'mobile Linux', is a discontinued open source operating system and application stack for Mobile Internet Devices (MIDs), netbooks, nettops and embedded devices.

<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, they are mostly used for proprietary firmware images. While generally redistributable, binary blobs 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, kernel.org, retrieved 2012-10-10
  2. dracut documentation, kernel.org, 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