给grub加背景图片问题

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

给grub加背景图片问题

#1

帖子 836962782 » 2009-11-10 12:35

这是我的GRUB,系统是9.10的,我想给它加图片,可是怎么调都没用,不知道哪的问题,各位帮忙看下~~~~
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 04db10bb-7b66-4057-8b2c-9f37ec44009e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1280*768
insmod gfxterm
insmod vbe
insmod png
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
background_image (hd0,10)/boot/E17-06.png
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=cyan/black
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "启动Ubuntu, Linux 2.6.31-15-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 04db10bb-7b66-4057-8b2c-9f37ec44009e
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=04db10bb-7b66-4057-8b2c-9f37ec44009e ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "启动Ubuntu, Linux 2.6.31-15-generic (修复模式)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 04db10bb-7b66-4057-8b2c-9f37ec44009e
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=04db10bb-7b66-4057-8b2c-9f37ec44009e ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "内存测试" {
linux16 /boot/memtest86+.bin
}
menuentry "内存测试(memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "启动Microsoft Windows Seven(Windows 7)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 20c89bdbc89bad92
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 给grub加背景图片问题

#2

帖子 smallapple » 2009-11-10 12:53

如果文件路径和文件名都没错,应该是格式有问题,用gimp转为 jpeg 格式的再试试
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#3

帖子 836962782 » 2009-11-10 14:53

smallapple 写了:如果文件路径和文件名都没错,应该是格式有问题,用gimp转为 jpeg 格式的再试试
还有问什么中文显示“????”呢??~~~
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 给grub加背景图片问题

#4

帖子 smallapple » 2009-11-10 15:13

/usr/share/grub/unicode.pf2
这个字体文件没加载上吧,看看文件在不在。
还有检查下 启动分区 是不是 hd0,10
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#5

帖子 836962782 » 2009-11-10 15:26

smallapple 写了:/usr/share/grub/unicode.pf2
这个字体文件没加载上吧,看看文件在不在。
还有检查下 启动分区 是不是 hd0,10
额,看了下,目录里面没有unicode.pf2文件~~~这个在哪里有????
启动分区应该是hd0,10吧,我的grub.cfg里面是这样的~~~~你给看看有没有什么问题吧~~~
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#6

帖子 836962782 » 2009-11-11 9:01

顶顶,别沉了
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 给grub加背景图片问题

#7

帖子 smallapple » 2009-11-11 11:41

把你的grub2重装下,再update-grub下。不清楚你少了什么东西。
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#8

帖子 836962782 » 2009-11-11 12:39

smallapple 写了:把你的grub2重装下,再update-grub下。不清楚你少了什么东西。
图片搞定了,按你说的UPDATE了下,重新弄遍就行了,难道是图片分辨率中间的那个乘号????我换成了“1280x768”就行了,原来我是输成“1280*768”,是不是这个原因呢?????
还有,我想问下,字体大小能改么,看上去有点小~~~~
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 给grub加背景图片问题

#9

帖子 smallapple » 2009-11-11 12:44

set gfxmode=1280x768
分辨率设太大,目前好象也就支持 1024x768 800x600 640x480三种,分辨率越大字体越小,你设成 800x600 或 640x480的试试
头像
jmw778s
帖子: 994
注册时间: 2009-10-16 11:13
来自: 福安
联系:

Re: 给grub加背景图片问题

#10

帖子 jmw778s » 2009-11-11 12:48

boot是独立分区不?
是,就是图片路径有问题。
去掉/boot,我也是刚刚解决的

代码: 全选

insmod jpeg
insmod png
insmod ntfs
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 9310864c-5dfd-402e-b08e-bf563a336ba1
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=800x600
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=5
  background_image (hd0,8)/images/4062.jpg
fi
Acer 4738ZG-P22G50Mnkk 笔记本电脑
我用Windows 7 来这里装13的
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#11

帖子 836962782 » 2009-11-11 15:55

smallapple 写了:
set gfxmode=1280x768
分辨率设太大,目前好象也就支持 1024x768 800x600 640x480三种,分辨率越大字体越小,你设成 800x600 或 640x480的试试
但是我设置为1280*768的也可以显示出来啊~~~~~而且,我改完分辨率后启动画面会比变暗~~~
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
ubuntua
帖子: 542
注册时间: 2009-10-04 11:23

Re: 给grub加背景图片问题

#12

帖子 ubuntua » 2009-11-11 16:00

请问一下,设了图片后,会不会感觉启动会变慢了?还有,加载中文字体的话,启动也会变慢,有没有这种感觉?
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#13

帖子 836962782 » 2009-11-11 16:03

ubuntua 写了:请问一下,设了图片后,会不会感觉启动会变慢了?还有,加载中文字体的话,启动也会变慢,有没有这种感觉?
额,不会吧,至少我没感觉出来~~~~呵呵
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 给grub加背景图片问题

#14

帖子 smallapple » 2009-11-11 16:10

836962782 写了:
smallapple 写了:
set gfxmode=1280x768
分辨率设太大,目前好象也就支持 1024x768 800x600 640x480三种,分辨率越大字体越小,你设成 800x600 或 640x480的试试
但是我设置为1280*768的也可以显示出来啊~~~~~而且,我改完分辨率后启动画面会比变暗~~~
不错,现在己经可以支持显卡所能支持的VBE显示分辨率了。 :em02
我都用800x600的,分辨率再大就觉得字体太小了
头像
836962782
帖子: 82
注册时间: 2009-10-31 8:38

Re: 给grub加背景图片问题

#15

帖子 836962782 » 2009-11-11 17:38

smallapple 写了:
836962782 写了:
smallapple 写了:
set gfxmode=1280x768
分辨率设太大,目前好象也就支持 1024x768 800x600 640x480三种,分辨率越大字体越小,你设成 800x600 或 640x480的试试
但是我设置为1280*768的也可以显示出来啊~~~~~而且,我改完分辨率后启动画面会比变暗~~~
不错,现在己经可以支持显卡所能支持的VBE显示分辨率了。 :em02
我都用800x600的,分辨率再大就觉得字体太小了
那为什么会变暗呢???~~~~
===============
LENOVO Y450 TSI
OS:Win 7+Ubuntu9.10
===============
回复