problem with boot splash screen

I'd like to set up a boot splash screen on a host that runs under VirtualBox, so my /boot/loader.conf contains the following:
Code:
splash_pcx_load="YES"
vesa_load="YES"
bitmap_load="YES"
bitmap_name="/boot/mammoth.pcx"

and of course the image is there:

Code:
# ls -l /boot/mammoth.pcx 
-r--r--r--  1 root  wheel  322935 May 22 13:55 /boot/mammoth.pcx

but the splash screen is not shown during boot, and in fact I got the following in the kernel messages:

Code:
# dmesg | grep pcx
splash_pcx: invalid PCX image
module_register_init: MOD_LOAD (splash_pcx, 0xc13d4610, 0) error 19

Any idea?
 
The answer is in splash(4):
Code:
     splash_pcx.ko   ZSoft PCX decoder.  This decoder currently only supports
                     version 5 8-bpp single-plane images.

It's probably easier to use BMP instead.
 
Hi! I have already seen this. I did not manage to use the PCX format, and I remember trying a lot of different resolutions. I had to use a BMP file (splash_bmp_load="YES"), and the conclusion was that without vesa_load="YES", only 320x200x8 BMP images could be used (they can be run-length compressed). With VESA enabled I could go up to 1024x768.

Hope it helps!
 
For years I never used a splash screen, and I've always been fine with that. But... when a friend expressed interest in FreeBSD, I decided to see if I could put together a smoothly running, easy/automagic no-hassles WiFi powered netbook for her (a life-long Windows user).

There were a few hurdles (detailed elsewhere, and successfully navigated). Additionally, I didn't want to frighten the novice with boot messages, and therefore decided to put a splash screen on the netbook. This seemed more difficult than it should have been, but I eventually worked it out. Compiling a list of questions and associated error messages from others who where trying to use splash screens, I came to the conclusion that most of the problems were due to an incorrect format in the BMP file. The file has to be 8 bpp. The OP used the alternative PCX format, but I'm sure the same situation applies with regard to that format.

Gimp wouldn't even allow me to save files in such a low format, so I ended up creating a 16 bpp splash.bmp file, and using ImageMagick to convert it: convert -size 320x200 splashx320x200x16.bmp gradient:green-yellow -depth 8 -alpha off -compress NONE -colors 256 BMP3:splashx320x200x8.bmp.

The example was donated by a smart blogger somewhere - but I can't remember the site. Anyway, I now have a nice (bright red) FreeBSD pseudo-logo/banner that covers the gobbledygook very nicely, keeping the neophyte happy ;)

I ended up with the following splash related lines in the /boot/loader.conf file:

Code:
beastie_disable="YES"
autoboot_delay="-1"
verbose_loading="NO"
splash_bmp_load="YES"
bitmap_load="YES"
bitmap_name="/boot/splashx320x200x8.bmp"

Oh oh - this thing is starting to look like Linux :\
 
ronaldlees said:
Gimp wouldn't even allow me to save files in such a low format, so I ended up creating a 16 bpp splash.bmp file, and using ImageMagick to convert it: convert -size 320x200 splashx320x200x16.bmp gradient:green-yellow -depth 8 -alpha off -compress NONE [/quote]

No way for me to get it working. At least on 9.1-RELEASE on Virtualbox. This is quite strange since even the same image/configuration from a previous virtual machine (8.2-RELEASE) did not work while on the older machine it shows the splash screen.

My [man=1]dmesg[/man] shows:
[code]
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: No appropriate video mode found
module_register_init: MOD_LOAD (splash_bmp, 0xc13d49e0, 0) error 19
[/code]

and the image is 320x200, eight colors RGB, BMP format, one layer. The size of the image is 155 kB. Any idea?
 
fluca1978 said:
...and the image is 320x200, eight colors rgb, bmp format, one layer. The size of the image is 155kB. Any idea?

Can you attach the BMP formatted file to a post? I'll load it on my machine and see if it works (assuming it's not pornographic and you'll give me a (free to use in my test) bsd license :-)

I know you said it worked on a previous machine, but we can put the issue to bed with a test.

What does your loader.conf look like, since you changed from PCX?

Also, I have FreeBSD 9.1 and VirtualBox, so I can test that aspect too.
 
My loader.conf is the following:

Code:
splash_bmp_load="YES"
vesa_load="YES"
bitmap_load="YES"
bitmap_name="/boot/mammoth.bmp"
beastie_disable="YES"
verbose_loading="NO"

Unfortunately I cannot share the BMP image (Imageshack/Imageshare does not upload it).
 
