HOWTO gensplash

出自Gentoo Linux Wiki

跳转到: 导航, 搜索
这篇文章属于 HOWTO 系列的一部分。
安装方法 架构/平台 内核 & 硬件 Portage 系统相关 网络 & 服务器 X服务器 软件 游戏 非x86平台

目录

[编辑] 介绍

首先让我们听听来自 Gentoo 开发者对开发中的 gensplash (fbsplash 和 splashutils) 还有 vesafb-tng 的喝彩 Spock

[编辑] gensplash、fbsplash 是什么?

[编辑] Gensplash

Gensplash 是由 Spock 启动的一个项目,致力于丰富 Gentoo 启动时的效果,比如显示一些文字信息,动画以及进度条等等。有很多东西被称做 *splash (bootsplash, gensplash, fbsplash 以及 splashutils) ,想知道他们之间有哪些联系,可以看 Spock Gensplash 网站 上的 FAQ

[编辑] Fbsplash

Fbsplash 是 gensplash 计划的一部分。根据 fbsplash 的文档所述,“帧缓冲 splash 是内核的一个特性,它允许你在指定的控制台区域显示背景图片,还可以切换到第一个控制台以显示启动/重启/关闭系统的消息。”fbsplash 设备是通过/dev/fbsplash设备节点被访问的。fbsplash的正常工作需要一个帧缓冲设备。

[编辑] 什么是帧缓冲设备(Frame Buffer Device)?

帧缓冲设备(Frame Buffer Device)提供图形硬件的抽象。它表示某些视频硬件的帧缓冲并且允许应用程序通过一个定义完善的接口来访问图形硬件设备。这一点非常有用,因为软件并不需要了解低层的硬件。通过特别的设备结点可以连接到确定的设备,通常这些结点位于 /dev 目录, 以及, {{Filename|/dev/fb*} 目录}。

帧缓冲设备有许多类型:

  1. Generic Frame Buffer Devices
    • vesafb (vesa frame buffer)
    • vesafb-tng (vesa frame buffer - the next generation)
  2. Graphic Card Specific Devices
    • rivafb (old Nvidia Chipset)
    • nVidiafb (newer nVidia Chipsets)
    • radeonfb (ATI Chipset)

fbsplash可以在以上的任何帧缓冲设备下工作,也支持其它提供8/15/16/24/32bpp 真彩色/增强色模式的帧缓冲设备。

安装

在下面的例子中使用了“vesafb-tng”帧缓冲设备。如果有问题,比如你的启动屏幕无法显示,请使用“vesafb”替代“vesafb-tng”。

注意: 确保你的内核源代码包含 fbsplash 的补丁。“gentoo-sources” 默认已经包含了它。


警告: 根据 Spock 所说的,在 gentoo-sources-2.6.15-r1 内核版本中有一个 fbsplash 的 bug。你应当升级到较新版本。

Bugzilla 中的有关项可以在这里找到 [1]

[编辑] 配置并编译内核

In summary, this is what we are going to do.

  1. Emerge splashutils.
  2. Emerge splash-themes-gentoo & splash-themes-livecd, if you want some themes.
  3. 确保 /usr/src/linux 指向 gentoo-sources。
  4. 用 genkernel 或者手动方法配置内核。


提示! 一些用户在配置内核之前就安装splashutils,可能会出现一些问题。在这种情况下,在完成配置内核后直接 emerge splashutils 就可以了。


代码: Emerging splashutils & themes
# emerge -va splashutils splash-themes-gentoo splash-themes-livecd


