#!ipxe # Detectar si se está ejecutando en modo UEFI o BIOS iseq ${platform} efi && goto uefi_boot || goto bios_boot :bios_boot echo "Running in BIOS mode - Booting first disk, second partition" chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 0; title FirstHardDisk-SecondPartition;root (hd0,1);chainloader (hd0,1)+1;boot" || echo "Failed to boot in BIOS mode" exit :uefi_boot echo "Running in UEFI mode - Booting first disk, second partition" chain http://__SERVERIP__/tftpboot/grubx64.efi exit