当前时区 GMT+8, 现在时间是 2008-8-22 06:14 游客: 注册 登录 仅登录论坛 | 搜索 帮助
标题: 怎么做 GRUB splash?
tsyjcyh
注册会员
Rank: 2


UID 14270
精华 2
积分 493
帖子 253
阅读权限 20
注册 2003-1-24
来自 shanxi
状态 离线
发表于 2004-9-13 10:02  资料  短消息  加为好友  QQ Yahoo!
怎么做 GRUB splash?

想自己搞一个.以前用红帽8时就有这种想法,在gimp下自己做了一张图,存为.xpm,拷贝过去后,grub就只有蓝屏,只好用光盘修复(那时水平太菜).后来就再也没尝试过.希望指点一二.

顶部
caihua
白金会员
Rank: 9Rank: 9Rank: 9


UID 2376
精华 10
积分 16721
帖子 11914
阅读权限 255
注册 2002-8-22
来自 超级凉粉
状态 离线
发表于 2004-9-13 10:14  资料  主页 短消息  加为好友  添加 caihua 为MSN好友 通过MSN和 caihua 交谈 QQ
这个…………这个………………存为.xpm以后还要压成.gz(不是tar.gz哦)





幸福与不幸福,好与不好,只在一念之间。 强悍签名 树不要皮,必死无疑,人不要脸,天下无敌!! 水至深无鱼,人至贱无敌
顶部
jackey
公社版主



UID 4000
精华 13
积分 2536
帖子 1026
阅读权限 225
注册 2002-10-23
来自 加拿大
状态 离线
发表于 2004-9-13 11:02  资料  主页 短消息  加为好友 
http://www.magiclinux.org/people/jackey/docs/grubsplash.html





从明天起,做一个幸福的人 喂马,劈柴,周游世界 从明天起,关心粮食和蔬菜 我有一所房子,面朝大海,春暖花开 从明天起,和每一个亲人通信 告诉他们我的幸福 那幸福的闪电告诉我的 我将告诉每一个人 给每一条河每一座山取一个温暖的名字 陌生人,我也为你祝福 愿你有一个灿烂的前程 愿你有情人终成眷属 愿你在尘世获的幸福 我也愿面朝大海,春暖花开 《面朝大海,春暖花开》(海子)
顶部
caihua
白金会员
Rank: 9Rank: 9Rank: 9


UID 2376
精华 10
积分 16721
帖子 11914
阅读权限 255
注册 2002-8-22
来自 超级凉粉
状态 离线
发表于 2004-9-13 11:06  资料  主页 短消息  加为好友  添加 caihua 为MSN好友 通过MSN和 caihua 交谈 QQ
英文 又是一堆的英文





幸福与不幸福,好与不好,只在一念之间。 强悍签名 树不要皮,必死无疑,人不要脸,天下无敌!! 水至深无鱼,人至贱无敌
顶部
lanche
公社版主



UID 19378
精华 0
积分 4211
帖子 1646
阅读权限 225
注册 2003-3-3
来自 GXNN
状态 离线
发表于 2004-9-17 00:30  资料  主页 短消息  加为好友  添加 lanche 为MSN好友 通过MSN和 lanche 交谈 QQ Yahoo!
有空我也来试试。

顶部
lophyxp
中级会员
Rank: 3Rank: 3


UID 8538
精华 1
积分 842
帖子 338
阅读权限 30
注册 2002-12-19
来自 China
状态 离线
发表于 2005-10-28 22:07  资料  主页 短消息  加为好友  QQ
GRUB Splash Image Information

06.27.2004 17:20 CST
2005年10月28日 22:06 北京时间
Lophyxp译

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.

GRUB背景图片的一些东东

关于GRUB的背景图片的支持,有三件重要的事必须知道:
1、图片必须是xpm格式
2、图片大小必须是640x480
3、图片只能有14种颜色(苛刻)

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.

xpm文件可以是原始文件,也可以用gzip压缩;grub读取压缩图片时可能会快一点。(下面解释了为什么会快一点)

假如使用了GRUB背景图片,你仍然可以配置GRUB菜单的前景色和背景色。但是配置对图片没有效果,它仅仅影响菜单而已。

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.

下面给出一些获得规定格式图片的方法:
快速的方法(使用Imagemagick软件包中的convert命令):
convert -resize 640x480 -colors 14 whatever.xpm && gzip whatever.xpm
完美的方法(使用GIMP):
在GIMP中打开你想使用的图片,点击“图片(image)”菜单,然后“模式(mode)”,然后“索引(indexed)”,选择“生成优化色板(Generate Optimum Palette:)”在“最大颜色数量(maximum number of colors)”后面输入14。同时也推荐你选择“从最终色板中删除没有被使用的颜色(No Color Dithering)”选项。转换之后,另存为whatever.xpm。GIMP就会创建规定格式的图片文件。

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.
当你制作好了规定格式的图片并压缩以后(不压缩也行),你只需要修改你的GRUB配置文件(配置文件一般名为menu.lst,有时也会被命名为grub.conf,不同的发行版有所不同),增加如下一行:

splashimage (hd0,2)/grub/crux02.xpm.gz

在这个例子里,我的图片被命名为crux02.xpm.gz,并被存储在/boot/grub目录下,/boot是我硬盘上的第三个分区。(hd0,2)将这个分区指示给GRUB。如你所猜测的,GRUB中标识分区和硬盘的数字是从0开始的。所以(hd0,2)的意思是第一块硬盘上的第三个分区。GRUB能读取许多中文件系统,比如reiserfs,ext3,xfs等等。fortunately, so nothing funky is needed to get it to see the image path.(两个单词不认识,没看懂这句)

