|
|
因为 bootsplash 要修改 sysv-rc 文件,过程麻烦一些, 而 gensplash 作为 bootsplash 的替代,感觉还是不错的,相对来说安装也简单一些。
主页:http://dev.gentoo.org/~spock/projects/gensplash
gensplash 有两部分组成:fbsplash + splashutils
1. 首先需要给内核打 fbsplash 补丁。
补丁位置: http://dev.gentoo.org/~spock/projects/gensplash/archive
下载合适你内核的 fbsplash 补丁,比如我用的是 debian 官方的linux-source-2.6.17 内核,测试发现
http://dev.gentoo.org/~spock/pro ... 9.2-r5-2.6.16.patch
能正确 patch
而 current patch:
http://dev.gentoo.org/~spock/pro ... -git-20060629.patch
不能正确 patch
当然你也可以用 linux-source-2.6.16 源码:- $ aptitude install linux-source-2.6.16
- $ cd /usr/src
- $ tar xjf linux-source-2.6.16.tar.bz2
复制代码- $ cd /usr/src/to-your-kernel
- $ patch -p1 < ../fbsplash-0.9.2-r5-2.6.16.patch
- 或
- $ cat ../fbsplash-0.9.2-r5-2.6.16.patch | patch p1
复制代码
2. 配置内核
接下来使用你最熟悉的方式编译内核,注意内核引导时需要 initrd 支持,比如我习惯用 make-kpkg 方式编译内核,类似如下:- $ make-kpkg [color=red]--initrd[/color] --revision 2.6.17-4-20060720 --append-to-version -2-ql --config menuconfig kernel_image modules_image
复制代码 menuconfig 时注意以下几个地方:- Block devices
- <*> RAM disk support
- (16) Default number of RAM disks
- (4096) Default RAM disk size (kbytes)
- [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
- Graphics support
- <*> Support for frame buffer devices
- [color=red]<*> ATI Radeon display support
- 此处选择你的显卡型号。或简单选择 vesa
- [*] VESA VGA graphics support[/color]
-
- Console display driver support --->
- --- VGA text console
- [*] Video mode selection support
- <*> Framebuffer Console support
- [color=red][*] Support for the framebuffer splash
- 此处即 fbsplash 补丁位置[/color]
复制代码
3.
安装好内核后,给 fbsplash 选择一件漂亮的衣裳 - theme。
这里我们利用一下 bootsplash 里的 themes:- $ aptitude install bootsplash-theme-debian
- $ cd /etc/bootsplash/themes && ls
- debian
复制代码
但是 bootsplash 的 theme 是不能直接被 fbsplash 使用的,我们需要一个转换工具:
在 /etc/apt/sources.list 加入以下 unofficial source:- # fbsplash - splashutils splashutils-initramfs miscsplashutils
- deb http://jdurand.home.cern.ch/jdurand/splashutils binary/
- # deb-src http://jdurand.home.cern.ch/jdurand/splashutils source/
- $ aptitude update
- $ aptitude install splashutils splashutils-initramfs miscsplashutils
复制代码
使用 bootsplash2fbsplash 来转换 theme- /etc/bootsplash/themes# bootsplash2fbsplash debian
- o Parsed bootsplash-1024x768.cfg (1024x768)
复制代码 此时在 /etc/splash 下有个 debian 目录,即已经转换好的 theme
bootsplash themes 可以到以下链接找:
http://www.bootsplash.org/
http://debblue.debian.net/
4.
将 theme 和相关文件注入 initrd,以便最初引导时就能看到 splash 图像:
$ cd /boot
找到你刚刚安装好的内核对应的 initrd 文件,并注入刚才转换好的 theme,如下:- $ cp initrd.img-2.6.17-2-ql initrd.img-2.6.17-2-ql-fbsplash
- [color=red]$ splash_geninitramfs -a initrd.img-2.6.17-2-ql-fbsplash -v debian[/color]
- o Unpacking initrd.img-2.6.17-2-ql-fbsplash..
- o Creating directory structure..
- o Copying /sbin/splash_helper..
- o Copying themes..
- - debian
- o Creating initramfs image..
复制代码 splash_geninitramfs 详细使用看帮助。
5.
修改 /boot/grub/menu.lst, 类似:- title Debian GNU/Linux on hda8, kernel 2.6.17-1-ql
- root (hd0,0)
- kernel /vmlinuz-2.6.17-1-ql root=/dev/hda8 ro resume2=swap:/dev/hda7 \
- [color=red]video=radeonfb:1024x768-32 splash=silent,theme:debian quiet CONSOLE=/dev/tty1[/color]
- [color=red]initrd /initrd.img-2.6.17-1-ql-fbsplash[/color]
- savedefault
- boot
复制代码
因为你的显卡型号和我的可能不同,具体参数请看:
http://jdurand.home.cern.ch/jdurand/fbsplash.html
http://www.linuxquestions.org/li ... plash_on_debian_sid
重启系统观察效果。 |
|