62 lines
888 B
Bash
62 lines
888 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
|
|
baseDir="$(realpath "$(basename "${0}")")"
|
|
|
|
|
|
source \
|
|
"${baseDir}/system.conf"
|
|
|
|
|
|
mkdir \
|
|
-p \
|
|
/boot/efi/EFI/ZBM
|
|
|
|
mkdir \
|
|
-p \
|
|
/boot/efi/EFI/BOOT
|
|
|
|
curl \
|
|
--progress-bar \
|
|
--show-error \
|
|
--output \
|
|
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
|
--location \
|
|
https://get.zfsbootmenu.org/efi
|
|
|
|
rsync \
|
|
-pogAXtlHrDx \
|
|
--stats \
|
|
--info=progress2 \
|
|
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
|
/boot/efi/EFI/ZBM/VMLINUZ-BACKUP.EFI
|
|
|
|
rsync \
|
|
-pogAXtlHrDx \
|
|
--stats \
|
|
--info=progress2 \
|
|
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
|
/boot/efi/EFI/BOOT/BOOTX64.EFI
|
|
|
|
rsync \
|
|
-pogAXtlHrDx \
|
|
--stats \
|
|
--info=progress2 \
|
|
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
|
/boot/efi/EFI/BOOT/shellx64.efi
|
|
|
|
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'
|