feat(os): Replace manually building ZBM UEFI image with AUR package (#3)

This commit is contained in:
hygienic-books 2023-10-20 19:04:55 +02:00
parent 4cebd834de
commit 9550eceaab

View File

@ -696,16 +696,6 @@ function configure_zfsbootmenu () {
zfs set org.zfsbootmenu:commandline='rw nowatchdog rd.vconsole.keymap=de-latin1' "${zpool_name}"'/root/'"${zfs_arch_dataset_name}"
}
function gen_zfsbootmenu () {
#3.9
arch-chroot /mnt /bin/bash -xe <<"EOF"
source /etc/locale.conf
mkdir -p '/efi/EFI/ZBM'
find /efi/EFI/ZBM -type f -delete
generate-zbm
EOF
}
function get_disks_with_one_efipart () {
local disks_with_one_efipart
# Find disks that have exactly one EFI partition and where that EFI
@ -720,7 +710,7 @@ function get_disks_with_one_efipart () {
}
function add_zbm_to_efi () {
#3.10
#3.9
if ! efibootmgr | grep -Piq -- 'ZFSBootMenu'; then
local efi_disks_list
efi_disks_list="$(get_disks_with_one_efipart)"
@ -736,7 +726,7 @@ function add_zbm_to_efi () {
}
function umount_all () {
#3.11
#3.10
umount '/mnt/efi'
zfs umount -a
zpool export "${zpool_name}"
@ -751,8 +741,7 @@ function finalize_os_setup () {
configure_zfs #3.6
configure_zfs_mount_gen #3.7
configure_zfsbootmenu #3.8
gen_zfsbootmenu #3.9
add_zbm_to_efi #3.10
add_zbm_to_efi #3.9
umount_all #3.11
}