# boot (and kernel) message background and color



## fluca1978 (Jul 5, 2012)

Hi all,
I was wondering if there is any way to configure the color and the background of kernel messages, that on the console are printed as light white (37m) while, for instance, in OpenBSD are yellow on blue background. Moreover I don't see where this trick is done, since the kernel uses the normal printf(2) (or at least I think so) as in the following snippet from sys/kern/vfs_mountroot.c:


```
if (strcmp(fs, "zfs") != 0 && dev[0] != '\0' &&                                    
            !parse_mount_dev_present(dev)) {                                               
                printf("mountroot: waiting for device %s ...\n", dev);                     
                delay = hz / 10;
```

It should not be a console setting, since on the console are printed also normal chars, therefore if anyone can provide me some clues it will be very interesting for me.


----------



## SirDice (Jul 5, 2012)

It's a kernel option. Have a look in /usr/src/sys/conf/NOTES:

```
# The following options will let you change the default colors of syscons.
options         SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
options         SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)
options         SC_KERNEL_CONS_ATTR=(FG_RED|BG_BLACK)
options         SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)
```


----------

