Skip to main content
Topic: grub-mkconfig can't find initramfs images generated by dracut-install (Read 104 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

grub-mkconfig can't find initramfs images generated by dracut-install

/usr/share/libalpm/scripts/dracut-install generates two initramfs images: initramfs-linux-dracut.img and initramfs-linux-dracut-fallback.img. grub-mkconfig can't find them because of the way /etc/grub.d/10_linux searches for initramfs images. As a result, a /boot/grub/grub.cfg file is generated without an initrd for the menu entries. This means the system will not boot. Editing 10_linux is out of the question since it's provided upstream by the GRUB developers. The solution that would require the least amount of changes would be to edit dracut-install to generate images that grub-mkconfig can find. dracut-remove would also need to be edited. That brings up an important issue though: dracut on Arch does not provide installation and removal hooks, but Artix does. Artix also provides an update-grub command, which runs grub-mkconfig -o /boot/grub/grub.cfg. The dracut-hook AUR package seems to not have the same issue, although I have not tested it. Dracut is eventually supposed to replace mkinitcpio, so it surprises me that Arch does not provide an automated way to generate dracut images.

Re: grub-mkconfig can't find initramfs images generated by dracut-install

Reply #1
yeah, yes, archlinux doesn't actually use dracut much, so some editing will probably be needed.

https://wiki.archlinux.org/index.php/Dracut mentions dracut-hook, try it! ;-)


Re: grub-mkconfig can't find initramfs images generated by dracut-install

Reply #2
The problem is the dracut package provided by Artix includes dracut hooks and scripts already. Attempting to install the dracut-hook AUR package leads to a file conflict as a result.

Re: grub-mkconfig can't find initramfs images generated by dracut-install

Reply #3
The problem is the dracut package provided by Artix includes dracut hooks and scripts already. Attempting to install the dracut-hook AUR package leads to a file conflict as a result.

what is really strange, because dracut is dep for dracut-hooks...

Re: grub-mkconfig can't find initramfs images generated by dracut-install

Reply #4
I think we should stay as consistent as possible with arch packaging. In this case, the hooks and scripts should be removed from the artix package, and instead the user should decide if they want dracut images generated on upgrade by the dracut-hook package. In fact, the dracut-hook package could be provided by the artix repos to ease transition. From looking at the AUR package, the only change that might be needed is removing Target = usr/lib/systemd/systemd from 90-dracut-install.hook. I don't think that line will affect anything though, so it's up to the artix developers if they want to add the package to the repos.