注意: 在使用 2.6.16 版本的内核时,一些用户可能会在 emerge splashutils 时遇到 input.h文件有关的错误。这是一个内核头文件的已知问题。You can try to fix it manually by moving the line "#ifdef __KERNEL__" from somewhere (about line 839) right above the In-kernel definitions to a position before the declaration of struct input_device_id (about line 799) in the file usr/src/linux/include/linux/input.h from the kernel source tree. (Credit: http://www.helpfeeds.com/showthread.php?p=1139679)


[编辑] Genkernel 用户

代码: Genkernel: 配置 genkernel
# genkernel --menuconfig kernel

当 Genkernel 完成后, 直接跳到 Configuring Your Bootloader.

[编辑] 非 genkernel 用户

See HOWTO Compile a Kernel Manually and configure your kernel as per the requirements section of this document. (You can skip that step if you already configured a framebuffer driver besides vesa-tng.)

配置完内核后,现在你必须编译它。详见 HOWTO Compile a Kernel Manually.

[编辑] 必须的内核选项

Linux Kernel Configuration: 2.6 - Required for Non-genkernel & Genkernel users alike
Device Drivers > Graphics support:
 [*] Support for frame buffer devices
 <*>   VESA VGA graphics support
         VESA driver type (vesafb-tng)  --->
           (HRESxVRES@FREQ) VESA default mode 
                # Pick your resolution@freq
                # Ex: (1024x768@72) 
Device Drivers > Graphics support > Console display driver support:
 [*] Video mode selection support
 <*> Framebuffer Console support
Device Drivers > Graphics support:
 [*] Support for the framebuffer splash

Linux Kernel Configuration: If you want to load the initramfs image dynamically at boot -- you probably do -- enable RAM disk support as well.

(Genkernel users must select this option.)

Device Drivers > Block devices:
 <*> RAM disk support
 (4096) Default RAM disk size (kbytes) (NEW)
 [*]   Initial RAM disk (initrd) support

Linux Kernel Configuration: If any of these options don't show up, make sure you didn't select tileblitting support.
Device Drivers > Graphics support:
 [ ] Enable Tile Blitting Support

Linux Kernel Configuration: If you want to get the F2 key working to switch to verbose and silent, you need the option CONFIG_INPUT_EVDEV =y set. It is under
 Device Drivers > Input Device Support
   [*]Event Interface
注意: Some Framebuffer Devices are under Device Drivers > Character Devices (Intelfb is one of them)

[编辑] 制作initramfs镜像

如果您需要让splash的背景在启动开始就出现的话,您需要用到initramfs。否则请直接跳往 Configuring Your Bootloader.

Initramfs (initial ramfs) is a chunk of code that unpacks the compressed cpio image midway through the kernel boot process. The files contained within that image are then used to populate the root filesystem. Initramfs is a part of a bigger concept called 'early-userspace', says (Spock).

[编辑] Genkernel

由于genkernel必须一个initrd镜像,而且"将initramfs的数据添加到initrd镜像"[2]是不可能的, 我们并不能利用initramfs镜像达到目的。作为代替方案,我们可以为gensplash标记一个特定的genkernel initrd镜像。这一过程非常的简单而且在当前系统下耗时不会超过一分钟。

代码: Genkernel - making initrd image with gensplash
# genkernel --gensplash=themename initrd

themename替换为/etc/splash下某选中的主题的名字。

[编辑] 非 genkernel

您有两种选择,我们推荐第一个选择。

  1. 启动时加载initramfs(建议)
  2. compiling the initramfs image directly into the kernel

[编辑] 启动时加载initramfs(建议)

如果您选择了此过程,您已经创建了一个initramfs镜像(一个单独的文件),它就是我们熟悉的initrd文件。所以,您不需要在每次更换镜像文件的时候再重新编译一次内核了。

现在您唯一需要作的事就是用splash_geninitramfs命令建立一个initrd文件(它包含pictures,configs以及userspace helper):

代码:
# cd /etc/splash/
# splash_geninitramfs emergence -r 1024x768 -g /boot/fbsplash-emergence-1024x768 -v

Change the resolution and theme to match your monitor's resolution and chosen theme.

注意: To help explain what's going on here for those who don't know, the first command we gave "emergence" simply tells it which theme to use, the next command "-r 1024x768" is our desired resolution, then "-g /boot/fbsplash-emergence-1024x768" tells it where to generate the new initramfs file, and finally -v simply tells it to be verbose in it's output so we can see what it's working on ;-)

警告: Before you rag your brains out, you must delete the symbolic link 'default' in the /etc/splash directory. Otherwise no images will show. (Gentoo-2.6.11-r9). You can also change the link to point to the theme you're using instead of deleting the link if you wish.

[编辑] 另一种方法:直接将initramfs编译进核心

首先,删除已有的initramfs映像: rm -iv /usr/src/linux/usr/initramfs_data.cpio.gz

然后,你要创建一个新的包含图像、配置和userspace helper(调整示例中的分辨率和主题——emergence——以适合你的需求)的initramfs映像。

