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:
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:
|
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. |