add BIOS/EFI detection and handle grub accordingly