Package Details: dracut-hook-uefi 17-1

Git Clone URL: https://aur.archlinux.org/dracut-hook-uefi.git (read-only, click to copy)
Package Base: dracut-hook-uefi
Description: Install/remove hooks for dracut unified kernel images for systemd-boot
Upstream URL: https://github.com/swsnr/dracut-hook-uefi
Keywords: dracut hook uefi
Licenses: Apache
Submitter: None
Maintainer: ewout
Last Packager: swsnr
Votes: 16
Popularity: 0.000711
First Submitted: 2020-10-14 16:16 (UTC)
Last Updated: 2023-01-09 08:08 (UTC)

Pinned Comments

swsnr commented on 2023-05-29 07:52 (UTC)

I no longer use dracut, and do not maintain this hook anymore.

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

swsnr commented on 2022-10-25 18:34 (UTC) (edited on 2022-10-25 18:43 (UTC) by swsnr)

I'm sorry but disabling this part is not an option for me: We need to regenerate the UKI when parts other than the kernel (e.g. dracut, microcode, systemd-stub) get updated, to include potential bug or security fixes.

"sudo dracut --regenerate-all --uefi" works fine for me, for multiple kernels (including zen). If it doesn't work for you, please report a bug to the dracut packagers or to dracut upstream. But I'm sorry to say that there's little I can do in this hook about this problem.

I tend to believe that it's a setup issue on your system, though. Arch's kernel packages don't put their images on "/boot", so dracut shouldn't even look at /boot for kernel images on a system set up to build UKIs. I think if you can find out why you have a kernel image on /boot you're more than half way to identify the root cause.

silikeite commented on 2022-10-25 14:07 (UTC) (edited on 2022-10-25 14:11 (UTC) by silikeite)

SLR but I can generate an image by running sudo pacman -S linux-zen

It is only when installing anything else that triggers the hook that borks the image generation.

Going through the contents of the hook script, it seems that dracut "${dracut_args[@]}" --regenerate-all --force is bugged with how Arch handles kernel versions with DKMS?

I don't exactly get why --regenerate-all is needed but until dracut or Arch's DKMS implementation un-borks it on their end, it might be a good idea to either disable rebuild_all in this script.

swsnr commented on 2022-10-04 05:45 (UTC)

Can you build an image by calling dracut directly?

silikeite commented on 2022-10-04 04:51 (UTC)

Latest version gives me the following error.

dracut: Can't find a kernel image '/boot/vmlinuz-5.19.1-zen1-1-zen' to create a UEFI executable

whynothugo commented on 2022-07-21 12:36 (UTC)

Sure, go ahead. I don't think I'll be picking up dracut again anytime soon anyway. Good luck!

swsnr commented on 2022-07-20 15:42 (UTC)

@whynothugo I don't think it will ;) Look at the version numbers: Your patch is a very outdated version.

If you're not using this package currently I can remove you as a maintainer, so that you no longer have any obligations wrt to this package.

@pants I've pushed a new version which renames the hook files and removes dracut-hook from "conflicts". Let me know if it works for you.

whynothugo commented on 2022-07-20 14:40 (UTC)

This patch should work:

commit c7abf106c15285bc935e96ddca16849aa9bfe628 (HEAD -> master)
Author: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
Date:   Wed Jul 20 16:39:02 2022 +0200

    Avoid conflicting with dracut-hook

diff --git a/.SRCINFO b/.SRCINFO
index ea7a782..33c05bc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,18 @@
 pkgbase = dracut-hook-uefi
    pkgdesc = Install/remove hooks for dracut unified kernel images for systemd-boot
-   pkgver = 0.5.0
+   pkgver = 0.6.0
    pkgrel = 1
    url = https://dracut.wiki.kernel.org/index.php/Main_Page
    arch = any
    license = BSD
    depends = dracut
-   conflicts = dracut-hook
    source = dracut-install
    source = dracut-remove
    source = 90-dracut-install.hook
    source = 60-dracut-remove.hook
    sha256sums = 2315588a5e87f46d53e7566942547ea258a4e6f00a28de2f87603b3522172d1b
    sha256sums = 85d5a588984c9c204064926bcdf61dcdbf8d2424efe91389e07669b08ab0ef75
-   sha256sums = 18778db39cd46c6efc7f8fb3b7d6a5007d53bd5dbb78f76b71de5074fe067c4e
-   sha256sums = 6907029a32d144669cb8d312a788598a43c1a45647c33fa66f2fdf165aea71f8
+   sha256sums = 90b20fc9106c54f2ae1f72543ab93c92d659c59c3a2a55a73f6059f0d1dc7527
+   sha256sums = 44cb12f8f850c322ed6f59bb68aeeedc4f5ca1f6a5e008c32be3f3705720817f

 pkgname = dracut-hook-uefi
