[Android Q&A, Help & Troubleshooting] mahaju:
I have an hdd that I connect to my computer through a USB connector and cable. The computer has an internal HDD with WIndows 10, partitioned as follows:

Recovery, EFI, C:, D:, E: , Unallocated

As far as possible I want to leave everything on the internal HDD untouched, so that I do not mess up the Windows 10 boot process

In the externally connected HDD, I have the following Android x86 versions installed each in it's own partition:

Android x-86 (standard android x86, android-x86_64-9.0-rc2.iso)

LineageOS-x86 (cm-x86_64-14.1-r3.iso)

BlissOS (Bliss-OS-Yantra-v12.3-android_x86_64-OFFICIAL-202002231104_k-k4.19.95-ax86-ga-rmi_m-19.3.3-ax86-q_ld-2.4.100-ax86-ma_dg-_dh-q10.0-x86_mg-_gms_cros-hd_cros-wv.iso)

I only installed GRUB for the first Android-x86 install and didn't do it for Lineage-OS and BlissOS, so currently when I boot from the external HDD I can only boot into Android x86. How do I edit the config files (and which files exactly do I edit) so that I get a menu to choose between which Android x86 to boot into?

Some of the files in the EFI partition of the internal HDD which I think are relevant, are given below:

\boot\grub\x86_64-efi\grub.cfg

set timeout=5
set debug_mode="(DEBUG mode)"
set kdir=/efi/Android
set src=SRC=/android-9.0-rc2

source $cmdpath/android.cfg

EFI\Android\android.cfg

# $1 Kernel dir
# $2 Title
# $3... Kernel cmdline
function add_boot_entry {
menuentry "$2" "$@" --class android-x86 {
savedefault
set root=$android
if [ ! -e $2/kernel ]; then
search --no-floppy --set root -f $2/kernel
fi
set kd=$2
shift 3
linux $kd/kernel root=/dev/ram0 $src $@
initrd $kd/initrd.img
}
}

# $1 Title
# $2... Kernel cmdline
function add_entry {
set title="Android-x86 9.0-rc2 $1"
shift 1
add_boot_entry "$kdir" "$title" "$@"
}

# $1 EFI to chainload
# $2 OS name
# $3 Class
function add_os_if_exists {
# Is there a better way to find ESP?
for d in hd0,gpt1 hd0,gpt2 hd1,gpt1 hd1,gpt2 hd0,msdos1 hd0,msdos2 hd1,msdos1 hd1,msdos2; do
if [ "($d)$1" != "$cmdpath/$bootefi" -a -e ($d)$1 ]; then
menuentry "$2 at $d ->" "$d" "$1" --class "$3" {
savedefault
set root=$2
chainloader ($root)$3
}
break
fi
done
}

function savedefault {
if [ -s $prefix/grubenv -a "$chosen" != "$default" ]; then
set default="$chosen"
save_env default
fi
}

function load_theme {
loadfont DejaVuSansMono-18
set gfxmode=1024x768
terminal_output gfxterm
set theme=$prefix/theme/theme.txt
export theme
}

if [ "$root" == "loop0" ]; then
set prefix=($root)/boot/grub
fi

if [ -s $prefix/theme/theme.txt ]; then
load_theme
fi

if [ -s $prefix/grubenv ]; then
load_env
fi

if [ "$grub_cpu" = "i386" ]; then
set bootefi=bootia32.efi
set grub=grubia32
else
set bootefi=BOOTx64.EFI
set grub=grubx64
fi

if [ -z "$src" -a -n "$isofile" ]; then
set src=iso-scan/filename=$isofile
fi

search --no-floppy --set android -f $kdir/kernel
export android bootefi grub kdir live src

# Create main menu
add_entry "$live" quiet
add_entry "$debug_mode" DEBUG=2
if [ -s ($android)$kdir/install.img ]; then
add_entry "Installation" INSTALL=1
fi

submenu "Advanced options -> " --class forward {
add_entry "$live - Vulkan support (experimental)" quiet VULKAN=1
add_entry "$live - No Setup Wizard" quiet SETUPWIZARD=0
add_entry "$live - No Hardware Acceleration" quiet nomodeset HWACCEL=0
if [ -s ($android)$kdir/install.img ]; then
add_entry "Auto Install to specified harddisk" AUTO_INSTALL=0
add_entry "Auto Update" AUTO_INSTALL=update
fi
add_os_if_exists /EFI/BOOT/$bootefi "UEFI OS" os
add_os_if_exists /EFI/BOOT/fallback.efi "UEFI Fallback" os
add_os_if_exists /EFI/BOOT/fallback_x64.efi "UEFI Fallback" os
menuentry "Reboot" --class reboot { reboot }
menuentry "Poweroff" --class shutdown { halt }
menuentry "UEFI firmware settings" --class setup { fwsetup }
}

# Add other OSes boot loaders if exist
add_os_if_exists /EFI/fedora/${grub}.efi Fedora fedora
add_os_if_exists /EFI/centos/${grub}.efi CentOS centos
add_os_if_exists /EFI/ubuntu/${grub}.efi Ubuntu ubuntu
add_os_if_exists /EFI/debian/${grub}.efi Debian debian
add_os_if_exists /EFI/gentoo/${grub}.efi Gentoo gentoo
add_os_if_exists /EFI/opensuse/${grub}.efi openSUSE opensuse
add_os_if_exists /EFI/linuxmint/${grub}.efi "Linux Mint" linuxmint
add_os_if_exists /EFI/boto/bootx64.efi OPENTHOS openthos
add_os_if_exists /EFI/Microsoft/Boot/bootmgfw.efi Windows windows

for d in $cmdpath $prefix; do
if [ -f $d/custom.cfg ]; then
source $d/custom.cfg
fi
done

I can upload the "EFI\Android\android.cfg" for LineagOS'es GRUB install if anyone would like to see it, but it is mostly similar to the android.cfg above.

How to I create menu entries for different Android-x86 version multiboot?