Skip to content

Commit 9ae80c9

Browse files
tuckertwoMexit
andauthored
Add support for detecting and chainloading EFI images in /MultiOS-USB/tools/* (#61)
* Add support for detecting and chainloading EFI images in /ISOs/* * Delete config/efi-images/efi-images.cfg * Add submenu for EFI User Tools --------- Co-authored-by: MexIT <25229673+Mexit@users.noreply.github.com>
1 parent 9845489 commit 9ae80c9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

config/grub.config

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,29 @@ if [ "${grub_platform}" == "efi" ]; then
197197
fi
198198
}
199199

200+
submenu "EFI User Tools -->" {
201+
set found=0
202+
203+
for efifile in /MultiOS-USB/tools/*.efi; do
204+
if [ -f "$efifile" ]; then
205+
set found=1
206+
regexp --set=efiname "/MultiOS-USB/tools/(.*)" "$efifile"
207+
208+
menuentry --class=efi "$efiname" "$efifile" {
209+
chainloader "${2}"
210+
}
211+
fi
212+
done
213+
214+
if [ "$found" = "0" ]; then
215+
menuentry "(!) No .efi files found — place them in /MultiOS-USB/tools/" --class=warning {
216+
echo "No EFI files found in /MultiOS-USB/tools/"
217+
echo "Copy your .efi files to that folder and reboot."
218+
sleep 5
219+
}
220+
fi
221+
}
222+
200223
submenu "Network bootable OS installers (DHCP) -->" {
201224
if net_bootp; then
202225
source /MultiOS-USB/config/grub_netboot/main.cfgnet

0 commit comments

Comments
 (0)