grub的问题

为当前最终发行版之前的所有版本提供支持
回复
jaeson.heung
帖子: 9
注册时间: 2007-04-15 17:54
送出感谢: 0
接收感谢: 0

grub的问题

#1

帖子 jaeson.heung » 2007-04-29 14:25

我安装了7.04,显示grub菜单时,比较单调。因此想可以显示图片,就下载了xpm.gz的文件。但是无论通过修改memu.lst或starter manager设置,都是在无法显示出来,会出现:failed to read splash image (2,4)/boot/grub/splashimage/*.xpm.gz。我检查了/boot/grub/splashimage下确实有该文件存在。修改了权限或更改其他图形文件也是同样的结果。
请各位高手指点!
头像
dragonguy
帖子: 12
注册时间: 2006-04-29 11:36
送出感谢: 0
接收感谢: 0

#2

帖子 dragonguy » 2007-04-29 14:33

试试这样吧!

splashimage /boot/grub/splashimage/*.xpm.gz

我的就是这样写的,成功显示出来 :D
TurtleRock
帖子: 63
注册时间: 2006-10-06 11:07
送出感谢: 0
接收感谢: 0

#3

帖子 TurtleRock » 2007-04-29 14:41

menu.lst拿出来看看吧,格式不对,应当是类似(hdx,y)才对哦。和你ubuntu的那个启动项的应该是一样的。
或者启动时按c,进入grub>
然后:find /boot/grub/splashimage/your.xpm.gz
得到的答案才对.........
jaeson.heung
帖子: 9
注册时间: 2007-04-15 17:54
送出感谢: 0
接收感谢: 0

#4

帖子 jaeson.heung » 2007-04-29 22:44

请各位看看我的memu.lst,看看哪里出了问题!
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue
splashimage=(hd2,4)/boot/grub/images/ubuntu.xpm.gz

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=169ec599-ba3a-4808-a31a-77e682e61c17 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd2,4)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-15-generic
root (hd2,4)
kernel /vmlinuz-2.6.20-15-generic root=UUID=169ec599-ba3a-4808-a31a-77e682e61c17 ro quiet splash
initrd /initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd2,4)
kernel /vmlinuz-2.6.20-15-generic root=UUID=169ec599-ba3a-4808-a31a-77e682e61c17 ro single
initrd /initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
root (hd2,4)
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

谢谢!
oldniu
帖子: 172
注册时间: 2006-08-10 16:01
送出感谢: 0
接收感谢: 0

#5

帖子 oldniu » 2007-04-29 23:54

root (hd0,0)为第一块硬盘的第一个分区

(hd2,4) 是第三块硬盘的第四个分区。

在grub时,进入命令行。用cat,find都行
cat (hd输入这些字符后按tab键显示出可能的硬件
cat (hd0,按tab键显示出可能的分区

tab的补齐功能在grub的命令行模式下是很有用的,补齐硬盘、分区、目录、文件名。
螺钉头虽然愚笨但总想在坚实的生活里钻出自己的天地来。
swordfish
帖子: 125
注册时间: 2007-04-01 8:36
送出感谢: 0
接收感谢: 0

#6

帖子 swordfish » 2007-04-30 9:17

你的boot分区是单独分出来的吗?
如果是的话
splashimage=(hd2,4)/boot/grub/images/ubuntu.xpm.gz
改为
splashimage=(hd2,4/grub/images/ubuntu.xpm.gz
jaeson.heung
帖子: 9
注册时间: 2007-04-15 17:54
送出感谢: 0
接收感谢: 0

#7

帖子 jaeson.heung » 2007-05-10 1:14

谢谢6楼的提醒,我的就是将boot独立分区,所以将地址改为(2,4)/grub/splashimage/ubumtu.xpm.gz就可以啦!
回复

回到 “老旧版本支持”