制作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:

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

    • avatar best web hosting sites

      I will right away snatch your rss feed as I can’t to find your email
      subscription link or e-newsletter service. Do you’ve any?
      Kindly allow me know so that I could subscribe. Thanks.

      • avatar grolyrtolemcs

        I?¦ve been exploring for a bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I eventually stumbled upon this web site. Studying this info So i?¦m glad to exhibit that I have a very good uncanny feeling I came upon just what I needed. I most definitely will make certain to do not overlook this website and provides it a glance regularly.

        • avatar grolyrto lemcs

          This blog is definitely rather handy since I’m at the moment creating an internet floral website – although I am only starting out therefore it’s really fairly small, nothing like this site. Can link to a few of the posts here as they are quite. Thanks much. Zoey Olsen

          • avatar web hosting service

            I feel that is among the such a lot important info for me.

            And i am glad reading your article. But wanna observation on some common issues, The website taste is ideal,
            the articles is in reality nice : D. Excellent job, cheers