After the Fedora16LiveCD is installed on the hard disk in Windows 7, restart the computer and enter the grub2 boot interface. The black background is always unpleasant. I always want to add a background image for grub2 in Fedora16, therefore, I searched a lot of information on the Internet and did not solve the problem well. Finally, I thought of Ubuntu. Since it belongs to the same linux, there should be the same place. So I tried to make some modifications by referring to the "grub2 Chinese Guide" of Ubuntu, put the gfxterm font file in/usr
After the Fedora 16 LiveCD is installed on the hard disk in Windows 7, restart the computer and enter the grub2 boot interface. The black background is always unpleasant. I always want to add a background image for grub2 in Fedora 16, therefore, I searched a lot of information on the Internet and did not solve the problem well. Finally, I thought of Ubuntu. Since it belongs to the same linux, there should be the same place. So I tried to make some modifications by referring to the "grub2 Chinese Guide" of Ubuntu, when you put the gfxterm font file in/usr/share/grub and run the reboot command, you can see the background image of grub2 ......!
Add the following at the end of/etc/default/grub:
GRUB_BACKGROUND =/usr/share/images/desktop-base/desktop-grub.png
GRUB_TERMINAL_OUTPUT = gfxterm
GRUB_THEME =/boot/grub2/mytheme/theme.txt
Then run the grub2-mkconfig command, may prompt not find the font file, I directly copy the ubuntu font file directly, path:/usr/share/grub inside, simply put. pf2 font file and. h files are all copied. Because fedora does not have the/usr/share/grub directory, you need to create a/usr/share/grub directory by yourself, then put the font files and scripts in it. Ubuntu/etc/grub is found. d/directory contains/etc/grub. d/05_debian_theme and/etc/grub. d/06_ubuntu_theme also copies a copy to fedora's/etc/grub. d/and rename it to/etc/grub. d/05_RedHat_theme and/etc/grub. d/06_fedora_theme and change the content to fedora. Basically, there is no need to modify it. I only modified one, that is, I changed ubuntu to fedora,
Then run the command grub2-mkconfig to see if there are more out 05_redhat_theme and 06_fedora_theme these two items, if there is, there is no need to modify grub. cfg. If not, modify grub. cfg. the contents of 05_debian_theme and 06_ubuntu_theme in cfg are all copied to grub of fedora. cfg save and exit.
Grub background images in Ubuntu are generally stored in the/usr/share/image/desktop-base/directory, the default is usually/usr/share/images/desktop-base/desktop-grub.png, sometimes/image/desktop-base/desktop-grub.png may not be found in/usr/share/(I installed ubuntu11.10 liveCD is not ), create a/usr/share/images/desktop-base/directory by yourself:
Mkdir/usr/share/images/
Mkdir/usr/share/images/desktop-base
Then find a favorite image and rename it to: desktop-grub.png
Mv xxx desktop-grub.png
Then run the command: grub2-mkconfig
Finally run the command: grub2-mkconfig-o/boot/grub2/grub. cfg to refresh the configuration file;
After restarting the computer, you can see that the grub background is your favorite background image www.linuxidc.com.
Grub2 change the background image:
Modify/etc/grub. d/05_redhat_theme, find this line: if set_background_image "/usr/share/images/desktop-base/desktop-grub.png" then, replace the quotation marks with the path of the directory of the image you want to change.
In this way, Grub will:
Find the file with the suffix png under the path of the directory of the image you want to change.
NOTE: If your image is in jpg format, you only need to add a jpg image after the suffix.
Grub2-mkconfig
Grub2-mkconfig-o/boot/grub2/grub. cfg
In this way, you can see it after the restart.
If you want to modify the image resolution, the ratio is 1334x768, then modify/etc/default/grub:
GRUB_GFXMODE = 1334x768 remove the # number in front of it. If it is not removed, it is the default value.
Change font color:
Modify/etc/grub. d/05_redhat_theme and 06_fedora_theme to modify the following two rows.
Color_normal = green/black
Color_highlight = white/black
Note:
Set color_normal = green/black green indicates the font color/black indicates the background color
Set color_highlight = white/black white is the selected color/black is the background color
Here, the background color must be black (black is translated as black, and black is actually transparent),/the Front color can be changed to your favorite color.
Then grub2-mkconfig
Grub2-mkconfig-o/boot/grub2/grub. cfg
Sudo reboot
After restarting the computer, you can see the effect.