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.000279
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

mrabe89 commented on 2021-04-09 19:04 (UTC) (edited on 2021-04-09 19:04 (UTC) by mrabe89)

Like lunaryorn said, dracut-remove is assuming the ESP is mounted at /boot. But that's only dracuts last fallback path, if neither /efi, nor /boot/efi exists. (details: https://git.kernel.org/pub/scm/boot/dracut/dracut.git/tree/dracut.sh?h=053#n851 )

I changed my dracut-remove to use the same mechanism.

--- dracut-remove   2021-04-09 20:54:04.985000688 +0200
+++ dracut-remove.new   2021-04-09 20:57:11.924297085 +0200
@@ -3,6 +3,16 @@
 while read -r line; do
    if [[ "$line" == 'usr/lib/modules/'+([^/])'/pkgbase' ]]; then
        kver=$(basename $(dirname ${line}))
-       rm -v /boot/EFI/Linux/linux-${kver}-$(cat /etc/machine-id)-*.efi
+
+       if [[ -d /efi ]] && mountpoint -q /efi; then
+           efidir=/efi/EFI
+       else
+           efidir=/boot/EFI
+           if [[ -d $dracutsysrootdir/boot/efi/EFI ]]; then
+               efidir=/boot/efi/EFI
+           fi
+       fi
+
+       rm -v ${efidir}/Linux/linux-${kver}-$(cat /etc/machine-id)-*.efi
    fi
 done

swsnr commented on 2021-03-08 17:14 (UTC)

dracut-remove assumes that the ESP is mounted at /boot, but that's not the case for me. According to the wiki (https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points) /efi is another common mount point, and in fact that's also what systemd uses by default (https://systemd.io/DISCOVERABLE_PARTITIONS/).

Would you mind to add support for /efi as well?

anonfunc commented on 2021-02-18 15:31 (UTC) (edited on 2021-02-18 15:39 (UTC) by anonfunc)

Just for reference, I had to comment line 28 of dracut-install to make it compatible with kernel-modules-hook.

I don't think that's the best or correct solution, but it seems to work for me.