Compare commits

...

3 Commits

2 changed files with 13 additions and 1 deletions

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
} }

View File

@@ -161,7 +161,7 @@ function set_new_uefi_boot_entries () {
for uefi_image in "${uefi_images[@]}"; do for uefi_image in "${uefi_images[@]}"; do
uefi_image_version="$(basename "${uefi_image##*-}")" uefi_image_version="$(basename "${uefi_image##*-}")"
uefi_image_version="${uefi_image_version%%.EFI}" uefi_image_version="${uefi_image_version%%.EFI}"
uefi_image_inverted="${uefi_image#/mnt/efi}" uefi_image_inverted="${uefi_image#/efi}"
uefi_image_inverted="${uefi_image_inverted//\//\\}" uefi_image_inverted="${uefi_image_inverted//\//\\}"
efibootmgr --disk "${efi_drive}" \ efibootmgr --disk "${efi_drive}" \
--part 1 \ --part 1 \
@@ -175,3 +175,5 @@ function set_new_uefi_boot_entries () {
fi fi
fi fi
} }
set_new_uefi_boot_entries