Dracut
From Arch wiki: Dracut;
dracut creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. Upon installing linux, you can choose between mkinitcpio and dracut. dracut is used by Fedora, RHEL, Gentoo, and Debian, among others. Arch uses mkinitcpio by default.
- Github: dracut-ng/dracut-ng
- Old project: Dracut Github
- Dracut wiki
- Dracut man page
- Dracut kernel cmdline man page
- Dracut HostOnly explanation
Config
/etc/dracut.conf
/etc/dracut.conf.d/*
Modules
Module depenencies:
systemd-cryptsetup
depends on modulefido2
shell-interpreter
depends on modulebash
Update initramfs images
reinstall-kernels script
Update all initramfs images using the reinstall-kernels
script from the kernel-install-for-dracut
package:
sudo /usr/bin/reinstall-kernels
Manually
dracut --hostonly --no-hostonly-cmdline /efi/initramfs-6.1-x86_64-dracut.img
dracut /efi/initramfs-6.1-x86_64-dracut-fallback.img
Regenerate all images, but doesn't apply host-only
to the main image, which bloats it up:
sudo dracut --regenerate-all --force
Migrate from grub/mkinitcpio to sd-boot/dracut
see ./systemd-boot-migration.md
Inspect image
Show all information:
sudo lsinitrd --size --kver $(uname -r)
List modules:
sudo lsinitrd --kver $(uname -r) -m