{{Header}}
{{title|title=
dracut
}}
{{#seo:
|description=dracut, an initrd generator
|image=Dracut.svg
}}
{{troubleshooting_mininav}}
[[File:Dracut.svg|thumb|100px|dracut logo]]
{{intro|
dracut, an initrd generator
}}
= Introduction =
{{stub}}
= Find out which initrd Generator is installed =
To check if dracut
is already installed, run.
{{CodeSelect|code=
dpkg -l {{!}} grep dracut
}}
To check if initramfs-tools
is already installed, run.
{{CodeSelect|code=
dpkg -l {{!}} grep initramfs-tools
}}
= Installation =
'''1.''' Notices.
{{mbox
| type = notice
| image = [[File:Ambox_notice.png|40px|alt=Info]]
| text = Platform specific.
* '''Debian:''' The following warning is applicable because dracut is not installed by default in Debian.
* '''Kicksecure:''' The following warning is only applicable if dracut is not yet installed. In newer Kicksecure versions, dracut is installed by default.
}}
To check your currently installed initrd generator, see [[Dracut#Find_out_which_initrd_Generator_is_installed|Find out which initrd Generator is installed]].
'''2.''' Warning.
{{mbox
| image = [[File:Ambox_warning_pn.svg.png|40px|warning]]
| text = '''Warning:'''
There is a risk of the system becoming unbootable due to changes in the initrd creation tool.
* '''General risk:''' The system may become unbootable when changing the initrd creation tool.
* '''Backups:''' Always maintain backups and proceed with caution when making changes.
* '''Dracut bug reports:''' If issues with dracut
occur, do not report them here, as they are [[unspecific|unrelated to {{project_name_short}}]].
}}
'''3.''' Create folder /etc/dracut.conf.d
.
{{CodeSelect|code=
sudo mkdir --parents /etc/dracut.conf.d
}}
'''4.''' {{Open with root rights|filename=
/etc/dracut.conf.d/fix.conf
}}
'''5.''' Paste.
{{CodeSelect|code=
hostonly=yes
hostonly_mode=sloppy
}}
'''6.''' Save.
'''7.''' Install dracut and systemd-cryptsetup.
{{CodeSelect|code=
sudo apt install --no-install-recommends dracut systemd-cryptsetup
}}
'''8.''' Done.
Installation of dracut has been completed.
= Re-Generate dracut Initrd =
{{CodeSelect|code=
sudo dracut -f
}}
= Bugs =
* '''Specific risk:''' Issues may occur during migration to dracut
if full disk encryption is used.
** Likely issues:
*** Package systemd-cryptsetup
is not installed.
*** hostonly=yes
configuration option is not used.
** Workaround: If boot fails: setting the kernel parameter rd.auto
might help. (Tested on Debian bookworm.)
* Note on bug status: Closed bugs do not necessarily mean the issue is resolved in your distribution's APT repository. Fixes may have been reverted upstream, making bug status verification difficult.
* dracut
(abandoned)
** [https://github.com/dracutdevs/dracut/pull/2520 fix(crypt): Encrypted root FS handling with generic initrd #2520] (abandoned pull request for dracut)
** [https://github.com/dracutdevs/dracut/issues/2437 Generic initrd does not work with encrypted root FS without further configuration]
* dracut-ng
upstream bug reports and pull requests:
** [https://github.com/dracut-ng/dracut-ng/issues/684 With encrypted root + unencrypted boot + systemd, dracut may generate an initrd incapable of decrypting the root disk without showing any warnings or errors #684]
** [https://github.com/dracut-ng/dracut-ng/pull/319 fix(systemd-crypt): add potentially needed modules to generic initrd #319]
** [https://github.com/dracut-ng/dracut-ng/pull/320 fix(crypt): unlock encrypted devices by default during boot #320]
** [https://github.com/dracut-ng/dracut-ng/pull/529 revert(crypt): do not unlock encrypted devices by default during boot #529]
* Debian upstream bug reports:
** [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041614 unbootable system after installing dracut on a standard Debian installation - #1]
** [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078792 unbootable system after installing dracut on a standard Debian installation - #2]
** [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029324 dracut: generic initrd does not work with encrypted root FS without further configuration]
** [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103457 Unable to boot LUKS-encrypted system]
* Forum discussion:
** https://forums.whonix.org/t/replacing-initramfs-tools-with-dracut/4487/23
* ram-wipe discussion:
** https://github.com/Kicksecure/ram-wipe/issues/2#issuecomment-2813730463
= Resources =
* https://git.launchpad.net/ubuntu/+source/dracut/tree/debian/99-ubuntu.conf
{{reflist|close=1}}
{{Footer}}
[[Category:Documentation]]