Hi, Is there any way to obtain the path info from which a standalone grub.efi was launched. In case of grub-mkimage uisng --prefix="" results in prefix being set to the dir from which the efi app was launched, but in the standalone grub.efi the prefix is (memdisk)/boot/grub . In (memdisk)/boot/grub/grub.cfg I added a search and configfile option that points to the external grub.cfg (in <UEFISYS>/efi/grub/grub.cfg), but I don't want to hardcode the grub.cfg file path in the configfile command in the memdisk grub.cfg.
Is it possible to introduce a env var within grub2 (independent of prefix) which gives the path (grub style) from which the grub.efi file was launched by the firmware, so that I can do "configfile (path_from_which_grub.efi_loaded)/grub.cfg" in (memdisk)/boot/grub/grub.cfg in the standalone file. I want the standalone file to be be portable, no hardcoding of path of external grub.cfg file (which is editable by the user). Thanks in advance.