代码:
splash_geninitramfs -g /usr/src/linux/usr/initramfs_data.cpio.gz -v -r 1024x768 emergence

必须要touch一下initramfs映像,确保它会被编译进你的新核心中:touch /usr/src/linux/usr/initramfs_data.cpio.gz. 然后参考 recompile your kernel.

[编辑] View contents of initramfs

The initramfs should contain the splash theme files. To verify that it contains the theme that you chose you may use this command:

代码:
# zcat /boot/fbsplash-emergence-1024x768 | cpio --list

[编辑] 选择一个主题

如果您需要在不重新启动的情况下查看主题您可以用splash_manager命令:

代码:
# splash_manager --theme=emergence --cmd=set --tty=1

该命令会把tty1的主题设为emergence。您可以在当前设置下选择/etc/splash目录下的任何主题。现在您可以通过按组合键Ctrl+Alt+F1进入tty1查看主题。

[编辑] 获取更多主题

The media-gfx/bootsplash-themes package has quite a lot of themes.:

# emerge bootsplash-themes

这将把主题安装到 /etc/bootsplash。 However, the curent version of bootsplash-themes converts the themes automatically to splashutils compatible themes and moves them to /etc/splash/ as well, so there is no need to convert.

[编辑] 将 Bootsplash 转换为 Gensplash 主题

注意: The most recent version of Bootsplash will automatically convert the themes to Gensplash. Upon emerging Bootsplash, you should see the following:
  • The themes have been automatically converted to a format recognized by splashutils. Note that the conversion process is purely automatical and therefore 'dumb'. Some themes might not work, or work incorrectly. If you happen to find a theme that you like, but which doesn't work after it has been automatically converted to the new format, please fix it manually and submit for inclusion into a generic splashutils theme package by posting it on bugzilla (http://bugs.gentoo.org/) or sending it directly to the maintainer of this package.

However, if you find a bootsplash theme you want to use with gensplash, you can use bootsplash2fbsplash (thanks to Spock, splashutils includes this), which makes the conversion from bootsplash to gensplash format easy. For example, if there is a bootsplash theme named gentoo-highquality located in /etc/bootsplash, with this the utility creates a gensplash-compatible theme in /etc/splash/gentoo-highquality including all the required files.

代码: Convert bootsplash themes to gensplash
 # bootsplash2fbsplash gentoo-highquality

If you want to quickly convert all installed themes:

代码: Convert all bootsplash themes to gensplash
 # for i in $(ls -1 /etc/bootsplash); do bootsplash2fbsplash $i; done

[编辑] 修正错误的图像大小

Image size mismatch: /etc/splash/Matrix/images/verbose-1280x1024.jpg.
Failed to load image /etc/splash/Matrix/images/verbose-1280x1024.jpg.

如果一些图像因为分辨率不正确而不能加载,也许你需要使用下面的脚本 (需要 ImageMagick):

代码: 将所有图像缩放到指定大小
#!/bin/sh
EXTRACTSCALE="s/^[^0-9]*\([0-9]\+x[0-9]\+\).*/\\1/"
for i in `ls -1 /etc/splash/`
do
        cd /etc/splash/$i/images 2> /dev/null || continue # ignore files
        pwd
        for j in `ls -1 *.jpg`
        do
                claims=`echo $j |sed $EXTRACTSCALE`
                if [[ `identify $j |sed "s/.*JPEG//" |sed $EXTRACTSCALE` != $claims ]]
                then
                        cp $j $j.orig
                        convert $j.orig -resize $claims\! $j
                fi
        done
done

(this happened with bootsplash-0.6.1-r7 and splashutils-1.1.9.8; please tell me if this happens somewhere else as well!)

[编辑] 设置你的启动引导程序

[编辑] 内核选项

You first need an option which specifies the frame buffer device. In the following example, we specify that we would like to use vesafb-tng with ywrap and mtrr support at a resolution of 1024x768, 16bpp color and a refresh rate of 85Hz:

video=vesafb:ywrap,mtrr,1024x768-16@85

Note that for kernel versions from 2.6.13 onwards you *must* specify the mtrr mode: eg "mtrr:2".

Or, if you are using vesa (not vesa-tng), use instead (for 1024x768-24):

