tsyjcyh 发表于 2004-9-13 10:02:47

怎么做 GRUB splash?

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

caihua 发表于 2004-9-13 10:14:32

:o 这个…………这个………………存为.xpm以后还要压成.gz(不是tar.gz哦)

jackey 发表于 2004-9-13 11:02:31

http://www.magiclinux.org/people/jackey/docs/grubsplash.html

caihua 发表于 2004-9-13 11:06:44

:lol: 英文 :!: 又是一堆的英文 :mrgreen:

lanche 发表于 2004-9-17 00:30:55

有空我也来试试。

lophyxp 发表于 2005-10-28 22:07:17

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.

The image needs to be in xpm format.
The image needs to be 640x480 in size.
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.(两个单词不认识,没看懂这句)

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

demonlj 发表于 2005-10-29 00:46:59

如果想看中文,可以在论坛搜索。
以前有篇中文!

yang119345 发表于 2005-12-6 15:48:33

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.

The image needs to be in xpm format.
The image needs to be 640x480 in size.
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.(两个单词不认识,没看懂这句)

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

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


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

alpher 发表于 2005-12-6 16:20:34

get it to see the image path
让grub找到图片所在的路径。

alpher 发表于 2005-12-6 16:22:51

grub可以读取很多中文件系统,幸好也包括reiserfs和xfs,所以一点都不用担心,grub可以顺利的找到图片位置。

haulm 发表于 2005-12-11 09:43:13

http://www.verygamer.net/wing/bbs/viewthread.php?tid=551&fpage=1

游魂 发表于 2006-1-24 17:35:23

早就想换了,今天换了给果花屏了,但是可以用。是用的640x480啊,何解?

kingduanlian 发表于 2006-2-12 14:20:11

变成14色后,真难看呀?
页: [1]
查看完整版本: 怎么做 GRUB splash?