制作grub背景图

  • A+
所属分类:运维教程

准备一幅图片,要求它的分辨率640×480(因为grub只支持这个分辨率的图片)将图片格式转成xpm(因为grub只支持这个格式图片)并且该xpm图片色深必须是14,此要求用一个命令即可完成:

convert -resize 640x480 -colors 14 winner.png splash.xpm

我们可以这样检查图片是否符合grub的要求,用此命令:

more splash.xpm

如果在文件的头部可以找到这些信息,则说明该图片可以被grub正常显示:

static char *splash[] = {
"640 480 14 1",

打开文件/boot/grub/grub.conf找到其中的一行:

splashimage=(hd0,1)/grub/splash.xpm.gz

/boot/grub/splash.xpm.gz就是最终显示的图片,按照这个要求我们用下面的命令压缩图片:

gzip -9 splash.xpm

最后压缩成splash.xpm.gz,将其放到/boot/grub/路径下,替换掉原图片,重启看看个性化图片吧。

效果如下:

制作grub背景图

  • 问答中心
  • 微信小程序扫一扫
  • weinxin
  • 微信公众
  • 微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:13   其中:访客  13   博主  0

    • avatar see page

      Hello my family member! I want to say that this post is awesome, nice written and come with almost all important infos. I would like to peer extra posts like this .

      • avatar flea comb

        I discovered your weblog web site on google and check a few of your early posts. Proceed to keep up the superb operate. I simply extra up your RSS feed to my MSN News Reader. Searching for ahead to studying extra from you in a while!…

        • avatar look at here

          Good day! Do you use Twitter? I’d like to follow you if that would be ok. I’m absolutely enjoying your blog and look forward to new posts.