vga=792
注意: If you are not able to specify your resolution and depth in the kernel configuration check out Bootsplash:Grubsplash Howto for the grub configuration part. Skip emerge bootsplash and similar stuff. Just scroll down to the grub configuration.

Fbsplash requires its own option which allows you to specify which theme should be used. In this case, the default theme is emergence. The other option can be set to verbose or silent. If silent is set, it will hide all the bootup information. Otherwise, you will be shown all the bootup information on system startup. Both these values have to be set.

splash=verbose,theme:emergence

If you want to increase the scrollback buffer (the default is 32K) you should also add an option such as:

fbcon=scrollback:128K

It seems you cannot put a value greater then 128K.

If you decided to use an initrd file you will need to place an additional option in the boot loader config:

initrd /boot/fbsplash-emergence-1024x768     # Grub
initrd = /boot/fbsplash-emergence-1024x768   # Lilo

In the above example, it is assumed that the name of the initrd file is fbsplash-emergence-1024x768 (and it resides in the /boot partition or directory).

You will probably want to pick a theme matching the version of your system, emergence says "2004.0"

Below are examples for both Grub and Lilo config files. It is assumed that the custom theme 'newtheme', a resolution of 1280x1024, 32bpp and a refresh rate of 70Hz are used. The specified fbsplash mode is 'silent' and an initrd file is used (hence the additional 'initrd' line).

Also note that for both GRUB and LILO, CONSOLE=/dev/tty1 must be added for silent mode to operate.

警告: The newest fbsplash patch requires an additional kernel boot option, in case when you want to use a silent boot image. Simply write a "quiet" in the kernel boot line of your grub.conf. Otherwise, the kernel will overwrite the bootsplash image with its output.


To see full documentation of the kernel parameters specific to splash you need to look in kernel_parameters.gz which should be included in splashutils. You should be able to see it by typing (this assumes that you have emerged splashutils):

代码:
# zcat -c /usr/share/doc/splashutils*/kernel_parameters.gz | more

[编辑] 一个 GRUB 的例子

文件: grub.conf
title  Gentoo
root (hd0,0)
kernel /kernel-2.6.11-r11 root=/dev/hdb3 video=vesafb:1280x1024-32@80,mtrr,ywrap splash=silent,fadein,theme:emergence quiet CONSOLE=/dev/tty1
initrd (hd0,0)/boot/fbsplash-newtheme-1280x1024
#Try 16 bit colour e.g. video=vesafb:ywrap,mtrr,1280x1024-16@70
#if you get errors returning to verbose mode on different themes

Genkernel users should use something like this for the kernel line and the initrd line for the regular kernel:

kernel (hd0,0)/boot/kernel-2.6.9-gentoo-r13 root=/dev/ram0 init=/linuxrc real_root=/dev/hda1 quiet splash=verbose,theme:emergence video=vesafb:ywrap,mtrr,1024x768-32@70 CONSOLE=/dev/tty1
initrd (hd0,0)/boot/initrd-2.6.9-gentoo-r13

Replace (hd0,0) with your boot partition. If there is no separate boot partition, use the root partition number and prepend /boot to the kernel and initrd paths. Please note that you must specify either silent or verbose in the splash parameter, or splash will not load at all, i.e. "splash=theme:emergence" will not work.

[编辑] 一个 LILO 的例子

文件: lilo.conf
image=/boot/kernel-2.6.8-gentoo-r1
label = "Gentoo"
root = /dev/hda3
append="video=vesafb:1280x1024-32@80,mtrr,ywrap splash=silent,fadein,theme:emergence quiet CONSOLE=/dev/tty1"

read-only
initrd = /boot/fbsplash-newtheme-1280x1024

Do not forget to run lilo after you have adjusted the lilo.conf file:

# mount /boot/
# lilo -v

After all this work and a reboot you should have a graphical boot.

[编辑] 将背景添加到所有终端

If you want all consoles to have a splash screen then type the following command:

# rc-update add splash default
注意: This option will load the splash page near the end of the boot process. To use the bootsplash immediately, add splash to load on BOOT
# rc-update add splash boot
警告: As the splash script requires 'local' to be run first, adding splash to runlevel BOOT will force local to execute earlier, which may cause some problems, eg. when you are using some web services in local (eg. ntp)

[编辑] 其它发行版上的 Gensplash

