使用 bootsplash 配置內核支持圖形化啟動界面。網站http://www.bootsplash.org/有詳細介紹。為了支持圖形化啟動界面,我們需為內核打補丁。到http://www.bootsplash.de/files/下載與內核對應的補丁文件bootsplash-3.1.6-2.6.8.diff。
$ cd ~/ $ mkdir bootsplash $ cd bootsplash $ wget http://www.bootsplash.de/files/bootsplash-3.1.6-2.6.8.diff $ sudo cp bootsplash-3.1.6-2.6.8.diff /usr/src $ cd /usr/src/linux $ sudo patch –p1 < ../bootsplash-3.1.6-2.6.8.diff
接著配置內核,選中以下選項,以下所有選項不能以內核模塊形式編譯,都要直接編譯進內核:
Device Drivers ---> Block devices ---> <*> RAM disk support (4096) Default RAM disk size (kbytes) (NEW) [*] Initial RAM disk (initrd) support Graphics support ---> <*> VGA 16-color graphics support [*] VESA VGA graphics support Console display driver support ---> <*> Framebuffer Console support Logo configuration ---> [ ] Bootup logo #該選項一定不要選中 Bootsplash configuration ---> #該選項在打了內核補丁後才會出現。 [*] Bootup splash Screen File systems ---> Miscellaneous filesystems ---> <*> Compressed ROM file system support
配置內核後要重新編譯內核
$ sudo make $ sudo cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-bootsplash l 用apt安裝bootsplash
接下來要安裝bootsplash工具。把下面這句加到/etc/apt/source.list裡。
deb http://www.bootsplash.de/files/debian/ unstable main $ sudo apt-get update $ sudo apt-get install bootsplash $ sudo apt-get install sysv-rc-bootsplash #該軟件包啟用進度條和動畫
在配置bootsplash時會問你是否安裝一個新的bootsplash主題替換已存在的主題。如果是第一次安裝,請選擇none,這樣將會自動生成一個/boot/initrd.splash映像,並設置一個默認的newlinux主題。
安裝sysv-rc-bootsplash時,會詢問是否patch系統啟動腳本,一定要選“Yes”,否則進度條等動畫不會起作用。
l 從源碼安裝bootsplash $ sudo apt-get install libmng-dev #需要安裝mng庫 $ cd ~/bootsplash $ wget http://www.bootsplash.de/files/splashutils/bootsplash-3.1.tar.bz2 $ tar zxvf bootsplash-3.1.tar.bz2 $ cd bootsplash-3.1 $ make
修改bootloader,舉例如下
$ sudo vim /boot/grub/menu.lst title Debian GNU/Linux, kernel 2.6.8.1-epia1-bootsplash root (hd0,0) kernel /boot/bzImage-bootsplash root=/dev/hdc1 ro splash=silent vga=0x317 initrd /boot/initrd.splash savedefault boot
重啟進入新內核,可看到開機畫面。關機時也可看到關機畫面。