1.安装内核编译环境:
关心一下有关 kernel-package、gcc、binutils 和 modutils 的错误报告。在需要时使用较新的版本。
在 Debian 系统中用源码编译自定义内核要特别小心。用 make-kpkg 的 --append_to_version 选项来创建多重内核镜像比较安全。

 
  
  1. # apt-get install debhelper modutils kernel-package libncurses5-dev 


2.编译内核。
下载内核及其bootsplash内核补丁:
内核源代码包:http://www.kernel.org/pub/linux/kernel/v2.6/
bootsplash补丁下载地址:http://www.bootsplash.de
下载合适的内核补丁: 2.6.15内核下载bootsplash-3.1.6-2.6.15.diff (2.6.17内核也可使用此补丁)

3.解开内核源码包,进入源码包目录,加上补丁。

 
  
  1. #cd linux-2.6.15 
  2. #patch -p1 -i /tmp/bootsplash-3.1.6-2.6.15.diff (假定 bootsplash 的补丁放了在 /tmp 之中) 


4.打补丁成功,内核设定文件(.config)

 
  
  1. #cp /boot/config-2.6.15 .config 
  2. #make old config 
  3. #make menu config 
  4.  
  5. Device Drivers ---> Block devices ---> 
  6. <*> RAM disk support 
  7. [*] Initial RAM disk (initrd) support 
  8.  
  9. Device Drivers ---> Graphics support ---> 
  10. <*> Support for frame buffer devices 
  11. [*] VESA VGA graphics support 
  12.  
  13. Device Drivers ---> Graphics support ---> Console display driver support ---> 
  14. --- VGA text console 
  15. [*] Video mode selection support 
  16. <*> Framebuffer Console support 
  17.  
  18. Device Drivers ---> Graphics support ---> Bootsplash configuration ---> 
  19. [*] Bootup splash screen 


5.编译内核,并且打包

 
  
  1. #make-kpkg --revision 20060717 --initrd binary 


上层目录生成5个 .deb文件

 
  
  1. linux-doc-2.6.15_20060616_all.deb 
  2. linux-headers-2.6.15_20060616_i386.deb 
  3. linux-p_w_picpath-2.6.15_20060616_i386.deb 
  4. linux-manual-2.6.15_20060616_all.deb 
  5. linux-source-2.6.15_20060616_all.deb 


6.安装新内核

 
  
  1. dpkg -i linux-p_w_picpath-2.6.15_20060616_i386.deb 


这个内核已经有bootsplash支持了,不过还需要合适的 initrd.img。

7.安装bootsplash

 
  
  1. #vim /etc/apt/source.lst 
  2. deb http://debian.bootsplash.de unstable main 
  3. deb-src http://debian.bootsplash.de unstable main 
  4.  
  5. #apt-get update 
  6. #apt-get install bootsplash 
  7. #apt-get install bootsplash-theme-newlinux 
  8.  
  9. # apt-get install sysv-rc-bootsplash (安装进度条) 
  10. Reading package lists... Done 
  11. Building dependency tree... Done 
  12. sysv-rc-bootsplash is already the newest version. 
  13. 0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded. 
  14. Need to get 6106B/6106B of archives 
  15. After unpacking 0B of additional disk space will be used. 
  16. Do you want to continue [Y/n]? y 
  17.  
  18. ..... 
  19. Testing if patches apply cleanly... 
  20. out of 5 hunks FAILED -- saving rejects to file /etc/init.d/rcS.rej 
  21. Patches would not apply cleanly. 
  22. dpkg: Fehler beim Bearbeiten von sysv-rc-bootsplash (--configure): 
  23. Subprocess post-installation script returned error code 1 
  24. Fehler traten auf beim Bearbeiten von: 
  25. sysv-rc-bootsplash 
  26. E: Sub-process /usr/bin/dpkg returned an error code (1) 


安装sysv-rc-bootsplash 出错,解决方法:

 
  
  1. # cd /tmp/ 
  2. # mkdir patch 
  3. # wget http://ftp.de.debian.org/debian/pool/main/s/sysvinit/sysv-rc_2.86.ds1-1_all.deb
  4. # dpkg --extract sysv-rc_2.86.ds1-1_all.deb /tmp/patch 
  5.  
  6. # cp /etc/init.d/rc /etc/init.d/rc.orig 
  7. # cp /etc/init.d/rcS /etc/init.d/rcS.orig 
  8. # cp /tmp/patch/etc/init.d/rc /etc/init.d/rc 
  9. # cp /tmp/patch/etc/init.d/rcS /etc/init.d/rcS 
  10. # apt-get install sysv-rc-bootsplash 
  11.  
  12. # dpkg-reconfigure bootsplash 


选择合适的主题。

8.执行 mkinitrd 程序制作一个“清洁”的initrd.img

 
  
  1. mkinitrd -o /boot/initrd.img-2.6.15 2.6.15 


9.设定启动选项:

 
  
  1. debian:~# update-grub 
  2.  
  3. grub: 
  4. debian:~# vim /boot/grub/menu.lst 
  5.  
  6. title Debian GNU/Linux, kernel 2.6.15(silent) 
  7. root (hd0,1) 
  8. kernel /boot/vmlinuz-2.6.15 root=/dev/hdc2 ro vga=791 splash=silent 
  9. initrd /boot/initrd.img-2.6.15 
  10. savedefault 
  11. boot 
  12.  
  13.  
  14. title Debian GNU/Linux, kernel 2.6.15(bootsplash) 
  15. root (hd0,1) 
  16. kernel /boot/vmlinuz-2.6.15 root=/dev/hdc2 ro vga=791 
  17. initrd /boot/initrd.img-2.6.15 
  18. savedefault 
  19. boot 
  20.  
  21. vga=791 是1024*768分辨率 可根据dpkg-reconfigure bootsplash设置自行更改。 
  22. Debian GNU/Linux, kernel 2.6.15 (silent) ,将进入带进度条动画的启动画面 
  23. Debian GNU/Linux, kernel 2.6.15 (bootsplash),将进入是背景加启动文字的启动画面了。 
  24.  
  25.  
  26. lilo:(未测试) 
  27. p_w_picpath=/boot/bzImage-2.6.15 
  28. label=2.6.15 
  29. read-only 
  30. initrd=/boot/initrd.splash 
  31. append="splash=silent" 
  32. vga=791 



官方网站信息:
Now Available for Linux Kernel 2.6.15!
There's a Bootsplash Mailinglist now. Go to the subscription page to join the discussion, get help or just for the latest news.
Verbose Mode - boot messages are shown, as normal.

Silent Mode - boot messages are hidden and, in this example, a gradient filled progress bar is shown as well as TrueType text. Pressing F2 changes to Verbose mode.