Gensplash 也能在其它发行版上运行。你可以在Spock 的主页上找到在其它发行版(Debian, Fedora and ArchLinux)上使用 Gensplash 的指南。

[编辑] Troubleshooting

[编辑] Users With /usr on a Separate Partition

If you are using splashutils version 0.9-pre08 or later and have /usr on a separate partition, gensplash should work out of the box (without any modifications). If you, however, use an older version of splashutils and, for some bizarre reason, stubbornly refuse to update it, please use the instructions below.

The program and libraries that splash_util needs to run fbset and display your splash image are kept in /usr/bin and /usr/lib. So if you have these on separate partitions from / (such as a RAID or LVM2 partition), they may not be available (mounted) at the time splash_utils needs them (when using the older version of splashutils), and you won't see your beautiful splash.

The solution? Copy them to somewhere that they are available, as follows (with thanks to aslocum and the Gentoo forums Gensplash-How-to with progressbar!!!!! thread):

# cp -p /usr/bin/fbset /sbin
# cp -p /usr/lib/libjpeg.so.62 /lib
# cp -p /usr/lib/libpng.so.3 /lib

edit the /sbin/splash file, and make line 31 read:

res=`/sbin/fbset | grep "^mode" | sed -r 's/mode "([0-9]+x[0-9]+).*/\1/'`

The only difference in this line is to add /sbin/ before fbset. Save and exit, and your splash should display properly.

[编辑] x86_64 / IA64

The 'vesafb-tng' patch will not work on 64-bit systems (x86_64 and ia64), because the vm86 mode is not supported for OSes running in 64-bit mode. If you happen to own a 64-bit box, you're limited to plain vesafb

Because vesafb-tng doesn't work on 64 bit systems, you must use vesa on these arches.

[编辑] Intel i810

Some people have had a lot of problems with vesa-tng working with an i810 integrated graphics controller. If you're having this problem, try the following kernel config instead:

Linux Kernel Configuration: Intel i810
Device Drivers > Graphics support:
 [*] Support for frame buffer devices
 < >   VESA VGA graphics support
 <*> Intel 810/815 support (EXPERIMENTAL)

文件: grub.conf
video=i810fb:vram:4,xres:1024,yres:768,bpp:16,hsync1:30,hsync2:55,vsync1:50,vsync2:85,accel

Change your vram and sync settings as needed to support your adapter and/or monitor (to find your monitor sync rates use the ddcxinfo-knoppix program in portage). These are fairly conservative and should work with most setups. Hopefully this helps.

Starting with kernel 2.6.11-gentoo-r9, the i810 chipset no longer supports the Intel 810/815 frame buffer device. I had to use the vga16 frame buffer. Do not enable the VESA or i810 frame buffer options. The Direct Rendering Manager and the agpgart will not be built correctly if you do. In the kernel config choose:

Linux Kernel Configuration: Intel i810 on 2.6.11-gentoo-r9?
Device Drivers > Graphics support:
 [*] Support for frame buffer devices
 [*]   Enable Video Mode Handling Helpers
 <*>   VGA 16-color graphics support
 < >   VESA VGA graphics support
 < > Intel 810/815 support (EXPERIMENTAL)

[编辑] ATI Radeon

Using radeonfb works just fine (tested with Radeon M9 and 9800PRO). Simply compile the kernel as shown below :

Linux Kernel Configuration: ATI Radeon
Device Drivers > Graphics support:
 [*] Support for frame buffer devices
 <*>   ATI Radeon display support
make && make modules modules_install install

Also add this to your bootloader kernel args

video=radeonfb

The kernel will now use the default resolution and bit depth for your graphic card. Alternatively, you may choose a specific resolution/mode something like this:

video=radeonfb:1024x768
video=radeonfb:1400x1050-32@60

Setting 32bit explicitly may be helpful if the theme colors are distorted due to a 24bit default.

[编辑] ATI Radeon X800

I did not manage to get vesafb-tng working with this card. Always got vesafb: mode switch failed (eax: 0xXXXX)

I switched to standard vesafb and finally it worked with follwing boot options:

文件: /boot/grub/grub.conf
title=Gentoo Linux 2.6.12-r9
root (hd1,0)
kernel (hd1,0)/kernel-2.6.12-r9 root=/dev/hdb3 video=vesafb:ywrap,mtrr vga=791 splash=silent,fadein,theme:livecd-2005.1 quiet CONSOLE=/dev/tty1
initrd (hd1,0)/fbsplash-livecd-1024x768

