Jump to content

Dracut (software): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Lgombos (talk | contribs)
typo
Dsemy (talk | contribs)
No edit summary
 
(42 intermediate revisions by 17 users not shown)
Line 1: Line 1:
{{Short description|Software to automate the Linux boot process}}
{{lowercase title}}
{{lowercase title}}
{{Expand German|Dracut-Projekt|date=October 2012}}

{{Infobox software
{{Infobox software
| name = Dracut
| name = Dracut
Line 9: Line 8:
| logo_size =
| logo_size =
| logo_alt =
| logo_alt =
| screenshot = <!-- Image name is enough -->
| screenshot = Dracut output screenshot.png
| caption =
| caption = Output of dracut regenerating initramfs
| screenshot_size =
| screenshot_size =
| screenshot_alt =
| screenshot_alt =
| collapsible =
| collapsible =
| author = [[Harald Hoyer]] and [https://git.kernel.org/?p=boot/dracut/dracut.git;a=blob;f=AUTHORS others]
| author = [[Harald Hoyer]] and [https://github.com/dracut-ng/dracut-ng/blob/main/AUTHORS others]
| developer =
| developer =
| released = {{Start date and age|2009|07}}
| released = {{Start date and age|2009|07}}
| discontinued =
| discontinued =
| latest release version = 056
| latest release version = 105
| latest release date = {{Start date and age|2022|02|18|df=yes}}
| latest release date = {{Start date and age|2024|10|13|df=yes}}
| latest preview version =
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| programming language = [[C (programming language)|C]], [[Bash (Unix shell)|Bash]]
| programming language = [[C (programming language)|C]], [[Bash (Unix shell)|Bash]], [[Rust (programming language)|Rust]]
| operating system = [[Linux]]
| operating system = [[Linux]]
| platform = [[Linux kernel]]
| platform = [[Linux kernel]]
Line 29: Line 28:
| language count = <!-- DO NOT include this parameter unless you know what it does -->
| language count = <!-- DO NOT include this parameter unless you know what it does -->
| language footnote =
| language footnote =
| genre = [[initramfs]]
| genre = [[Initial_ramdisk]]
| license = [[GNU General Public License|GPLv2+]], [[GNU Lesser General Public License|LGPLv2+]]
| license = [[GNU General Public License|GPLv2+]], [[GNU Lesser General Public License|LGPLv2+]]
| website = {{URL|https://github.com/dracutdevs/dracut/wiki}}
| website = {{URL|https://dracut-ng.github.io}}
}}
}}


'''Dracut''' is a set of tools that provide enhanced functionality for automating the [[Linux]] [[Booting|boot process]]. The tool named {{mono|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 {{mono|/usr/lib/dracut/modules.d}}.
'''Dracut''' is a set of tools that provide enhanced functionality for automating the [[Linux]] [[Booting|boot process]]. The tool named {{mono|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 {{mono|/usr/lib/dracut/modules.d}}.


Unlike existing Linux [[boot image]]s, the Dracut framework attempts to introduce as little hard-coded logic into the initramfs as possible.<ref name="dracut Wiki"/> The initramfs has essentially one purpose: locating and [[Mount (computing)|mounting]] the real [[root file system]] so that the boot process can transition to it.<ref name="dracut Wiki"/> This functionality is dependent on device availability.<ref name="dracut Wiki"/> Therefore, instead of having hard-coded [[Script (computer programming)|scripts]] to determine device availability and suitability, Dracut's initramfs depends on the Linux device manager ([[udev]]) to create [[symbolic link]]s to [[device node]]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.<ref name="dracut Wiki">{{citation |url=https://dracut.wiki.kernel.org/ |title=dracut Wiki |publisher=kernel.org |access-date=2012-10-10}}</ref>
Unlike existing Linux [[boot image]]s, the Dracut framework attempts to introduce as little hard-coded logic into the initramfs as possible.<ref name="dracut Wiki"/> The initramfs has essentially one purpose: locating and [[Mount (computing)|mounting]] the real [[root file system]] so that the boot process can transition to it.<ref name="dracut Wiki"/> This functionality is dependent on device availability.<ref name="dracut Wiki"/> Therefore, instead of having hard-coded [[Script (computer programming)|scripts]] to determine device availability and suitability, Dracut's initramfs depends on the Linux device manager ([[udev]]) to create [[symbolic link]]s to [[device node]]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.<ref name="dracut Wiki">{{citation |url=https://github.com/dracut-ng/dracut-ng/wiki |title=dracut Wiki |publisher=github.com |access-date=2012-10-10}}</ref>


Most of the initramfs generation functionality in Dracut is provided by generator modules that are sourced by the main {{mono|dracut}} tool to install specific functionality into the initramfs.<ref name="dracut Wiki"/> They live in the modules [[subdirectory]], and use functionality provided by dracut-functions to do their work.<ref name="dracut Wiki" />
Most of the initramfs generation functionality in Dracut is provided by generator modules that are sourced by the main {{mono|dracut}} tool to install specific functionality into the initramfs.<ref name="dracut Wiki"/> They live in the modules [[subdirectory]], and use functionality provided by dracut-functions to do their work.<ref name="dracut Wiki" />


Currently, dracut supports booting from [[ext2]], [[ext3]], [[ext4]], [[btrfs]], [[ISO_9660]], [[Device mapper|DM RAID]], [[mdadm|MD RAID]], [[LVM2]], [[Linux_DM_Multipath|device mapper multipath I/O]], [[dm-crypt]], [[cifs]], [[FCoE]], [[iSCSI]], [[Network block device|NBD]] and [[Network File System|NFS]].<ref name="dracut documentation">{{citation |url=https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html#dracutcmdline7 |title=dracut documentation |publisher=kernel.org |access-date=2012-10-10}}</ref>
Currently, dracut supports booting from [[ext2]], [[ext3]], [[ext4]], [[btrfs]], [[ISO_9660]], [[Device mapper|DM RAID]], [[mdadm|MD RAID]], [[LVM2]], [[Linux_DM_Multipath|device mapper multipath I/O]], [[dm-crypt]], [[cifs]], [[FCoE]], [[iSCSI]], [[Network block device|NBD]] and [[Network File System|NFS]].<ref name="dracut documentation">{{citation |url=https://dracut-ng.github.io/dracut.html#dracutcmdline7 |title=dracut documentation |publisher=github.com |access-date=2012-10-10}}</ref>


==Adoption==
==Adoption==
[[Red Hat]] is the original author of dracut. Red Hat-derived [[Linux distribution]]s use dracut for initramfs creation. Use outside Red Hat-derived distributions is limited.
[[Red Hat]] is the original author of dracut. Red Hat-derived [[Linux distribution]]s use dracut for initramfs creation.
* [[Fedora (operating system)|Fedora]] since version 12, Constantine<ref name="Fedora Feature">{{citation
* [[Fedora Linux]] since version 12, Constantine<ref name="Fedora Feature">{{citation
| url = https://fedoraproject.org/wiki/Features/Dracut
| url = https://fedoraproject.org/wiki/Features/Dracut
| title = Features/Dracut
| title = Features/Dracut
Line 60: Line 59:
| access-date = 2014-11-04}}</ref>
| access-date = 2014-11-04}}</ref>
* [[SUSE Linux Enterprise Server]] since version 12
* [[SUSE Linux Enterprise Server]] since version 12
* [[Void Linux]]
* [[Void Linux]]<ref name="voidlinux">{{citation
| url = https://docs.voidlinux.org/config/kernel.html
| title = Kernel - Void Linux Handbook
| publisher = voidlinux.org
| access-date = 2022-12-14}}</ref>
* [[OpenMandriva Lx]], since it was [[Mandriva Linux]] in 2011<ref name="mandriva">{{citation
* [[OpenMandriva Lx]], since it was [[Mandriva Linux]] in 2011<ref name="mandriva">{{citation
| url = https://pkgs.org/download/dracut
| url = https://pkgs.org/download/dracut
Line 67: Line 70:
| access-date = 2012-10-10}}</ref><ref>{{citation
| access-date = 2012-10-10}}</ref><ref>{{citation
| url = https://wiki.openmandriva.org/en/Kernel
| url = https://wiki.openmandriva.org/en/Kernel
| title = Kernel}}</ref>
| title = Kernel
}}{{Dead link|date=March 2023 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
* [[Mageia]] since Mageia 2<ref name="mageia">{{citation
* [[Mageia]] since Mageia 2<ref name="mageia">{{citation
| url = https://madb.mageia.org/package/show/application/0/name/dracut
| url = https://madb.mageia.org/package/show/application/0/name/dracut
Line 73: Line 77:
| publisher = mageia.madb.org
| publisher = mageia.madb.org
| access-date = 2012-10-10}}</ref>
| access-date = 2012-10-10}}</ref>
* [[Gentoo Linux|Gentoo]] for distribution kernels since 2020,<ref name="gentoo-distkernel">{{citation

| url = https://github.com/gentoo/gentoo/commit/6c42ffb977082bd8bc38e1cf3d851580796bfec8
Distributions which include dracut, but do not use by default for initramfs creation:
| title = kernel-install.eclass: Install logic for dist-kernels
* [[Gentoo Linux|Gentoo]] since 2010<ref name="gentoo">{{citation
| publisher = Gentoo Foundation
| access-date = 2022-11-06}}</ref> for custom kernels possible since 2010<ref name="gentoo">{{citation
| url = https://wiki.gentoo.org/wiki/Dracut
| url = https://wiki.gentoo.org/wiki/Dracut
| title = Dracut - Gentoo Wiki
| title = Dracut - Gentoo Wiki
| publisher = wiki.gentoo.org
| publisher = wiki.gentoo.org
| access-date = 2012-10-10}}</ref>
| access-date = 2012-10-10}}</ref>
* [[KaOS]]
* [[EndeavourOS]]
* [[Azure Linux]]

Distributions which include dracut, but do not use it by default for initramfs creation:
* [[Debian]] since version 6 (Squeeze)<ref name="debian">{{citation
* [[Debian]] since version 6 (Squeeze)<ref name="debian">{{citation
| url = http://packages.debian.org/squeeze/dracut
| url = http://packages.debian.org/squeeze/dracut
Line 85: Line 96:
| publisher = debian.org
| publisher = debian.org
| access-date = 2012-10-10}}</ref>
| access-date = 2012-10-10}}</ref>
* [[Arch Linux]] in extra repository<ref>{{cite web
* [[Arch Linux]] in extra repository<ref>{{citation
| url = https://www.archlinux.org/packages/extra/x86_64/dracut/
| url = https://www.archlinux.org/packages/extra/x86_64/dracut/
| title = Arch Linux - dracut 049-2 (x86_64)
| title = Arch Linux - dracut 049-2 (x86_64)
| website = www.archlinux.org
| website = www.archlinux.org
| access-date = 2019-05-21}}</ref>
| access-date = 2019-05-21}}</ref>
* [[Ubuntu Linux]] since 18.04<ref name="ubuntu">{{citation
* [[Ubuntu]] since version 18.04<ref name="ubuntu">{{citation
| url = https://packages.ubuntu.com/bionic/dracut
| url = https://packages.ubuntu.com/bionic/dracut
| title = Package: dracut (047-2) [universe]
| title = Package: dracut (047-2) [universe]
| publisher = ubuntu.com
| publisher = ubuntu.com
| access-date = 2022-02-27}}</ref>
| access-date = 2022-02-27}}</ref>
* [[Alpine Linux]] in community repository<ref>{{citation
| url = https://pkgs.alpinelinux.org/package/edge/community/x86_64/dracut
| title = Alpine - dracut
| website = www.alpinelinux.org
| access-date = 2022-02-27}}</ref>

Most other distributions have made dracut available as an optional [https://repology.org/project/dracut/versions package] to replace the distribution's default initramfs generator.


==See also==
==See also==
{{Portal|Linux}}
{{Portal bar|Linux|Free and open-source software}}


==References==
==References==
Line 103: Line 121:


==External links==
==External links==
* [https://github.com/dracutdevs/dracut/ Dracut source files]
* [https://github.com/dracut-ng/dracut-ng/ Dracut source files]
* [https://github.com/dracutdevs/dracut/blob/master/man/dracut.8.asc] Dracut manual page]
* [https://github.com/dracut-ng/dracut-ng/blob/master/man/dracut.8.asc Dracut manual page]


{{Linux kernel}}
{{Linux kernel}}

Latest revision as of 20:02, 2 November 2024

Dracut
Original author(s)Harald Hoyer and others
Initial releaseJuly 2009; 15 years ago (2009-07)
Stable release
105 / 13 October 2024; 22 days ago (2024-10-13)
Repository
Written inC, Bash, Rust
Operating systemLinux
PlatformLinux kernel
TypeInitial_ramdisk
LicenseGPLv2+, LGPLv2+
Websitedracut-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.

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

[edit]

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

[edit]

References

[edit]
  1. ^ a b c d e f 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
[edit]