2010年4月19日星期一

给 debian 安装 BootSplash - Linux,Linux,Misc,andot,

给 debian 安装 BootSplash - Linux,Linux,Misc,andot,: "给 debian 安装 BootSplash

本文由 andot 于 2005-10-10 20:00:47 提交. Linux
有一些发行版带有 BootSplash,也就是启动画面,有的是进度条的,有的是漂亮的背景加启动文字的。总之是很漂亮了。可惜 debian 默认安装完以后是不带这个东西的。不过我们可以自己安装这个东西,从网上看了一些这方面的介绍,大部分是都是介绍 Gentoo 和 RedHat 的,安装起来都很麻烦,debian 安装这个东西比起那些发行版来说,可以算是简单多了,下面就来看看怎样安装 BootSplash 吧。 首先在你的 apt 源里加上这两行: deb http://debian.bootsplash.de unstable main deb-src http://debian.bootsplash.de unstable main 然后用 apt-get update 更新一下软件列表。 接下来,先安装 bootsplash 的内核补丁 apt-get install kernel-patch-bootsplash 然后重新编译内核: apt-get install debhelper modutils kernel-package libncurses5-dev apt-get install linux-source-2.6.12 apt-get install fakeroot vi /etc/kernel-pkg.conf # 输入我的名字和邮件地址 cd /usr/src # 创建目录 tar -xjvf linux-source-2.6.12.tar.bz2 cd linux-source-2.6.12 # 如果这是你的内核源码 ../kernel-patches/all/apply/bootsplash # 给内核打补丁 cp /boot/config-2.6.12-1-686 .config # 将当前配置设定为默认配置 make menuconfig # 按自己的喜好来定制 make-kpkg clean # 必须执行这步 fakeroot make-kpkg --append_to_version -686 --initrd --revision=2.6.12-10 --stem linux kernel_image modules_image cd .. dpkg -i *.deb 注意:在上面定制内核选项时,要选择下列项目: 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 (4096) Default RAM disk size [*] Initial RAM disk (initrd) support Graphics support ---> [*] Support for frame buffer devices [*] VESA VGA graphics support Console display driver support ---> [*] Video mode selection support <*> Framebuffer Console support Bootsplash configuration ---> [*] Bootup splash screen 新内核编译并安装以后,就已经支持 BootSplash,下面就可以安装 BootSplash 的包和主题: apt-get install bootsplash bootsplash-theme-debian sysv-rc-bootsplash 注意:安装 sysv-rc-bootsplash 包时,要确定你的 sysv-rc 的包 2.86.ds1-1(stable) 版本的,如果是 testing 版本安装可能会失败。 配置 bootsplash 时,他会让你选择 initrd 的位置,你就选择你刚刚编译并安装好的那个 /boot/initrd.img-2.6.12-686 就可以了。 然后是配置 grub: title Debian GNU/Linux, kernel 2.6.12-686 (silent) root (hd0,0) kernel /boot/vmlinuz-2.6.12-686 root=/dev/hda1 ro vga=791 splash=silent initrd /boot/initrd.img-2.6.12-686 savedefault boot title Debian GNU/Linux, kernel 2.6.12-686 (bootsplash) root (hd0,0) kernel /boot/vmlinuz-2.6.12-686 root=/dev/hda1 ro vga=791 initrd /boot/initrd.img-2.6.12-686 savedefault boot title Debian GNU/Linux, kernel 2.6.12-686 (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.12-686 root=/dev/hda1 ro single initrd /boot/initrd.img-2.6.12-686.orig savedefault boot 好了,现在选择第一项 Debian GNU/Linux, kernel 2.6.12-686 (silent) ,将进入带进度条动画的启动画面,选第二项 Debian GNU/Linux, kernel 2.6.12-686 (bootsplash),将进入是漂亮的背景加启动文字的启动画面了。 安装不困难,只不过编译内核可能花的时间比较长一些,我编译内核花了 1 个多小时。呵呵。 下面是我编译好的内核(奔4超线程处理器版本)以及相关的 NVidia (显卡)模块和 pwc (摄像头)模块:

linux-image-2.6.12-p4_2.6.12-10_i386.deb nvidia-kernel-2.6.12-p4_1.0.7174-4+2.6.12-10_i386.deb pwc-modules-2.6.12-p4_10.0.7a-5+2.6.12-10_i386.deb

