@eruthon The system is working as designed but not like how you want it. I do have a few ideas to get to where you need. Its going to take a little code hacking but the changes are not significant.
rEFInd should probably do what you need to point to grub.efi refind has a config file on the fog server that can be used to tweak how refind goes about finding the bootstrap file you want. The issue is with the default config file for refind its an all or nothing situation. I assume you might have other EFI systems that you would want to boot normal, but specific systems where you want to boot into the grub menu and not directly into windows (default action for how refind works). To do this we need to create a new refind.conf file with the settings we need to locate the grub.efi file, but leave the original one in place so the other efi systems boot normally.
To give us a bit more flexibility we are going to modify just a few lines of code in the fog programming. Understand the next time FOG is upgraded you will loose these edits.
On the fog server here are the steps to make a few adjustments. I use vi as my default editor (because I’m crazy) you can use whatever editor you want.
cd /var/www/html/fog
vi lib/fog/bootmenu.class.php
Around line 131 you will see this section of code
$refind = sprintf(
'imgfetch ${boot-url}/service/ipxe/refind.conf%s'
. 'chain -ar ${boot-url}/service/ipxe/refind_x64.efi',
"\n"
);
Copy it and paste it just below as shown here
$refind = sprintf(
'imgfetch ${boot-url}/service/ipxe/refind.conf%s'
. 'chain -ar ${boot-url}/service/ipxe/refind_x64.efi',
"\n"
);
$refindx2 = sprintf(
'imgfetch ${boot-url}/service/ipxe/refindx2.conf%s'
. 'chain -ar ${boot-url}/service/ipxe/refind_x64.efi',
"\n"
);
On the inserted code change $refind = sprintf(
to $refindx2 = sprintf(
Around or after line 165 you will see this section of code. Insert 'refind_efix2' => $refindx2,
just after 'refind_efi' => $refind,
as below
self::$_exitTypes = array(
'sanboot' => $sanboot,
'grub' => $grub['basic'],
'grub_first_hdd' => $grub['basic'],
'grub_first_cdrom' => $grub['1cd'],
'grub_first_found_windows' => $grub['1fw'],
'refind_efi' => $refind,
'refind_efix2' => $refindx2,
'exit' => 'exit',
);
Save and exit this file.
Now edit this file
vi lib/fog/service.class.php
Around line 207 you will see this code. Insert 'refind_efix2',
after 'refind_efi',
as in the code below
$types = array(
'sanboot',
'grub',
'grub_first_hdd',
'grub_first_cdrom',
'grub_first_found_windows',
'refind_efi',
'refind_efix2',
'exit',
);
What we’ve just done is added a new exit mode to FOG.
Now we just need to clone the original FOG refind.conf file.
cd service/ipxe/
cp refind.conf refindx2.conf
Now you can edit the refindx2,conf file to make it look exactly where you grub boot efi boot strap is found. You can also exclude specific boot strap files (like windows).
Finally in the FOG UI change the EFI exit mode for a test computer in the host definition to REFIND_EFIX2
This is a bit of an advanced subject, but if you are loading grub to dual boot windows and linux you should have the skills needed for this specific hack.