Fedora16 adds and modifies the background image and font color for grub2

Source: Internet
Author: User

I think my grub2 boot interface is too dark, so I searched the internet for a solution. Since grub2 is relatively new, it seems that the grub2 background has not been changed on fedora16, and only one similar article has been found.
 
 
Add a background image to Grub2
 
Step 1
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
 
Step 2
 
Create/usr/share/grub directory and Change permissions
 
Mkdir/usr/share/grub
Chmod 0777/usr/share/grub
Step 3
Download the uploaded gfxterm font file:
 
Http://download.csdn.net/detail/gaoxin1076/4033667 (tar.bz2 format)
Http://download.csdn.net/detail/gaoxin1076/4033663 (rar format)
Decompress the file and put all the files in the/usr/share/grub directory.
 
Step 4
 
If you download the file in rar format, rename 05_debian_theme and 06_ubuntu_theme in the file to 05_redhat_theme and 06_fedora_theme.
 
If it is tar.bz2, you don't need this step. I should have done it.
 
If you want to open the file 06_fedora_theme
 
 
Echo "Found Debian background: 'basename $ {bg} '"> & 2
 
Change
 
Echo "Found Fedora background: 'basename $ {bg} '"> & 2
Of course, you can leave it alone if you are lazy.
 
Step 5
 
Create a/usr/share/images/desktop-base/directory:
 
 
Mkdir/usr/share/images/
Mkdir/usr/share/images/desktop-base
If yes, you do not need to create it. Pay attention to permission issues.
 
Then find a favorite image and rename it to: desktop-grub.png put in
 
 
Step 6
Run commands
 
 
Grub2-mkconfig
 
Grub2-mkconfig-o/boot/grub2/grub. cfg
 
To refresh the configuration file;
After restarting the computer, you can see that grub's background is your favorite background image.
 
 
The following are some additional considerations:
Add a background image to Grub2
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.
 
I tried it for n times and found that only images in png format can be converted. The reason is unknown.
Change font color:
Modify 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.

From MagicBox

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.