Adaptable bootloader for UEFI or BIOS machines