I modified the grub "os-prober" script to allow user-defined name replacements for menu entries. First, find the following code in /etc/grub.d/30_os-prober:
if [ -z "${LONGNAME}" ] ; then
LONGNAME="${LABEL}"
fi
After that code, add this:
# Begin patch
if [ "x${GRUB_OS_PROBER_RENAME_LIST}" != "x" ]; then
for RENAME in ${GRUB_OS_PROBER_RENAME_LIST} ; do
SRCNAME="`echo ${RENAME} | cut -d ':' -f 1 | tr '^' ' '`"
DSTNAME="`echo ${RENAME} | cut -d ':' -f 2 | tr '^' ' '`"
if [ "${LONGNAME}" = "${SRCNAME}" ]; then
LONGNAME="${DSTNAME}"
echo "Renamed '${SRCNAME}' to '${DSTNAME}' by user request." >&2
fi
done
fi
# End patch
Then, in /etc/default/grub, add the rename rules you want to use. This can go anywhere in the file:
# Rename list for OS's detected by os-prober. This is a space-separated
# list of rename mappings. A rename mapping is a colon-separated pair
# of strings, where each string has its spaces converted to ^ characters.
# The first string is the name of the OS reported by os-prober, and the
# second string is the replacement used by update-grub. This variable
# requires a change to /etc/grub.d/30_os-prober.
export GRUB_OS_PROBER_RENAME_LIST="Windows^Recovery^Environment^(loader):Windows^10"
Finally, update your grub:
sudo update-grub
If it worked correctly, the update-grub output will tell you what was renamed and your boot menu should also be updated.
To get rid of the extra Windows menu entry, I used the GRUB_OS_PROBER_SKIP_LIST feature in /etc/default/grub.