How to change the header title and help message in GRUB menu?
My Grub version is 1.99-21ubuntu3
and I'm using Ubuntu 12.04 LTS.
How to change the header title and help message in GRUB menu?
My Grub version is 1.99-21ubuntu3
and I'm using Ubuntu 12.04 LTS.
You can try to edit the grub2 source code to modify those strings (Header,Footer etc).
1) Make sure you have enable the Source code repository.
Open a Terminal window Ctrl+Alt+T and type:
sudo apt-get update
2) In the Terminal type the following to install the necessary packages.
sudo apt-get install build-essential quilt
3) Install build dependencies.
sudo apt-get build-dep grub2
4) Create a folder to download the source code.
mkdir ~/Downloads/src
cd ~/Downloads/src
5) Download the source code & Export variables.
apt-get source grub2
export QUILT_PATCHES=debian/patches
export EDITOR=gedit
6) Create the patch and edit the source code.
cd grub2-1.99
quilt new 99_custom-header-footer.patch
quilt edit grub-core/normal/main.c
As an example I changed the line 214
From:
const char *msg = _("GNU GRUB version %s");
To:
const char *msg = _("My Custon Grub Title");
quilt edit grub-core/normal/menu_text.c
Edit the "Strings" (Pink Color) According to your needs.
Only as an example I changed the lines 159 & 160
From:
const char *msg = _("Use the %C and %C keys to select which "
"entry is highlighted.\n");
To:
const char *msg = _("You can write a text message here according \
to your needs...\n");
And the lines 187 to 189
From:
(_("Press enter to boot the selected OS, "
"\'e\' to edit the commands before booting "
"or \'c\' for a command-line.\n"),
To:
(_("You can put a message here... to press \
a key to boot the OS.\nOr a Help text... etc."),
7) Build the deb packages.
quilt refresh
fakeroot dpkg-buildpackage
NOTE: This may take awhile.
8) Install the deb packages.
cd ..
sudo dpkg -i grub-pc*.deb grub2-common*.deb
9) Finally you can Restart your machine to see the changes.
Hope this helps.
you can use a .\locales\en.mo file to change the menu heading. One example is here