免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1202 | 回复: 0
打印 上一主题 下一主题

GRUB Splash Image Information [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-21 14:14 |只看该作者 |倒序浏览

               
               
            
            
                 There are 3 important things to know about GRUB's splash image support.
                    [1] The image needs to be in xpm format.
                        [2] The image needs to be 640x480 in size.
                      [3] The image must have only 14 colors.
         
               
The
xpm file can be left as is or gzipped; grub seems to load gzipped
images a bit faster. The thinking on this is that grub can load a
gzipped image and decompress it faster than it can load the full size
image, due to hard drive access times.
            
You can still change
the foreground and background colors of grub's menu if you're using a
splash image, but the image itself won't be affected, only the menu
overlay.
         
                 Here are a couple ways to get an image in the format you want it:
                   The quick way: (using convert from imagemagick)
                     convert -resize 640x480 -colors 14 whatever.xpm && gzip whatever.xpm
                 The slow way: (using the gimp)
Open the image you want to use in the gimp, click the "Image" menu,
then "Mode", then "Indexed". Select "Generate Optimum Palette:" and
enter 14 for the maximum number of colors. It's also recommended that
you check the "No Color Dithering" option.
After the conversion, save the file as whatever.xpm. The gimp should
automatically create the correct format when it saves the file.
           
               
After
you've gotten the image into the correct format and gzipped it (or not,
your choice), all you need to do is add it to your grub config file,
menu.lst (sometimes grub.conf, symlinked to menu.lst or a normal file,
depending on your distribution.) The line you need looks something like
this:
              
splashimage (hd0,2)/grub/crux02.xpm.gz
               
This
example is from my system, where the image is called crux02.xpm.gz and
is stored in /boot/grub. /boot is the 3rd partition on my system, so
(hd0,2) is needed to point grub to the right place. As you might guess,
grub numbers partitions and drives with a 0-origin. So (hd0,2) means
the first hard drive, third partition. GRUB can read many different
filesystems, including reiserfs and xfs, fortunately, so nothing funky
is needed to get it to see the image path.
            
Reboot to test the image and you're done.
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/20700/showart_130685.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP