generate-zbm fails with non-standard PREFIX
Closed this issue · 1 comments
drbawb commented
Hi, I recently tried to update zfsbootmenu and ran into a small problem.
- I built
zfsbootmenu
from source using commitfabe14ebecbaf4a77fb1db545c6dafbf8d26f146
withPREFIX=/usr/local
. - I'm using Arch Linux
Linux nagato 6.2.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 07 Apr 2023 02:10:43 +0000 x86_64 GNU/Linux
dracut --version
isdracut 056
- I subsequently ran
generate-zbm
with my existing config:
Global:
ManageImages: true
BootMountPoint: /boot/efi_44k
DracutConfDir: /etc/zfsbootmenu/dracut.conf.d
Components:
ImageDir: /boot/efi_44k/EFI/zbm
Versions: 3
Enabled: true
syslinux:
Config: /boot/syslinux/syslinux.cfg
Enabled: false
EFI:
ImageDir: /boot/efi_44k/EFI/zbm
Versions: false
Enabled: false
Kernel:
CommandLine: rw quiet loglevel=0 spl.spl_hostid=0x2a0a6b80
Version: '%{current}'
Path: /boot/vmlinuz-linux
I receive the following error:
/usr/lib/dracut/modules.d/90zfsbootmenu/module-setup.sh: line 35: /usr/share/zfsbootmenu/install-helpers.sh: No such file or directory
dracut: Unable to source /usr/share/zfsbootmenu/install-helpers.sh
Failed to create /tmp/luf9Z1bJ9i/zfsbootmenu.img
The issue seems to be that on line 32 of the new /usr/lib/dracut/modules.d/90zfsbootmenu/module-setup.sh
that was installed on my system it does not include the prefix I passed to make
. The fix was to manually patch that from
install() {
: "${zfsbootmenu_module_root:=/usr/share/zfsbootmenu}"
to:
install() {
: "${zfsbootmenu_module_root:=/usr/local/share/zfsbootmenu}"
Apart from this I'm very pleased to report that I had no other issues with a pretty substantial upgrade of ZBM on my system.
zdykstra commented
The easiest non-patching solution is to add zfsbootmenu_module_root="/usr/local/share/zfsbootmenu"
to a file in /etc/zfsbootmenu/dracut.conf.d
. I'll see if we can automate setting that based on a custom PREFIX value set during install time.