如果你的显卡支持特定的 framebuffer 驱动,你也可以不使用 vesafb,例如我的是 sis 显卡,所以我用的 sisfb,如果要使用 sisfb,那在编译内核是要把 sisfb 编译到内核里去,而不要编译成模块。 之后在加载内核时,用下面的方式来加载 sisfb: title Debian GNU/Linux, kernel 2.6.12-686 (silent) root (hd0,0) kernel /boot/vmlinuz-2.6.12-686 root=/dev/hda1 ro video=sisfb:mode:1024x768x16,rate:85,mem:32768 splash=silent initrd /boot/initrd.img-2.6.12-686 savedefault boot 这样就可以将 framebuffer 下的控制台改成 85Hz 的高刷新率了。 下面是我编译好的带有 sisfb 的内核(奔4超线程处理器版本)以及 pwc (摄像头)模块:

linux-image-2.6.12-sisfb-p4_2.6.12-10_i386.deb pwc-modules-2.6.12-sisfb-p4_10.0.9-1+2.6.12-10_i386.deb

因为启动的时候我无法截图,所以下面是用 qemu 在 Linux 里再次启动我的系统抓的图: grub-splash bootsplash silent-boot silent-shutdown 本文参考:

bootsplash.de - a bootsplash fan site ;) RedHat Linux9下用bootsplash制作全图形启动界面"

Booting ‘Debian Lenny’ into widescreen framebuffer « codehunk

Booting ‘Debian Lenny’ into widescreen framebuffer « codehunk

Yeban's Weblog: Debian Console, Framebuffer, Grub2

Yeban's Weblog: Debian Console, Framebuffer, Grub2: "Debian Console, Framebuffer, Grub2
After a fresh install of Debian the boot up screen looks really ugly. Here are few things you can do to beautify it up. These apply if you use Grub2.

First step is to enable framebuffer. Passing the 'vga=' option to the kernel has been deprecated. To enable framebuffer, open the file /etc/default/grub and change the value of GRUB_GFXMODE variable to the resolution you want. For example:

GRUB_GFXMODE=1280x800

Now open the file /etc/grub.d/00_header and find the lines:

if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=${GRUB_GFXMODE}
insmod gfxterm

Between the second and the third line (of the above snippet) add:

set gfxpayload=keep

so that it finallly looks like this

if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep
insmod gfxterm

Now run, update-grub as root. Do remember to change the default wallpaper with another of the resolution you specified above.

Coming to the fonts part. You need to install the console-setup package in order to be able to customize the console. If you already have it installed run dpkg-reconfigure console-setup as root. You will be presented with terminal based dialogs to chose from various configuration options for the console. On the third screen is the option to choose the font. For me the option 'Do not change the boot/kernel font' works(read, looks) the best. Choose the options that is best for you."

Framebuffer unter Debian GNU/Linux 5.0 "Lenny" Howto — Asconix Systems

Framebuffer unter Debian GNU/Linux 5.0 "Lenny" Howto — Asconix Systems: "Möchte man ab und an auf der Konsole seines Rechners arbeiten, sollte man auf jeden Fall den Framebuffer in dieser aktivieren. Erst die Verwendung des Framebuffers ermöglicht uns, eine angemessene Auflösung in der virtuellen Konsole nutzen zu können.

Um die Auflösung zu konfigurieren, fügen wir die entsprechenden Optionen als Kerneloptionen dem zu ladenden Kernel in der Konfigurationsdatei /etc/boot/grub/menu.lst an. Dazu ersetzen wir in unserem Fall in folgende Zeile der GRUB-Konfigurationsdatei /boot/grub/menu.lst:

kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro quiet splash

durch:

kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 vga=795 splash=silent ro quiet

Die folgenden Werte müssen der vga-Option übergeben werden, um die entsprechende Auflösung des Framebuffers zu aktivieren:

640x480 800x600 1024x768 1280x1024 1600x1200
8 bits vga=769 vga=771 vga=773 vga=775 vga=796
16 bits vga=785 vga=788 vga=791 vga=794 vga=798
32 bits vga=786 vga=789 vga=792 vga=795 vga=799

Anmerkung: soll der Anwender nach der Aulösung während des Bootvorgangs gefragt werden, verwenden wir die Option vga=ask.

Hinweis: Unter Umständen ist die Darstellung bspw. beim Scrollen auf dem Frambuffer extrem langsam. In solchen Fällen sollte ein Framebuffer-Modus ausgewählt werden, der mit lediglich 16 Farben arbeitet (s. obige Tabelle)."