I checked the Grub 2 scripts. To alter the Grub 2 menuentries for your main Ubuntu OS, you would edit the /etc/grub.d/10_linux script:
Code:
sudo cp /etc/grub/10_linux /etc/grub.d/10_linux.bak
sudo cp /etc/grub/30_os-prober /etc/grub.d/30_os-prober.bak
gksu gedit +85 /etc/grub.d/10_linux & gksu gedit +184 /etc/grub.d/30_os-prober &
The first command makes a backup.
The second commands opens 10_linux near the line you need to edit. I may have modified the scripts so your line numbers may be lower. I'm using Grub 1.99.
In the example below, I've changed the main entry but left the Recovery option unchanged so you can see the difference. You would most likely want to change both.
Code:
if ${recovery} ; then
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
else
title=" $(gettext_quoted "%s, with Linux %s")"
fi
Save the file and update-grub.
I don't have Windows loaded on my current machine, but I think these are the lines you would alter in 30_os-prober and add spaces immediately before $LONGNAME:
Code:
found_other_os=1
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class windows --class os {
EOF
Several 'agains':
Save and update-grub.
I can't verify it since I have no Windows entries, so if it doesn't work, let me know.
Grub Customizer can manually edit the title if this doesn't work.
If the scripts are updated you will need to make the changes to the scripts again, but they shouldn't change too often.
Bookmarks