Replacing vesafb with radeonfb works with the above options on an ATI X800 XL when radeonfb is compiled into the kernel. The vga=791 argument is required to make it work with radeonfb.

IMPORTANT KERNEL OPTIONS:

 INPUT_EVDEV =y   to make F2 button work
 DEVFS_MOUNT =n   to make silent mode work: otherwise x does not start

Reemerge your splashutils with

# emerge -v splashutils

and rebuild your ramdisks with f.e.

# splash_geninitramfs -v -g /boot/fbsplash-livecd-1024x768 -r 1024x768 livecd-2005.1

if you updated your kernel!!!

Remove consolefont from your bootlevel

# rc-update del consolefont boot

If you've trouble with kernel messages destroying your splash, try kernel options kdgraphics and tty:x and emerge splashutils with kdgraphics support.

Regards, fritzchen

[编辑] PRE-VBE 2.0 cards are not supported

This occurs when you have an old graphic card.

In make menuconfig, remove everything in graphic drivers but VESA, FRAMEBUFFER SUPPORT and CONSOLE settings.( Those you must turn on to activate FB SPLASH). If necessary, use VESA instead of VESA-TNG.

Linux Kernel Configuration: VESA
Device Drivers > Graphics support:
 [*] Support for frame buffer devices
 <*>   VESA VGA graphics support
         VESA driver type (vesafb-tng)  --->
      or VESA driver type (vesafb) instead
 (HRESxVRES@FREQ) VESA default mode

Device Drivers >
 Graphics support >
  Console display driver support:
   [*] Video mode selection support
   <*> Framebuffer Console support
   [*] Support for the framebuffer splash

Remember to turn off other graphic drivers( like Trident )

In your grub.conf, use vga=x instead of video=vesafb:???x???-??@??


Reference value for x
640x480 800x600 1024x768 1280x1024 1152x864 1600x1200
8 bit 769771773775353800
15 bit 784787790793354801
16 bit 785788791794355802
24 bit 786789792795 803


It should work.

[编辑] Can't find the required video mode for your resolution (vesafb)?

VESAFB requires kernel argument vga=x to set the screen resolution and colors. If the video mode is not listed for your resolution you can still compute it using vbetest especially if your screen resolution is non-standard - e.g. 1680x1050 or 1280x800. vbetest is a command line tool that lists the video modes your graphics card supports. First make sure package lrmi is installed on your system:

# emerge lrmi

then run vbetest.

代码: vbetest lists supported video modes
$ vbetest
VBE Version 3.0
Intel(r)915GM/910ML/915MS Graphics Chip Accelerated VGA BIOS
[352] 1680x1050 (256 color palette)
[353] 1680x1050 (5:6:5)
[354] 1680x1050 (8:8:8)
[355] 1280x800 (256 color palette)
[356] 1280x800 (5:6:5)
[357] 1280x800 (8:8:8)
[263] 1280x1024 (256 color palette)
[282] 1280x1024 (5:6:5)
[283] 1280x1024 (8:8:8)
[261] 1024x768 (256 color palette)
[279] 1024x768 (5:6:5)
[280] 1024x768 (8:8:8)
[274] 640x480 (8:8:8)
[276] 800x600 (5:6:5)
[277] 800x600 (8:8:8)
[257] 640x480 (256 color palette)
[259] 800x600 (256 color palette)
[273] 640x480 (5:6:5)
Type a mode number, or 'q' to quit - 353

Modes in square brackets are listed in decimal. Add 512 to the mode you need; pass the result (for example 353+512=865) to your kernel using vga=x, either in decimal (vga=865) or in hexadecimal (vga=0x361).

Thanks to bdz in Gentoo forums, Getting DRI working with Intel Sonoma (i915GM) chipset.

[编辑] Background image loading in the middle of the boot process

You may (and probably will) find that the background image is loaded with a certain few-seconds-delay even when using an initramfs image. During that time the standard black-and-white 640x480 resolution is used.

