Dracut on Devario
An initramfs is the small filesystem Linux starts with before it can mount your real root filesystem. It provides the drivers and tools needed to find the root disk, unlock it if it is encrypted, and start the installed system.
This guide is for an installed Devario Community system using systemd-boot.
boot-update is Devario’s wrapper: it calls dracut to build the images, then
refreshes the systemd-boot entries. Shelly runs the wrapper after relevant
package changes, so you do not normally need to run either tool by hand.
Coming from Arch Linux
Section titled “Coming from Arch Linux”| Task | Arch | Devario |
|---|---|---|
| Rebuild all | sudo mkinitcpio -P |
sudo /usr/lib/devario/boot-update |
| Inspect image | lsinitcpio IMAGE |
sudo lsinitrd IMAGE |
| List features | mkinitcpio -L |
dracut --list-modules |
mkinitcpio -P processes every configured preset under /etc/mkinitcpio.d/.
Devario’s updater instead finds the installed kernels it can boot, rebuilds
normal and fallback images, then refreshes the systemd-boot entries.
The generic dracut --force --regenerate-all command does not run that
Devario update sequence. For a one-image rebuild when the wrapper is not
usable, see Build a rescue initramfs with dracut.
Replace IMAGE with the file to inspect. The usual Arch linux image is
/boot/initramfs-linux.img; Devario’s linux-devario image is
/boot/initramfs-linux-devario.img.
Rebuild and verify
Section titled “Rebuild and verify”If you changed an initramfs setting or need to retry a failed boot update, first
check that the EFI System Partition is mounted at /boot. This read-only check
should show /boot with filesystem type vfat on a standard installation.
findmnt -no TARGET,FSTYPE --mountpoint /bootsudo /usr/lib/devario/boot-updateUse the full path: the devario-boot package installs this helper under
/usr/lib/devario/, not on the standard PATH.
After a successful rebuild, inspect the image and verify that systemd-boot lists
the regular and fallback entries. The filename below is for linux-devario;
if you use linux-devario-lts, substitute that name.
sudo lsinitrd /boot/initramfs-linux-devario.imgsudo bootctl listWhere configuration goes
Section titled “Where configuration goes”On up-to-date Devario installations, put local dracut settings in a drop-in such
as /etc/dracut.conf.d/90-local.conf. The installed-system builder layers
/etc/dracut.conf and its drop-ins over Devario’s packaged profile. Leave
/usr/share/devario/dracut/installed.conf alone; package updates own it.
In Arch terms, a dracut module is closer to a HOOKS=() entry than a
MODULES=() entry. add_dracutmodules adds boot features; add_drivers adds
kernel drivers without forcing them to load. Use force_drivers only if a driver
must be loaded early. Do not copy your mkinitcpio configuration into dracut.
If Devario will not boot
Section titled “If Devario will not boot”- The rebuild reported an error: save the error from Shelly or
boot-update. If the system is still running, resolve the error before rebooting. - The normal entry fails: select Devario Linux (fallback initramfs) in the systemd-boot menu. It uses the same kernel with a less hardware-specific image. If Devario Linux (previous kernel and initramfs) is present, that is a separate recovery entry using a saved older pair.
- Dracut drops you into an emergency shell: save
/run/initramfs/rdsosreport.txtif present.
Build a rescue initramfs with dracut
Section titled “Build a rescue initramfs with dracut”Try the fallback or previous-kernel entry first. Use this procedure if
boot-update is unavailable or fails, but the installed kernel and its
systemd-boot entry are intact. The example is for the standard linux-devario
entry.
If you use the Devario live USB, boot it in UEFI mode.
Mount the installed root and its EFI System Partition, then enter the installed
system’s chroot with /dev, /proc, /sys, and /run available. Inside that shell,
/boot must be the installed system’s EFI partition, not the USB’s. Omit
sudo if you are already root. If you cannot identify the right partitions,
stop and get recovery help before writing anything.
First confirm /boot is the correct mounted vfat partition and has enough
free space for another image. Use the exact installed KERNEL_VERSION
directory name from /usr/lib/modules; uname -r in a chroot still reports
the running kernel, which may be the live USB’s.
findmnt -no SOURCE,TARGET,FSTYPE --mountpoint /bootdf -h /bootls /usr/lib/modulesReplace KERNEL_VERSION below. The comparison stops the build if the kernel
in /boot does not match the selected module tree. Dracut writes a separate
generic image using Devario’s packaged profile. Leave out --force so an
existing image of the same name is not overwritten.
sudo cmp /usr/lib/modules/KERNEL_VERSION/vmlinuz /boot/vmlinuz-linux-devario && \ sudo dracut --conf /usr/share/devario/dracut/installed.conf \ --kver KERNEL_VERSION --no-hostonly --no-hostonly-cmdline --no-uefi \ /boot/initramfs-linux-devario-rescue.imgInspect the image before using it: -m lists dracut modules, and omitting it
lists the files and drivers. This direct build still reads dracut drop-ins,
but it does not merge /etc/dracut.conf or apply wrapper-specific settings
such as automatic NVIDIA early KMS. If your root disk needs custom
drivers or encryption support, check that the image includes them.
sudo lsinitrd -m /boot/initramfs-linux-devario-rescue.imgsudo lsinitrd /boot/initramfs-linux-devario-rescue.imgDracut does not create a boot entry. If the image checks out, copy the existing entry to a new file. This fails rather than replacing an existing rescue entry.
sudo cp --update=none-fail /boot/loader/entries/devario.conf \ /boot/loader/entries/local-devario-rescue.confEdit only the new file. Set title Devario Linux (manual dracut rescue) and
change the initrd line to initrd /initramfs-linux-devario-rescue.img. Leave
linux and options unchanged so the copy uses the same kernel and root disk.
Verify the new entry with sudo bootctl list, then select it in the boot menu.
Once the system is bootable again, use the packaged updater
to restore the managed images and entries rather than relying on the rescue image
for updates.
Sources
Devario: Boot package · Package recipe · Update hook · Boot updater · Initramfs builder · systemd-boot updater
Dracut: dracut(8) · dracut.conf(5) · lsinitrd(1)
Arch and boot entries: mkinitcpio(8) · ArchWiki: mkinitcpio · bootctl(1) · Boot Loader Specification