From 214f82becf3f765464eb14b1baaeb8b122dd4097 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sun, 22 Oct 2023 14:41:46 +0200 Subject: [PATCH] fix(zbm): Use a known good stub loader file (#3) This works around https://github.com/zbm-dev/zfsbootmenu/issues/503 --- setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.sh b/setup.sh index a890edd..ede7b4d 100644 --- a/setup.sh +++ b/setup.sh @@ -566,6 +566,7 @@ EFI: ImageDir: /efi/EFI/ZBM Versions: 1 Enabled: true + Stub: /etc/zfsbootmenu/stub-loader.d/linuxx64.efi.stub Kernel: CommandLine: ro loglevel=0 zbm.import_policy=hostid Prefix: vmlinuz @@ -574,6 +575,14 @@ EOF zfs set org.zfsbootmenu:commandline='rw nowatchdog rd.vconsole.keymap=de-latin1' "${zpool_name}"'/root/'"${zfs_arch_dataset_name}" } +function get_known_good_stub_loader () { + local known_good_stub_loader local_stub_loader_abs + known_good_stub_loader='https://github.com/zbm-dev/zfsbootmenu/raw/master/testing/stubs/linuxx64.efi.stub' + local local_stub_loader_abs='/etc/zfsbootmenu/stub-loader.d/linuxx64.efi.stub' + mkdir -p "$(dirname "${local_stub_loader_abs}")" + curl --silent --location "${known_good_stub_loader}" --output "${local_stub_loader_abs}" +} + function get_disks_with_one_efipart () { local disks_with_one_efipart # Find disks that have exactly one EFI partition and where that EFI @@ -613,6 +622,7 @@ function install_os_in_chroot () { # Install ZFSBootMenu image configure_zfsbootmenu #2.9 + get_known_good_stub_loader #2.10 generate-zbm }