Such behaviour is normal. The only workaround (in order to get the background image as early as possible) would be using the vesafb frame buffer device (instead of vesafb-tng). Here's Spock's elaborate answer on that issue: "The initramfs is used to populate the root filesystem before the frame-buffer subsystem is initialized, so it's good enough - don't worry about it. As you might have noticed, your PC boots into the text mode, and not the graphics mode. The graphics mode is set up when the framebuffer sub-system is initialized. But before that can happen, other things must be initialized, things that take some time. That's why for a second or two you might be seeing the kernel messages. You might say that with vesafb you didn't have those. And you will be right. But vesafb is an exception, not a rule (it's initialized while the kernel is being loaded) . Every other fb driver, including vesafb-tng, rivafb, radeonfb,... is initialized with the fbdev subsystem".

Compiling the initramfs image directly into the kernel rather than loading it at boot should also greatly reduce the time it takes to display the bootsplash image as it can then load all the necessery files straight away rather than waiting untill filesystems have been mounted.

[编辑] Background image not loading until the filesystem is mounted

While having a delay of 2-3 seconds before the splash screen shows up is normal, having a 20 second delay is not. The reason is that because of one thing or another, the kernel is unable to access the required files from the initrd-image. The most probable reason is that you have specified and created the image with a resolution that isn't supported by your frame buffer device.

Note that just because your monitor and graphics card support a certain resolution, it doesn't mean that your Video BIOS - and by extention your frame buffer device does.

If, for instance, you've created an initrd-image which only contains files for the 1280x1024-resolution, and the maximum supported resolution is 1024x768, gensplash will try to fall back to the maximum supported resolution - only to fail, because these files weren't included. When the filesystem is mounted (far into the boot process) the necessary files will suddenly become available, and the splash-screen will be displayed (albeit annoyingly late). In order to find out which modes are supported by your setup, simply issue the command:

cat /proc/fb0/modes

You should then adjust your theme accordingly.

[编辑] fbsplash on PowerPC

To get fbsplash working on the PowerPC architecture, you need to add a line to your (possibly nonexistent) /etc/portage/package.keywords file:

media-gfx/splashutils ~ppc

This will tell emerge to ignore the fact that the splashutils package is unstable under ppc.

If you are using yaboot, then here is your initrd and append line (which go in your /etc/yaboot.conf file):

initrd=/boot/fbsplash-themename-resolution
append="video=radeonfb:resolution-bitdepth splash=silent"

The initrd should be relative to the root filesystem, but might be different based on your system setup. You might also place your initrd somewhere else entirely -- for instance, you could have my kernels in a /kernel directory and initrd images in /images.

i have problem running maconlinux when fbsplash is enabled. anyone else having this problem?

[编辑] putfont: PIO_FONT: Invalid argument

This message might appear in silent mode. To fix it, remove consolefont from the boot-runlevel:

# rc-update del consolefont boot

It is safe to remove consolefont from the boot-runlevel, because fbsplash runs the setfont-command after finishing the boot anyway.


[编辑] I upgraded to kernel 2.6.12 or higher and the bootsplash doesn't show any more

This is what you get when you run emerge splashutils

代码: emerge splashutils
[...]
* If you upgrade your kernel from pre-2.6.12 to 2.6.12 or higher, please
* make sure that you remerge this package and rebuild your initrds. You
* can use the splash_geninitramfs script to do that.

* It is required that you add 'quiet CONSOLE=/dev/tty1' to your kernel
* command line parameters.
* After these modifications, the relevant part of the kernel command
* line might look like:
* splash=silent,fadein,theme:emergence quiet CONSOLE=/dev/tty1
[...]

[编辑] Error Message complains about missing 8bpp images in themes like livecd-2005.1

If the splash doesn't load and you get error messages about missing 8bpp graphics, you're running in 8bpp mode. You can change the mode by adding the color depth to your kernel command line.

文件: /boot/grub/grub.conf

change

video=radeonfb:1280x1024@75

to

video=radeonfb:1280x1024-32@75

This sets the color depth to 32 bits per pixel.

If it still doesn't work , you maybe had to specify the color depth in the kernel default mode for vesa(-tng). For example:

Linux Kernel Configuration: Specify the color depth in the kernel
Device Drivers > Graphics support:
[*] Support for frame buffer devices
<*>   VESA VGA graphics support
        VESA driver type (vesafb-tng)  --->
(1280x1024-32@75) VESA default mode

See Spock's troubleshooting guide for details.

个人工具