Files
ZFSBootMenu-Root-Install/efi.sh
T

47 lines
666 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
baseDir="$(realpath "$(dirname "${0}")")"
source \
"${baseDir}/system.conf"
mkdir \
-p \
/boot/efi/EFI/ZBM
mkdir \
-p \
/boot/efi/EFI/BOOT
wget \
--output-document \
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
https://get.zfsbootmenu.org/efi
for file in {ZBM/VMLINUZ-BACKUP,BOOT/{BOOTX64,shellx64}}; do
rsync \
-pogAXtlHrDx \
--stats \
--info=progress2 \
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
/boot/efi/EFI/${file}.EFI
done
efibootmgr \
-c \
-d "${disk}" \
-p '1' \
-L 'ZFSBootMenu (Backup)' \
-l '\EFI\ZBM\VMLINUZ-BACKUP.EFI'
efibootmgr \
-c \
-d "${disk}" \
-p '1' \
-L 'ZFSBootMenu' \
-l '\EFI\ZBM\VMLINUZ.EFI'