It depends on how you are installing grub. And of course, if you are installing it on the EFI System Partition (ESP), then it depends on where you are mounting that. In the particular case of your script, it looks as though perhaps it is expecting the ESP to be mounted on /boot/efi, and the /EFI/redhat directory is set up to contain what would ordinarily be in /boot on a BIOS based system. If this is correct, just take the location of grub2.conf on a BIOS system and replace the /boot prefix with /boot/efi/EFI/redhat, and you have your answer, namely /boot/efi/EFI/redhat/grub2/grub2.conf. (Note that /etc/default/grub will not move, because that is only used to generate the grub configuration and not used at boot time.)
There are at least two other common ways of setting up your ESP. One is to mount the ESP directly on /boot. The advantage is that you can then install things like grub and the kernel without worrying about the BIOS/UEFI distinction. The disadvantage is that you are now polluting the root directory of your ESP (which in theory is OS-independent) with all kinds of linux-specific files, like the kernel, whereas it would be tidier to stick all of those in one place like under /EFI/redhat.
The approach I favor (and this is just my opinion), is to mount your ESP on its own directory (/esp), and then bind-mount a subdirectory of your ESP onto /boot. So then you get the advantage of a tidy ESP and the advantage of existing tools finding what they want in /boot. The disadvantages are a slightly more complicated fstab and the fact that you cannot have symbolic links in /boot (a FAT file system). Here is a snippet of an /etc/fstab file on a machine with this setup:
/dev/sda2 /esp vfat rw,nosuid,nodev,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
/esp/EFI/redhat /boot none rw,nosuid,nodev,bind 0 0
You need to add the next line to your grub.cfg
before the menus. Since it is custom made and you're not going to use update-grub
you shouldn't have any problem:
background_image /boot/Your_image.png
Now, if you want to have a different background for your distros, you just need to add the line in the menu. For instance, this is the part where my menus start; as you can see I have a default background before the menus so that when grub starts it has a background, and after that each menu/submenu has its own background:
background_image /boot/SolusOS-splash.png
set color_normal=white/black
set color_highlight=black/white
submenu "Debian 8.1 -->"{
submenu "Debian 8.1 i386 -->"{
background_image /boot/DebianLava-splash.png
set iso=/boot/ISOs/debian-live-8.1.0-i386-gnome-desktop.iso
....
EDIT:
Here are my search path entries (mind the uuid is my usb's ID) don't know if this might be your issue:
set boot_uuid=D042-8A53
set root_uuid=D042-8A53
search --fs-uuid $root_uuid --set=root
search --fs-uuid $boot_uuid --set=grub_boot
if [ $boot_uuid == $root_uuid ]
then
set grub_boot=($grub_boot)/boot
else
set grub_boot=($grub_boot)
fi
Best Answer
Daniel Robbins,creator of Gentoo Linux, has been working on something called "Boot-Update" for Funtoo. I've not tried it. Seems to be what you are looking for.
http://docs.funtoo.org/wiki/Funtoo_Boot-Update