Happiness through Ignorance
By user12619798 on Jan 05, 2006
What sort of messages an OS can or should emit during boot has been (and will likely continue to be) the subject of much debate (which I'm not going to go into here). The two extremes usually are a message for everything (note that the definition of "a thing" is very vague). The other extreme is no messages unless something truly fatal has occurred. In current Solaris bits (s10u1 and current nv bits) there's an unsupported/undocumented mode that goes one step further: It doesn't even bother the user when something truly fatal has occurred.
The reason for this has less to do with the fact that we like to see how far we can push things, but rather that the implementation is still incomplete. As such it's not only unsupported, but in fact unsupportable, as there is no code in place that will get the console back into text mode in case of a sufficiently fatal event. Such an event may be anything that to requires sulogin (single user login) to run in order to repair the system, or worse, a system panic.
What it does do, is display a pretty picture (which could be prettier1)while the system boots (and hopefully nothing goes wrong), up until the X-server starts taking over the console.
Warnings and disclaimers:
The current code is quite primitive in that it assumes a VGA device. There are graphics cards out there that don't actually support VGA, so this mode should not be enabled this on a system with such a card. Doing so anyway will likely lead to a hang and no pretty picture.
So, if the previous text was too vague: Please enable this only
Now, here's how you flip it on:
Graphics boot mode is controlled by the console property. It can either be set via eeprom(1M) in bootenv.rc or on the fly on the grub kernel command line. The latter is probably the better idea because you can just make another menu entry and power-cycle and fall back to the non-graphics one should things decide to hang. Here's an example of such menu entries (they live in /boot/grub/menu.lst):
title Solaris 11 nv_15 X86 root (hd0,1,a) kernel /platform/i86pc/multiboot module /platform/i86pc/boot_archive title Solaris happy face root (hd0,1,a) kernel /platform/i86pc/multiboot -B console=graphics module /platform/i86pc/boot_archive
If eeprom was used to set the console property to "graphics", it can be overridden by specifying it on-the-fly on the GRUB kernel line (by hitting 'e' and editing the entry) and setting it to "text" like so:
kernel /platform/i86pc/multiboot -B console=text
Adding your own pretty picture:
The graphics file that's loaded is /boot/solaris.xpm and needs to be 15 colors 640x480 - error checking on the image file is minimal, so make sure you get the image right or things will look ugly.
1 Since this is still "engineering only / experimental code" the image had no help from any of our graphic artists. Such folks have since shown me that they can easily outperform me when it comes to making an image look good in high rez VGA mode 640x480x4 (4-bit, 16 colors).