diff options
author | Holger Paradies <retabell@gmx.de> | 2023-11-12 12:38:14 +0100 |
---|---|---|
committer | Holger Paradies <retabell@gmx.de> | 2023-11-12 12:38:14 +0100 |
commit | 820bb3d1b91ebfaee9344965cf042aeeea3dd3e9 (patch) | |
tree | 17bc1d76c3371398b33bda6eb67f670388f487f4 | |
parent | aa4874924ef2b2e1bd5b52632b1f154f03b3829d (diff) | |
download | acritoxinstaller-820bb3d1b91ebfaee9344965cf042aeeea3dd3e9.zip acritoxinstaller-820bb3d1b91ebfaee9344965cf042aeeea3dd3e9.tar.gz |
Add support for refind bootmanager
-rw-r--r-- | backend/modules/bootloader | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/backend/modules/bootloader b/backend/modules/bootloader index 629f9b5..460ce17 100644 --- a/backend/modules/bootloader +++ b/backend/modules/bootloader @@ -54,6 +54,11 @@ function list_bootloaders() grub) echo "GRUB - GRand Unified Bootloader";; esac done + if [ -d /sys/firmware/efi ]; then + if [ -x /usr/sbin/refind-install ]; then + echo "rEFInd - Refind Bootmanager" + fi + fi } function send_bootloaders() @@ -75,6 +80,9 @@ function install_bootmanager_to_target() burg) install_burg ;; + refind) + install_refind + ;; esac } @@ -163,6 +171,27 @@ function install_burg() return 0 } +function install_refind() +{ + rm -f $TARGET/boot/vmlinuz $TARGET/boot/System.map $TARGET/boot/initrd.img + + apple=0 + dmidecode -s system-manufacturer | grep -q "Apple Inc." && apple=1 + + # install refind + if [ -d /sys/firmware/efi ]; then + if is_removeable "$cfg_bootloader_target" || [ "$apple" = 1 ]; then + refind-install --usedefault "$cfg_bootloader_target" --alldrivers &>/dev/null + else + refind-install --root $TARGET &>/dev/null + fi + fi + + write_kernel_img_conf + + return 0 +} + function write_kernel_img_conf() { rm -f $TARGET/etc/kernel-img.conf |