[ 'EXIT' => 'set slx_exit 1 || exit 1', 'COMBOOT' => 'set netX/209:string localboot.cfg || set netX/210:string http://${serverip}/tftp/sl-bios/ || chain -ar /tftp/sl-bios/lpxelinux.0', 'SANBOOT' => 'sanboot --no-describe', ], 'EFI' => [ 'EXIT' => 'set slx_exit 1 || exit 1', 'SANBOOT' => 'imgfree || console || set filename \EFI\Boot\bootx64.efi || set i:int32 0 || :blubber sanboot --no-describe --drive ${i} --filename ${filename} || inc i iseq ${i} 10 || goto blubber', 'GRUB' => 'chain /tftp/grub-boot.img', ], ]; /** * @return array{PCBIOS: string, EFI: string} */ public static function getDefault(): array { $ret = explode(',', Property::get(self::PROPERTY_KEY, 'SANBOOT,GRUB')); if (empty($ret)) { $ret = ['SANBOOT', 'GRUB']; } elseif (count($ret) < 2) { $ret[] = 'SANBOOT'; } if (!isset(self::BOOT_METHODS['PCBIOS'][$ret[0]])) { $ret[0] = 'SANBOOT'; } if (!isset(self::BOOT_METHODS['EFI'][$ret[1]])) { $ret[1] = 'GRUB'; } return ['PCBIOS' => $ret[0], 'EFI' => $ret[1]]; } public static function setDefault(string $pcbios, string $efi) { Property::set(self::PROPERTY_KEY, "$pcbios,$efi"); } }