[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Embedding config file while compiling grub-efi binary.
From: |
mbusb |
Subject: |
Embedding config file while compiling grub-efi binary. |
Date: |
Wed, 27 Dec 2017 21:46:15 +0530 |
Hi all,
I am on Manjaro with up to date packages. Downloaded grub2 source directly
yesterday and trying to compile for generating a gpt compatible grub-efi
binary. Since I have all my distros in a custom directory of my pendrive, I
would like to check if grub.cfg path exist and load the configuration file
accordingly.
I found that embedding configuration file during boot time is the correct
way to go and I have included following code in the custom embed.cfg file:-
for dev in (*); do
if [ -f "$dev/customdir/grub/grub.cfg" ] ; then
configfile "$dev/customdir/grub/grub.cfg"
break
fi
done
Then I issued the following command to compile the binary:-
$./grub-mkimage -d ./grub-core -o bootx64.efi -O x86_64-efi -c ./embed.cfg
-p "" $(find . -name '*.mod' | tr '\n' ' ' | sed -e 's/\.mod//g')
Since I was not sure what all module required for successful booting of
embedded configfile, I included everything.
Now the real problem comes when I boot the usb on my laptop, it gives some
error (which I can't read properly due to faster disappearance) and lands
in to grub shell. Once I am in to shell, I executed every line and it
successfully booted my custom config fiel.
My question is, where did I go wrong? Why does grub goes to shell even
though I have not supplied any menu entries in embedded config file?
Any help is appreciated.
--
Regards,
mbusb
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Embedding config file while compiling grub-efi binary.,
mbusb <=