|
发表于 2005-12-23 17:27:42
|
显示全部楼层
声明:不是原创!
下面是 www.sw-linux.com.cn/bbs上的一个帖子[也许对你有用]:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
以前问过一个问题,就是在console模式下控制台1的背景上的那个简笔勾勒的小企鹅是怎么做出来的。可惜一直没有得到解答。
前几天想做一个启动软盘时发现了bootsplash软件包,研究了一番,恍然大悟。还是自食其力,自己把这个问题解答了吧。
首先给一个目录:
/etc/bootsplash/themes/rayslx/images
里面两幅图相信大家很熟悉的吧Smile。我看到图的第一反应就是找另一幅替换,然后重启,结果吗--呵呵:”除非原理是正确的,否则它不会正常工作“--但它是不正确的。
进入到../config,里面的配置文件很明白,就不多说了。
然后要好好研究了。给一个目录:/usr/share/doc/swbootsplash,看完里面的东西大家就应该都会做自己的bootsplash了。里面有四个文件:
1,README.kernel
这个文件解释怎么将一个内核打上bootsplash的patch以支持启动时显示bootsplash。我们的rayslx已经打过了,所以就不需要了。有一个命令很重要:
/sbin/splash -s -f /etc/bootsplash/themes/yourtheme/config/bootsplash-1024x768.cfg >> /boot/initrd.splash
放到rayslx里应该是:
/sbin/splash -s -f /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg >> /boot/initrd.img-2.6.9-1-686
2,README.themes
这个文件描述了/etc/bootsplash/themes/rayslx/里目录的作用,有一句话很重要:
If you change the theme you have to call "mkinitrd" and, if using lilo as bootloader, "lilo" afterwards.
我们用的是grub,后面类似lilo的更新就不用了。
3,README.bootsplash.gz
可以使用这个命令查看文件:
man -l README.bootsplash.gz
这个文件解释了"splash" utility的一些功能,也有一个命令很重要:
splash ‐s ‐u 0 /etc/bootsplash/themes/current/config/bootsplash‐1024x768.cfg
意思是在控制台1显示bootsplash,如果我们想在控制台2-6也显示,就可以执行:
splash -s -u 1 /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg
splash -s -u 2 /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg
splash -s -u 3 /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg
splash -s -u 4 /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg
splash -s -u 5 /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg
注意,参数号(0-5)比控制台号(1-6)少1。
4,README.config.gz
这个文件解释config文件的语法,如果大家想自己配置config就好好看看吧Smile
下面的制作过程就很简单了,只需三步:
1,用一幅自己喜欢的图片替换/etc/bootsplash/themes/rayslx/images里的默认图片,注意两点:
(1)图片最好是黑色背景,不要太花哨,否则控制台的字符就不太好辨认了。
(2)也可以在不替换原有的,在/etc/bootsplash/themes/rayslx/config里改一下图片名就可以了。
2,更新initrd。
我原来用:
/sbin/splash -s -f /etc/bootsplash/themes/rayslx/config/bootsplash-640x480.cfg >> /boot/initrd.img-2.6.9-1-686
命令将bootsplash写入initrd的最后,但是启动后还是那个小企鹅,不是自己的图片。想了半天,才明白原来initrd的最后已经有了原来的小 企鹅的bootsplash了。再追加在末尾是不起作用的。所以,应该遵循这句话:
If you change the theme you have to call "mkinitrd" and, if using lilo as bootloader, "lilo" afterwards.
使用命令:
#/usr/sbin/mkinitrd -o /boot/initrd-myown
重新制作一个initrd,注意要有root权限。
3,更新grub
将/boot/grub/menu.lst里的:
initrd /boot/initrd.img-2.6.9-1-686
换成自己的initrd:
initrd /boot/initrd-myown
重新启动,看看是不是出现自己的图片了?
”既然它正常工作了,那么它的原理就是正确的“
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
不知道你是怎么安装的?能给出你的操作步骤么? |
|