linux – can we embed a standalone grub configuration into the grub-binary instead of the early configration that is embeded there?

I want to if it’s possible to embed a stand-alone configuration file into grub
using grub-mkimage

    grub-mkimage -v -c ../cfg -p ${EFIDIR} -d ./grub-core/ \
                   -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
                   ${GRUB_MKIMAGE_MODULES}

from the documentation I read that we can’t embed a file that contains boot-menu-entries (that’s one limitation I found)
and another thing I’ve noticed is when I’m embedding the file into the binary
I’m losing all the lines (mostly of length 1 ) so it seems there’s some problems during the parsing with grub-mkimage
Did anyone encouter such problem ?
and does anyone knows a way around or if it’s possible to embed a stand-alone grub.cfg directly into the grub binary ?
including boot-entries

Read more here: Source link