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 i ...
boot process. 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 ...
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 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 ha ...
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 ...
) 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 syste ...
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, 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 p ...
,
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 exten ...
,
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 fo ...
,
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 ...
,
DM RAID,
MD RAID,
LVM2,
device mapper multipath I/O,
dm-crypt,
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 prov ...
,
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/I ...
,
NBD and
NFS.
Adoption
Red Hat 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 on ...
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 software, commercial Open-source software, open-source Linux distribution developed by Red Hat for the commerce, commercial market. Red Hat Enterprise Linux is released in server versions for x86-6 ...
since version 6
*
openSUSE
openSUSE () is a free and open source 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.
Additionally the project creates a variety of tools, s ...
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 kernel blobs, a base install is composed e ...
*
OpenMandriva Lx, 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, syst ...
in 2011
*
Mageia since Mageia 2
*
Gentoo for distribution kernels since 2020,
for custom kernels possible since 2010
*
KaOS
KaOS is a desktop 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 th ...
*
Bottlerocket OS
*
EndeavourOS
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 De ...
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 model. The default installation is a minimal base system, ...
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