support custom arch iso (#1021)

This commit is contained in:
longpanda
2021-07-27 19:08:40 +08:00
parent cf94487ad5
commit 5d0ebf4510
4 changed files with 497 additions and 0 deletions

View File

@@ -548,6 +548,23 @@ function uefi_windows_menu_func {
fi
}
function uefi_find_replace_initrd {
if vt_get_efi_vdisk_offset "${1}${2}" vt_efivdisk_offset; then
loopback -s $vt_efivdisk_offset vtefivdisk "${1}${2}"
unset vt_rp_initrd
vt_search_replace_initrd (vtefivdisk) vt_rp_initrd
if [ -n "$vt_rp_initrd" ]; then
vt_add_replace_file $3 "$vt_rp_initrd"
echo vt_add_replace_file $3 "$vt_rp_initrd"
fi
loopback -d vtefivdisk
ventoy_debug_pause
fi
}
function uefi_linux_menu_func {
if [ "$ventoy_compatible" = "NO" ]; then
@@ -629,6 +646,11 @@ function uefi_linux_menu_func {
elif [ -f (loop)/loader/entries/pisi-efi-x86_64.conf ]; then
vt_add_replace_file $vtindex "EFI\\pisi\\initrd.img"
fi
vt_get_replace_file_cnt vt_replace_cnt
if [ $vt_replace_cnt -eq 0 ]; then
uefi_find_replace_initrd "$1" "$2" $vtindex
fi
elif [ -d (loop)/EFI/boot/entries ]; then
if [ -f (loop)/parabola/boot/x86_64/parabolaiso.img ]; then
vt_add_replace_file 0 "EFI\\parabolaiso\\parabolaiso.img"