Dracut is a set of tools that provide enhanced functionality for automating the
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
boot process
In computing, booting is the process of starting a computer as initiated via hardware such as a button or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so so ...
. The tool named is used to create a Linux boot image (
initramfs
In Linux systems, initrd (''initial ramdisk'') 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 comm ...
) by copying tools and files from an installed system and combining it with the Dracut framework, which is usually found in .
Unlike existing Linux
boot image
A boot image is a type of disk image (a computer file containing the complete contents and structure of a storage medium). When it is transferred onto a boot device it allows the associated hardware to boot.
The ''boot image'' usually includes th ...
s, the Dracut framework attempts to introduce as little hard-coded logic into the initramfs as possible.
The initramfs has essentially one purpose: locating and
mounting the real
root file system
In a computer file system, and primarily used in the Unix and Unix-like operating systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the trunk of a tree, as the starting point where all branche ...
so that the boot process can transition to it.
This functionality is dependent on device availability.
Therefore, instead of having hard-coded
scripts
Script may refer to:
Writing systems
* Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire
* Script (styles of handwriting)
** Script typeface, a typeface with characteristics of handw ...
to determine device availability and suitability, Dracut's initramfs depends on the Linux device manager (
udev
udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices ar ...
) to create
symbolic link
In computing, a symbolic link (also symlink or soft link) is a file whose purpose is to point to a file or directory (called the "target") by specifying a path thereto.
Symbolic links are supported by POSIX and by most Unix-like operating system ...
s to
device node
A device is usually a constructed tool. Device may also refer to:
Technology Computing
* Device, a colloquial term encompassing desktops, laptops, tablets, smartphones, etc.
* Device file, an interface of a device driver
* Peripheral, any devic ...
s. 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.
Most of the initramfs generation functionality in Dracut is provided by generator modules that are sourced by the main tool to install specific functionality into the initramfs.
They live in the modules
subdirectory
In computing, a directory is a file system cataloging structure which contains references to other computer files, and possibly other directories. On many computers, directories are known as folders, or drawers, analogous to a workbench or the t ...
, and use functionality provided by dracut-functions to do their work.
Currently, dracut supports booting from
ext2
The ext2 or second extended file system is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same pr ...
,
ext3
ext3, or third extended filesystem, is a journaled file system that is commonly used by the Linux kernel. It used to be the default file system for many popular Linux distributions. Stephen Tweedie first revealed that he was working on extend ...
,
ext4
ext4 (fourth extended filesystem) is a journaling file system for Linux, developed as the successor to ext3.
ext4 was initially a series of backward-compatible extensions to ext3, many of them originally developed by Cluster File Systems for ...
,
btrfs
Btrfs (pronounced as "better F S", "butter F S", "b-tree F S", or simply by spelling it out) is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager (not to be confused ...
,
ISO_9660
ISO 9660 (also known as ECMA-119) is a file system for optical disc media. Being sold by the International Organization for Standardization (ISO) the file system is considered an international technical standard. Since the specification is av ...
,
DM RAID,
MD RAID,
LVM2
In Linux, Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management for the Linux kernel. Most modern Linux distributions are LVM-aware to the point of being able to have their root file systems on a log ...
,
device mapper multipath I/O,
dm-crypt
dm-crypt is a transparent block device encryption subsystem in Linux kernel versions 2.6 and later and in DragonFly BSD. It is part of the device mapper (dm) infrastructure, and uses cryptographic routines from the kernel's Crypto API. Unlike its ...
,
cifs
Server Message Block (SMB) is a communication protocol originally developed in 1983 by Barry A. Feigenbaum at IBM and intended to provide shared access to files and printers across nodes on a network of systems running IBM's OS/2. It also provides ...
,
FCoE
Fibre Channel over Ethernet (FCoE) is a computer network technology that encapsulates Fibre Channel frames over Ethernet networks. This allows Fibre Channel to use 10 Gigabit Ethernet networks (or higher speeds) while preserving the Fibre Channel ...
,
iSCSI
Internet Small Computer Systems Interface or iSCSI ( ) is an Internet Protocol-based storage networking standard for linking data storage facilities. iSCSI provides block-level access to storage devices by carrying SCSI commands over a TCP/IP ...
,
NBD and
NFS.
Adoption
Red Hat
Red Hat, Inc. is an American software company that provides open source software products to enterprises. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North Carolina, with other offices worldwide.
Red Hat has become ass ...
is the original author of dracut. Red Hat-derived
Linux distribution
A Linux distribution (often abbreviated as distro) 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 ...
s use dracut for initramfs creation. Use outside Red Hat-derived distributions is limited.
*
Fedora
A fedora () is a hat with a soft brim and indented crown.Kilgour, Ruth Edwards (1958). ''A Pageant of Hats Ancient and Modern''. R. M. McBride Company. It is typically creased lengthwise down the crown and "pinched" near the front on both sides ...
since version 12, Constantine
*
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a commercial open-source Linux distribution developed by Red Hat for the commercial market. Red Hat Enterprise Linux is released in server versions for x86-64, Power ISA, ARM64, and IBM Z and a desktop version ...
since version 6
*
openSUSE
openSUSE () is a free and open-source software, free and open source RPM Package Manager, RPM-based Linux distribution developed by the openSUSE project.
The initial release of the community project was a beta version of SUSE Linux 10.0.
Addi ...
since version 13.2, when it became the default initramfs creation tool
*
SUSE Linux Enterprise Server
SUSE Linux Enterprise (often abbreviated to SLE) is a Linux-based operating system developed by SUSE. It is available in two editions, suffixed with Server (SLES) for servers and mainframes, and Desktop (SLED) for workstations and desktop compu ...
since version 12
*
Void Linux
Void Linux is an independent Linux distribution that uses the X Binary Package System (XBPS) package manager, which was designed and implemented from scratch, and the runit init system. Excluding binary blobs, binary kernel blobs, a base install i ...
*
OpenMandriva Lx
OpenMandriva Lx is a Linux distribution forked from Mandriva Linux. It is maintained by the OpenMandriva Association.
History Origin of the distribution
OpenMandriva Lx is a community Linux distribution. Originally an offering of Mandriva Linu ...
, since it was
Mandriva Linux
Mandriva Linux (a fusion of the French distribution Mandrake Linux and the Brazilian distribution Conectiva Linux) is a discontinued Linux distribution developed by Mandriva S.A.
Each release lifetime was 18 months for base updates (Linux, syste ...
in 2011
*
Mageia
Mageia is a Linux-based operating system, distributed as free and open source software. It was forked from the Mandriva Linux distribution. The Greek term () means enchantment, fascination, glamour, wizardry.
The first release of the software ...
since Mageia 2
*
Gentoo for distribution kernels since 2020,
for custom kernels possible since 2010
*
KaOS
KaOS is a desktop Linux distribution that features the latest version of the KDE desktop environment, the LibreOffice office suite, and other popular software applications that use the Qt toolkit.
History
The first version of KaOS was released ...
*
Bottlerocket OS
*
EndeavourOS
EndeavourOS is a Linux distribution based on Arch Linux. EndeavourOS features the graphical Calamares (software), Calamares installer capable of installing the Xfce, Budgie (desktop environment), Budgie, Cinnamon (desktop environment), Cinnamon, ...
Distributions which include dracut, but do not use it by default for initramfs creation:
*
Debian
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of D ...
since version 6 (Squeeze)
*
Arch Linux
Arch Linux () is an independently developed, x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a Rolling release, rolling-release model. The default installation is a minim ...
in extra repository
*
Ubuntu Linux
Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: ''Desktop'', '' Server'', and ''Core'' for Internet of things devices and robots. All ...
since 18.04
Most other distributions have made dracut available as an optiona
packageto replace the distributions default initramfs generator.
See also
References
External links
Dracut source filesDracut manual page
{{Linux kernel
Linux kernel