As requested I compiled the latest development version of Grub and installed it
on a test laptop. Without any further configuration, Grub works fine, it is
able to boot as intended but the keyboard mapping is us.
I then added the following snippet :
grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`"
grub-kbdcomp -o "${grubdir}"/layout.gkb fr
cat <<EOF
terminal_input at_keyboard
insmod keylayouts
keymap `make_system_path_relative_to_its_root "${grubdir}"/layout.gkb`
EOF
and ran grub-mkconfig which produced the following output in grub.cfg :
terminal_input at_keyboard
insmod keylayouts
keymap /grub/layout.gkb
I checked that the file /boot/grub/layout.gkb (as you have probably figured
out, I have a dedicated partition for Grub's files), it is fine the file has
been successfully created. At last I executed grub-install and rebooted. This
time I'm no longer able to boot : the screen is freezing at Grub's main menu,
the timeout counter isn't even decreasing and I'm not able to enter into Grub's
rescue. Removing the insmod line doesn't change anything.