您的位置:首页 > 其它

Debian 2.6.15 内核 安装bootsplash

2011-03-04 15:33 337 查看
1.安装内核编译环境:

关心一下有关 kernel-package、gcc、binutils 和 modutils 的错误报告。在需要时使用较新的版本。

在 Debian 系统中用源码编译自定义内核要特别小心。用 make-kpkg 的 --append_to_version 选项来创建多重内核镜像比较安全。

# 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.解开内核源码包,进入源码包目录,加上补丁。

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


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

#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文件

linux-doc-2.6.15_20060616_all.deb
linux-headers-2.6.15_20060616_i386.deb
linux-image-2.6.15_20060616_i386.deb
linux-manual-2.6.15_20060616_all.deb
linux-source-2.6.15_20060616_all.deb


6.安装新内核

dpkg -i linux-image-2.6.15_20060616_i386.deb


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

7.安装bootsplash

#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:(未测试)
image=/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.
本文出自 “开发随笔” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: