[Original] modify the grub boot image

Source: Internet
Author: User

Modify the grub boot image

By: Wu Yin
Date: 2007-06-28
Email: Lazy_fox # msn.com
Homepage: Http://blog.csdn.net/wooin
Copyright information: This article is copyrighted by Wu Yin. It can be freely transmitted and replicated for non-commercial purposes.
For commercial purposes, any behavior in this article shall be approved by the author.
Contact info: lazy_fox # msn.com

1. First, you need an image with a resolution of 640x480, because grub only supports this resolution.
2. Convert the image format to XPM because grub only supports images in this format.
3. In addition, the image color depth of the XPM must be 14, and the above requirements can be completed with a command:

# Convert-resize 640x480-colors 14 wallpaper.png splash. XPM

The example command is to convert wallpaper.png to a required image splash. XPM.

4. We can check whether the image meets the requirements of grub by running the following command:
# More splash. XPM

If this information can be found in the file header, it indicates that the image can be properly displayed by GRUB:

/* XPM */
Static char * 10 [] = {
/* Columns rows colors chars-per-pixel */
"640 480 14 1 ",

5. Open the file:/boot/GRUB/grub. conf
Find one of the rows: splashimage = (hd0, 2)/boot/GRUB/splash.xpm.gz
(Depending on the release version, the path and file name may be different and you need to modify it yourself .)
/Boot/GRUB/splash.xpm.gz is the final image to be displayed. Follow the instructions below to compress the image:
# Gzip-9 splash. XPM
6. The last step is splash.xpm.gz. Put it in the/boot/GRUB/path, replace the original image, and restart it to check your new image.
 

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.