Well, I have done it in FreeBSD 6.x or 7.x, I don't remember, anyhow there's an error in your settings in loader.conf, the parameter bitmap_name must only contain the bitmap file name without path and put the bitmap in /boot/modules, this is not specified but it works this way (I guess)

Code:
bitmap_name="mammoth.bmp"

The bitmap bit depth must be 8 (256 colors) not tested with PCX image format. I tested only a 1024x768x8 image and it works, with 1280x1024x8 it doesn't work (wrong image size error or something similar).

You probably are interested in removing all output text at boot, so create the file /boot.config that contains boot switches as described in boot.config(5) and boot(8), look at options -m and -q.

It works for me, hope it works for you too.

P.S. Tested in FreeBSD 9.1-RELEASE-p5 in VirtualBox, surely it works on a real machine, not tested with wide screen modes, but I guess the VESA driver doesn't support that mode.
 
freethread said:
the parameter bitmap_name must only contain the bitmap file name without path and put the bitmap in /boot/modules, this is not specified but it works this way (I guess)

Code:
bitmap_name="mammoth.bmp"

I've tried moving the file under modules and using a relative file name, but nothing changed.

freethread said:
The bitmap bit depth must be 8 (256 colors) not tested with PCX image format. I tested only a 1024x768x8 image and it works, with 1280x1024x8 it doesn't work (wrong image size error or something similar).

You probably are interested in removing all output text at boot, so create the file /boot.config that contains boot switches as described in boot.config(5) and boot(8), look at options -m and -q.

It works for me, hope it works for you too.

I've used the -m -q switches and did not get any particular error. If I inspect the dmesg(1) output I still have the following:

Code:
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: unsupported BMP format (size=56)
splash_bmp: No appropriate video mode found
module_register_init: MOD_LOAD (splash_bmp, 0xc13d49e0, 0) error 19
 
After a quick search thru through the code base I got that the error message is thrown out from dev/fb/splash_bmp.c:

Code:
/* do we understand this bitmap format? */
     if (bmf->bmfi.bmiHeader.biSize > sizeof(bmf->bmfi.bmiHeader)) {
         kprintf("splash_bmp: unsupported BMP format (size=%d)\n",
                 bmf->bmfi.bmiHeader.biSize);
         return(1);
     }

so it seems the BMP conversion did not work right enough for FreeBSD, or better, that I'm trying to convert a wrong image. I then tried with a new image, converted from scratch, and I got:
Code:
splash_bmp: No appropriate video mode found
module_register_init: MOD_LOAD (splash_bmp, 0xc13d49e0, 0) error 19

however my kernel includes the VESA, SC_PIXEL_MODE and splash options and device.
 
Your bitmap format could not be right. I downloaded the image here: http://www.pcbsd.org/en/artwork.html (the first image in FreeBSD tab, size 1024x768), opened in Windows with Paint.NET to save it as .bmp 8 bpp and copied on FreeBSD machine. Nothing more.

I cannot attach here the bitmap, the compressed file exceed the forum limits by 10-20 kB (bz2 or gz).

My kernel is DEFAULT.
 
Almost solved

I managed to fix this going back to the PCX format. I first converted the image, using gimp to PCX format, then selected a custom palette to remove extra colors, and then copied the image under the /boot directory (no need for it to be in the modules one). I checked on the FreeBSD machine the format of the image:

Code:
% file /boot/mammoth.pcx                                                                                       ~
/boot/mammoth.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [499, 387], 8-bit colour, 300 x 300 dpi, RLE compressed

And with the following loader.conf everything works:

Code:
splash_pcx_load="YES"
vesa_load="YES"
bitmap_load="YES"
bitmap_name="/boot/mammoth.pcx"
beastie_disable="YES"
verbose_loading="NO"

The only thing that remains to tune is that once the loading is completed, the image remains on the screen until I press a key, while I would like to get the login prompt. I've tested even removing verbose_loading and beastie_disabled options but nothing changed.
 
fluca1978 said:
The only thing that remains to tune is that once the loading is completed, the image remains on the screen until I press a key, while I would like to get the login prompt. I've tested even removing verbose_loading and beastie_disabled options but nothing changed.

Change video mode, in rc.conf, it should remove the bitmap. That is, if the bitmap is 1024x768x8, the screen resolution is the same, in /etc/rc.conf set
Code:
allscreens_flags="MODE_nnn"

MODE_nnn is the mode number for 1024x768x32 or any other mode you like (1280x1024x8), but perhaps there are other ways to do this.
 
Back
Top