diff --git a/60-dracut-remove.hook b/60-dracut-remove.hook
index 90e4da4..41a90f5 100644
--- a/60-dracut-remove.hook
+++ b/60-dracut-remove.hook
@@ -6,5 +6,5 @@ Target = usr/lib/modules/*/pkgbase
 [Action]
 Description = Removing unified EFI kernel images...
 When = PreTransaction
-Exec = /usr/share/libalpm/scripts/dracut-remove
+Exec = /usr/share/libalpm/scripts/dracut-uefi-remove
 NeedsTargets
diff --git a/90-dracut-install.hook b/90-dracut-install.hook
index 5343470..9b24ced 100644
--- a/90-dracut-install.hook
+++ b/90-dracut-install.hook
@@ -10,5 +10,5 @@ Target = usr/lib/systemd/boot/efi/*.efi.stub
 [Action]
 Description = Generating unified EFI kernel images...
 When = PostTransaction
-Exec = /usr/share/libalpm/scripts/dracut-install
+Exec = /usr/share/libalpm/scripts/dracut-uefi-install
 NeedsTargets
diff --git a/PKGBUILD b/PKGBUILD
index 6842545..35481f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,15 +3,13 @@
 # Maintainer: Kevin Del Castillo <quebin31@gmail.com>

 pkgname=dracut-hook-uefi
-pkgver=0.5.0
+pkgver=0.6.0
 pkgrel=1
 pkgdesc="Install/remove hooks for dracut unified kernel images for systemd-boot"
 url=https://dracut.wiki.kernel.org/index.php/Main_Page
 arch=('any')
 license=('BSD')
 depends=('dracut')
-noextract=()
-conflicts=(dracut-hook)
 source=(
   "dracut-install"
   "dracut-remove"
@@ -20,12 +18,12 @@ source=(
 )
 sha256sums=('2315588a5e87f46d53e7566942547ea258a4e6f00a28de2f87603b3522172d1b'
             '85d5a588984c9c204064926bcdf61dcdbf8d2424efe91389e07669b08ab0ef75'
-            '18778db39cd46c6efc7f8fb3b7d6a5007d53bd5dbb78f76b71de5074fe067c4e'
-            '6907029a32d144669cb8d312a788598a43c1a45647c33fa66f2fdf165aea71f8')
+            '90b20fc9106c54f2ae1f72543ab93c92d659c59c3a2a55a73f6059f0d1dc7527'
+            '44cb12f8f850c322ed6f59bb68aeeedc4f5ca1f6a5e008c32be3f3705720817f')

 package() {
-  install -Dm644 "${srcdir}/90-dracut-install.hook" "${pkgdir}/usr/share/libalpm/hooks/90-dracut-install.hook"
-  install -Dm644 "${srcdir}/60-dracut-remove.hook"  "${pkgdir}/usr/share/libalpm/hooks/60-dracut-remove.hook"
-  install -Dm755 "${srcdir}/dracut-install"         "${pkgdir}/usr/share/libalpm/scripts/dracut-install"
-  install -Dm755 "${srcdir}/dracut-remove"          "${pkgdir}/usr/share/libalpm/scripts/dracut-remove"
+  install -Dm644 "${srcdir}/90-dracut-install.hook" "${pkgdir}/usr/share/libalpm/hooks/90-dracut-uefi-install.hook"
+  install -Dm644 "${srcdir}/60-dracut-remove.hook"  "${pkgdir}/usr/share/libalpm/hooks/60-dracut-uefi-remove.hook"
+  install -Dm755 "${srcdir}/dracut-install"         "${pkgdir}/usr/share/libalpm/scripts/dracut-uefi-install"
+  install -Dm755 "${srcdir}/dracut-remove"          "${pkgdir}/usr/share/libalpm/scripts/dracut-uefi-remove"
 }

I'm not currently using this package, so I'd appreciate some feedback before merging it.

pants commented on 2022-07-20 13:12 (UTC)

Would it be possible to rename the files supplied by this package so that they don't conflict with dracut-hook? For some arcane reasons, I would like to have both hooks run (EFI stub booting by default but ability to fallback on ZFSBootManager with a regular iniramfs). Besides the easily changed filename, I can't think of any reason why these should conflict.

swsnr commented on 2022-07-07 17:25 (UTC) (edited on 2022-07-07 19:37 (UTC) by swsnr)

I understand DKMS, but the hook itself? It just builds the image, it doesn't change any of its contents, so why bother?

And why kernel-install? This hook installs the kernel image itself, through dracut; why would you use kernel-install?