FS#64557 - [dracut] alpm hooks

Attached to Project: Arch Linux
Opened by artoo (artoo) - Monday, 18 November 2019, 13:23 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:24 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No

Details

Description:

I have written dracut alpm hooks currently in our testing repo.
They are derive from the mkinitcpio hooks.
Presets are generated, no preset file is use, and the resulting initramfs has *-dracut.img appended
not to conflict or overwrite mkinitcpio initramfs.

Additional info:
* dracut-49+
* the package source is here https://gitea.artixlinux.org/packagesD/dracut.git

Steps to reproduce:
Clone, build and test.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:24 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/dracut/issues/4
Comment by lukpod (lukpod) - Tuesday, 03 March 2020, 20:31 GMT
dracut is now in Extra; the Project should be Arch Linux, not Community Packages.
Comment by UnicornDarkness (Xorg) - Saturday, 04 April 2020, 08:31 GMT
Any update about this? Hooks are already written on wiki: https://wiki.archlinux.org/index.php/Dracut#Generate_a_new_initramfs_on_kernel_upgrade
It is a nonsense, these scripts should belong with dracut package, not on a wiki page.

I suggest the args variable in dracut-install script should be sourced from a configuration file.
The configuration file could declare other variables, like path where to install kernel and initramfs (instead of hardcoding /boot).
Comment by Chih-Hsuan Yen (yan12125) - Saturday, 25 April 2020, 10:35 GMT
An alternative to adding new scripts might be utilizing /usr/lib/kernel/install.d/{50-dracut.install,51-dracut-rescue.install} from upstream dracut. Those scripts can be invoked by the kernel-install command from systemd. [1] are ALPM hooks I use for invoking kernel-install.

Pros:
* Create rescue image by `dracut_rescue_image=yes|no` [2].

Cons:
* For users not using systemd-boot, 50-dracut.install uses /boot/initramfs-${KERNEL_VERSION}.img as the output filename, which is not compatible with GRUB as the latter expects the kernel (vmlinuz-XXX) and the initramfs to have the same filename suffix.

Another issue is that kernel-install runs depmod in /usr/lib/kernel/install.d/50-depmod.install, which brings duplicated work as depmod.hook already handles that [3].

[1] https://gitlab.com/yan12125/aur/-/tree/65e94a47b09bfca589fb56cccb02007d38cb8370/kernel-install-hooks
[2] https://github.com/dracutdevs/dracut/blob/050/51-dracut-rescue.install#L86
[3] https://git.archlinux.org/svntogit/packages.git/tree/trunk/depmod.hook?h=packages/kmod

EDIT: Oops I misunderstand dracut's rescue images.

EDIT 2: use the permanent URL for [1] as I plan to drop it
Comment by Bario (barmadrid) - Monday, 27 July 2020, 15:58 GMT
Just as Xorg said above. What's the ETA to "officially" include the hooks with dracut package?
Comment by LaserEyess (LaserEyess) - Monday, 06 September 2021, 15:57 GMT
Is there any plans to implement this or at least re-evaluate the priority? Since this feature request was reported dracut has now become fully supported on Arch by the abstraction of "provides=initramfs", not to mention another fully functional initramfs generator, booster, has been added to the repos. Upstream dracut now even officially supports Arch and tests it in its CI[1]. Currently, users have to use an AUR package to get full support for dracut (or booster) on Arch because there are no install hooks for rebuilding initramfs.

[1] https://github.com/dracutdevs/dracut/releases/tag/054
Comment by Cvlc12 (Cvlc) - Sunday, 11 September 2022, 06:52 GMT
Hi,

It's been a year since the last comment. Is this still being considered?

Have a good day
Comment by lukpod (lukpod) - Tuesday, 20 December 2022, 22:55 GMT
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.
Comment by lukpod (lukpod) - Monday, 11 September 2023, 23:41 GMT

Loading...