fix(zbm): Use a known good stub loader file (#3)

This works around https://github.com/zbm-dev/zfsbootmenu/issues/503
This commit is contained in:
hygienic-books 2023-10-22 14:41:46 +02:00
parent 0fa1564405
commit 214f82becf

View File

@ -566,6 +566,7 @@ EFI:
ImageDir: /efi/EFI/ZBM ImageDir: /efi/EFI/ZBM
Versions: 1 Versions: 1
Enabled: true Enabled: true
Stub: /etc/zfsbootmenu/stub-loader.d/linuxx64.efi.stub
Kernel: Kernel:
CommandLine: ro loglevel=0 zbm.import_policy=hostid CommandLine: ro loglevel=0 zbm.import_policy=hostid
Prefix: vmlinuz 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}" 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 () { function get_disks_with_one_efipart () {
local disks_with_one_efipart local disks_with_one_efipart
# Find disks that have exactly one EFI partition and where that EFI # Find disks that have exactly one EFI partition and where that EFI
@ -613,6 +622,7 @@ function install_os_in_chroot () {
# Install ZFSBootMenu image # Install ZFSBootMenu image
configure_zfsbootmenu #2.9 configure_zfsbootmenu #2.9
get_known_good_stub_loader #2.10
generate-zbm generate-zbm
} }