|
来自"Linux Wiki" http://www.linux-wiki.cn/index.php/%E5%9C%A8Debian%E4%B8%AD%E5%90%AF%E7%94%A8Bootsplash Debian的启动界面和终端实在有些难看,本文介绍使用bootsplash美化启动界面。
由于bootsplash需要给内核打补丁,并重新编译内核,所以可能消耗不少时间,不过需要人工操作的东西不多,也不需要了解关于编译内核的知识。相反,如果你以前没有编译过内核,通过设置bootsplash,你会对编译内核的操作过程有所了解。
启动后终端截图目录 [显示] 1 准备内核补丁 2 编译内核 3 安装软件 4 配置Grub、享受BootSplash 5 更换Splash 6 参考资料
[编辑] 准备内核补丁 尽管Debian提供了内核补丁,但版本似乎和当前内核版本不匹配。所以推荐从官方网站下载与内核版本相应的补丁。
先获取当前内核版本。在终端下执行:
uname -r 得到的结果即内核的版本,如: 2.6.21-686 ,这里2.6.21就是版本号。
接着到 ftp://ftp.bootsplash.org/pub/bootsplash/kernel/ 下载相应版本的内核补丁。并存在 /usr/src/。本文假设下载到的文件是:bootsplash-3.1.6-2.6.21.diff.gz。
如果下载到的是压缩过的(文件名以.gz结尾),先解压:
gunzip bootsplash-3.1.6-2.6.21.diff.gz [编辑] 编译内核 本节将指导您以Debian的方式,用简单的方法编译内核。如果要了解Debian编译内核的更多说明,请参考在Debian中编译内核。先安装内核源码和必要的软件:
apt-get install debhelper modutils kernel-package libncurses5-dev apt-get install linux-source-2.6.21 # 请修改为您的内核版本 apt-get install fakeroot 解压源码并应用补丁:以下均假设内核版本为2.6.21,如不是请注意修改。
cd /usr/src # 创建目录 tar -xjvf linux-source-2.6.21.tar.bz2 cd linux-source-2.6.21 patch -p1 < ../bootsplash-3.1.6-2.6.21.diff 复制当前内核的配置文件,并进行必要的配置:
cp /boot/config-2.6.12-1-686 .config make menuconfig 如果你只想在默认配置上做少数的改动,通过只需要把Device Drivers->Graphics support->Bootsplash configuration->Bootup splash screen选中即可。如果您要自己配置内核,注意以下选项:
Code maturity level options ---> [*] Prompt for development and/or incomplete code/drivers Processor type and features ---> [*] MTRR (Memory Type Range Register) support Device Drivers ---> Block devices ---> <*> Loopback device support <*> RAM disk support (8192) Default RAM disk size Graphics support ---> [*] Support for frame buffer devices [*] VESA VGA graphics support Console display driver support ---> --- Video mode selection support <*> Framebuffer Console support Logo configuration ---> [ ] Bootup logo(注意,这项是不要选) Bootsplash configuration ---> [*] Bootup splash screen 使用Debian的方式编译内核,可能需要近一个小时的时间,你可以干点别的:
make-kpkg clean # 必须执行这步 fakeroot make-kpkg --initrd --revision=2.6.21 --stem linux kernel_image modules_image 安装内核:
cd /usr/src dpkg -i *.deb [编辑] 安装软件 直接:
apt-get install bootsplash bootsplash-theme-debian Debian Sid版本有sysv-rc-bootsplash,用来控制进度条的:
sysv-rc-bootsplash Debian Testing和Stable在我写这个How-to时还没有sysv-rc-bootsplash,可以到bootsplash.org去下载:
ftp://ftp.bootsplash.org/pub/bootsplash/init-scripts/rc-debian-etch.txt 用它覆盖 /etc/init.d/rc即可,为安全考虑,请先备份。
[编辑] 配置Grub、享受BootSplash 在/boot/grub/menu.lst中找到与下面类似的部分,并将/boot/vmlinuz-2.6.21-686和/boot/initrd.img-2.6.21-686更换成新内核的名字(可以ls -l看一下日期,哪个是新的)。并添加参数vga=791(表示1024x768的分辨率),splash=silent(表示不显示详细信息,也可以取0,即不显示splash,或取值verbose,即显示详细的信息)。
title Debian GNU/Linux, kernel 2.6.21-686 root (hd0,8) kernel /boot/vmlinuz-2.6.21-686 root=/dev/hda9 ro vga=791 splash=silent initrd /boot/initrd.img-2.6.21-686 重新启动,并在Grub中选则新加的这一项,应该就可以看到BootSplash了(如果看不到,后面的几个终端美化也应已成功,而BootSplash在按照下面更换Splash的办法操作之后,仍可以被启用)。
[编辑] 更换Splash 由于Debian的内核建立时使用了压缩,和其它的不太一样,导致更换BootSplash稍有麻烦。
Template:更换Debian的Bootsplash
--Chenxing 23:35 2007年7月9日 (CST)
|
一共有 0 条评论