1.安裝內核編譯環境:
關心一下有關 kernel-package、gcc、binutils 和 modutils 的錯誤報告。在須要時使用較新的版本。
在 Debian 系統中用源碼編譯自定義內核要特別當心。用 make-kpkg 的 --append_to_version 選項來建立多重內核鏡像比較安全。linux
- # 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.解開內核源碼包,進入源碼包目錄,加上補丁。sql
- #cd linux-2.6.15
- #patch -p1 -i /tmp/bootsplash-3.1.6-2.6.15.diff (假定 bootsplash 的補丁放了在 /tmp 之中)
4.打補丁成功,內核設定文件(.config)vim
- #cp /boot/config-2.6.15 .config
- #make old config
- #make menu config
- Device Drivers ---> Block devices --->
- <*> RAM disk support
- [*] Initial RAM disk (initrd) support
- Device Drivers ---> Graphics support --->
- <*> Support for frame buffer devices
- [*] VESA VGA graphics support
- Device Drivers ---> Graphics support ---> Console display driver support --->
- --- VGA text console
- [*] Video mode selection support
- <*> Framebuffer Console support
- Device Drivers ---> Graphics support ---> Bootsplash configuration --->
- [*] Bootup splash screen
5.編譯內核,而且打包安全
- #make-kpkg --revision 20060717 --initrd binary
上層目錄生成5個 .deb文件 app
- linux-doc-2.6.15_20060616_all.deb
- linux-headers-2.6.15_20060616_i386.deb
- linux-p_w_picpath-2.6.15_20060616_i386.deb
- linux-manual-2.6.15_20060616_all.deb
- linux-source-2.6.15_20060616_all.deb
6.安裝新內核ide
- dpkg -i linux-p_w_picpath-2.6.15_20060616_i386.deb
這個內核已經有bootsplash支持了,不過還須要合適的 initrd.img。
7.安裝bootsplashpost
- #vim /etc/apt/source.lst
- deb http://debian.bootsplash.de unstable main
- deb-src http://debian.bootsplash.de unstable main
- #apt-get update
- #apt-get install bootsplash
- #apt-get install bootsplash-theme-newlinux
- # apt-get install sysv-rc-bootsplash (安裝進度條)
- Reading package lists... Done
- Building dependency tree... Done
- sysv-rc-bootsplash is already the newest version.
- 0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
- Need to get 6106B/6106B of archives
- After unpacking 0B of additional disk space will be used.
- Do you want to continue [Y/n]? y
- .....
- Testing if patches apply cleanly...
- 4 out of 5 hunks FAILED -- saving rejects to file /etc/init.d/rcS.rej
- Patches would not apply cleanly.
- dpkg: Fehler beim Bearbeiten von sysv-rc-bootsplash (--configure):
- Subprocess post-installation script returned error code 1
- Fehler traten auf beim Bearbeiten von:
- sysv-rc-bootsplash
- E: Sub-process /usr/bin/dpkg returned an error code (1)
安裝sysv-rc-bootsplash 出錯,解決方法:測試
- # cd /tmp/
- # mkdir patch
- # wget http://ftp.de.debian.org/debian/pool/main/s/sysvinit/sysv-rc_2.86.ds1-1_all.deb
- # dpkg --extract sysv-rc_2.86.ds1-1_all.deb /tmp/patch
- # cp /etc/init.d/rc /etc/init.d/rc.orig
- # cp /etc/init.d/rcS /etc/init.d/rcS.orig
- # cp /tmp/patch/etc/init.d/rc /etc/init.d/rc
- # cp /tmp/patch/etc/init.d/rcS /etc/init.d/rcS
- # apt-get install sysv-rc-bootsplash
- # dpkg-reconfigure bootsplash
選擇合適的主題。
8.執行 mkinitrd 程序製做一個「清潔」的initrd.img動畫
- mkinitrd -o /boot/initrd.img-2.6.15 2.6.15
9.設定啓動選項:網站
- debian:~# update-grub
- grub:
- debian:~# vim /boot/grub/menu.lst
- title Debian GNU/Linux, kernel 2.6.15(silent)
- root (hd0,1)
- kernel /boot/vmlinuz-2.6.15 root=/dev/hdc2 ro vga=791 splash=silent
- initrd /boot/initrd.img-2.6.15
- savedefault
- boot
- title Debian GNU/Linux, kernel 2.6.15(bootsplash)
- root (hd0,1)
- kernel /boot/vmlinuz-2.6.15 root=/dev/hdc2 ro vga=791
- initrd /boot/initrd.img-2.6.15
- savedefault
- boot
- vga=791 是1024*768分辨率 可根據dpkg-reconfigure bootsplash設置自行更改。
- Debian GNU/Linux, kernel 2.6.15 (silent) ,將進入帶進度條動畫的啓動畫面
- Debian GNU/Linux, kernel 2.6.15 (bootsplash),將進入是背景加啓動文字的啓動畫面了。
- lilo:(未測試)
- p_w_picpath=/boot/bzImage-2.6.15
- label=2.6.15
- read-only
- initrd=/boot/initrd.splash
- append="splash=silent"
- 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.