Skip to content

Commit d73fad8

Browse files
committed
UEFI: improve stub handling
* Note the package requirement for Debian * Improve error handling and messages in generate-zbm Closes #394
1 parent ed203e6 commit d73fad8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

bin/generate-zbm

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,10 @@ sub createUEFIBundle {
714714

715715
if ( nonempty $config{EFI}{Stub} ) {
716716
$uefi_stub = $config{EFI}{Stub};
717+
unless ( -f $uefi_stub ) {
718+
print "UEFI stub loader '$uefi_stub' does not exist\n";
719+
exit 1;
720+
}
717721
} else {
718722
# For now, default stub locations are x86_64 only
719723
my @uefi_stub_defaults = qw(
@@ -727,11 +731,14 @@ sub createUEFIBundle {
727731
last;
728732
}
729733
}
730-
}
731734

732-
unless ( defined $uefi_stub and -f $uefi_stub ) {
733-
print "Cannot find kernel or initramfs to create UEFI bundle\n";
734-
exit 1;
735+
unless ( defined $uefi_stub and -f $uefi_stub ) {
736+
print "Unable to find UEFI stub loader at default locations:\n";
737+
foreach my $stubloc (@uefi_stub_defaults) {
738+
print " $stubloc\n";
739+
}
740+
exit 1;
741+
}
735742
}
736743

737744
my @cmd = qw(objcopy);

docs/guides/debian/_include/zbm-install-deps.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Install all packages required to build a ZFSBootMenu image on Debian:
1212
kexec-tools \
1313
dracut-core \
1414
efibootmgr \
15+
systemd-boot-efi \
1516
bsdextrautils
1617
1718
.. note::

0 commit comments

Comments
 (0)