都完成了,重启后就能看到图片了。





蚍蜉撼大树,蚂蚁啃骨头。 你要是对Linux的字体不满意,就去“文泉驿”出点力。
顶部
demonlj
银牌会员
Rank: 6Rank: 6


UID 151351
精华 5
积分 5413
帖子 2160
阅读权限 70
注册 2004-9-7
来自 蓝旗营技校
状态 离线
发表于 2005-10-29 00:46  资料  短消息  加为好友  QQ
如果想看中文,可以在论坛搜索。
以前有篇中文!

顶部
yang119345
注册会员
Rank: 2


UID 21815
精华 0
积分 180
帖子 72
阅读权限 20
注册 2003-3-15
来自 China
状态 离线
发表于 2005-12-6 15:48  资料  主页 短消息  加为好友 
[quote:e288b5f82b="lophyxp"]GRUB Splash Image Information

06.27.2004 17:20 CST
2005年10月28日 22:06 北京时间
Lophyxp译

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.

GRUB背景图片的一些东东

关于GRUB的背景图片的支持,有三件重要的事必须知道:
1、图片必须是xpm格式
2、图片大小必须是640x480
3、图片只能有14种颜色(苛刻)

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.

xpm文件可以是原始文件,也可以用gzip压缩;grub读取压缩图片时可能会快一点。(下面解释了为什么会快一点)

假如使用了GRUB背景图片,你仍然可以配置GRUB菜单的前景色和背景色。但是配置对图片没有效果,它仅仅影响菜单而已。

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.

下面给出一些获得规定格式图片的方法:
快速的方法(使用Imagemagick软件包中的convert命令):
convert -resize 640x480 -colors 14 whatever.xpm && gzip whatever.xpm
完美的方法(使用GIMP):
在GIMP中打开你想使用的图片,点击“图片(image)”菜单,然后“模式(mode)”,然后“索引(indexed)”,选择“生成优化色板(Generate Optimum Palette:)”在“最大颜色数量(maximum number of colors)”后面输入14。同时也推荐你选择“从最终色板中删除没有被使用的颜色(No Color Dithering)”选项。转换之后,另存为whatever.xpm。GIMP就会创建规定格式的图片文件。

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.
当你制作好了规定格式的图片并压缩以后(不压缩也行),你只需要修改你的GRUB配置文件(配置文件一般名为menu.lst,有时也会被命名为grub.conf,不同的发行版有所不同),增加如下一行:

splashimage (hd0,2)/grub/crux02.xpm.gz

在这个例子里,我的图片被命名为crux02.xpm.gz,并被存储在/boot/grub目录下,/boot是我硬盘上的第三个分区。(hd0,2)将这个分区指示给GRUB。如你所猜测的,GRUB中标识分区和硬盘的数字是从0开始的。所以(hd0,2)的意思是第一块硬盘上的第三个分区。GRUB能读取许多中文件系统,比如reiserfs,ext3,xfs等等。fortunately, so nothing funky is needed to get it to see the image path.(两个单词不认识,没看懂这句)

都完成了,重启后就能看到图片了。[/quote]

fortunately, so nothing funky is needed to get it to see the image path.(两个单词不认识,没看懂这句)
如此幸运,所以没有必要为获取和看到图片的路径而感到害怕


嘿嘿,不知道对不对,我瞎胡闹的

顶部
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-12-6 16:20  资料  主页 短消息  加为好友 
get it to see the image path
让grub找到图片所在的路径。





开发计划: llk_linux-2.2版 已经发布,欢迎使用 个人主页:http://zhaomingxian.googlepages.com
顶部
alpher
公社版主



UID 165067
精华 6
积分 3627
帖子 1450
阅读权限 225
注册 2004-11-4
来自 China
状态 离线
发表于 2005-12-6 16:22  资料  主页 短消息  加为好友 
grub可以读取很多中文件系统,幸好也包括reiserfs和xfs,所以一点都不用担心,grub可以顺利的找到图片位置。





开发计划: llk_linux-2.2版 已经发布,欢迎使用 个人主页:http://zhaomingxian.googlepages.com
顶部
haulm
公社版主



UID 201438
精华 9
积分 5391
帖子 2604
阅读权限 225
注册 2005-10-2
状态 离线
发表于 2005-12-11 09:43  资料  短消息  加为好友 
http://www.verygamer.net/wing/bbs/viewthread.php?tid=551&fpage=1





自古多情空余恨,几人独潇洒。
问君相伴何所思,唯叹红叶飞。
凭栏窗外一皓月,冷风抚面,寒星如冰。
回想前事独伤感,难分难离,倒是山峦草芥,依旧青。
顶部
游魂
注册会员
Rank: 2


UID 199419
精华 0
积分 173
帖子 69
阅读权限 20
注册 2005-9-7
状态 离线
发表于 2006-1-24 17:35  资料  主页 短消息  加为好友  添加 游魂 为MSN好友 通过MSN和 游魂 交谈
早就想换了,今天换了给果花屏了,但是可以用。是用的640x480啊,何解?





想飞的猪
顶部
kingduanlian
注册会员
Rank: 2


UID 105162
精华 0
积分 345
帖子 138
阅读权限 20
注册 2004-3-17
来自 China
状态 离线
发表于 2006-2-12 14:20  资料  短消息  加为好友  添加 kingduanlian 为MSN好友 通过MSN和 kingduanlian 交谈
变成14色后,真难看呀?

顶部
 


Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
清除 Cookies - 联系我们 - 中国Linux公社 - WAP