Feature #12517


allow for custom per-distribution branding

Added by Joshua M. Clulow about 2 years ago. Updated about 2 years ago.

tools - gate/build tools
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


Inspired by the uncluttered but informative boot banner used in Unleashed OS I think we should allow distributions to choose to override the machine boot and zone boot banner message to announce their distribution branding. By default, for stock illumos-gate builds, we'll just announce ourselves as "illumos":

illumos Version master-72a6dc12743 64-bit
Hostname: newcastle

newcastle console login:

A potential boot a banner for OmniOS might look like:

OmniOS Version omnios-r151032-702376803e 64-bit
Hostname: sydney

sydney console login:

or even:

OmniOS Release 151030 (LTS) Version omnios-r151030-bf2ac028ce 64-bit
Hostname: melbourne

melbourne console login:

Ultimately, the string before Version above would able to be overridden in via a DISTRO_NAME variable, which defaults to the value illumos. Those with a sense of nostalgia can specify DISTRO_NAME='SunOS Release 5.11' and get the same output they get today. The string in DISTRO_NAME will also replace SunOS in the mcs comments in shipped binaries, and the default /etc/motd generated in the gate.

Related issues

Related to illumos gate - Bug #12878: check_rtime: missing entriesClosedToomas Soome

Actions #1

Updated by Joshua M. Clulow about 2 years ago

Testing Notes

Loading unix...                           
Loading /platform/i86pc/amd64/boot_archive...
Loading /platform/i86pc/amd64/boot_archive.hash...
illumos Version rti-banner-0-gb41f086d5d 64-bit
Hostname: oi0

oi0 console login: root
Apr 14 21:05:32 oi0 login: ROOT LOGIN /dev/console
Last login: Sat Nov  2 13:40:44 on console
The illumos Project     illumos rti-banner-0-gb41f086d5d        April 2020
You have new mail.
root@oi0:~# mcs -p /usr/bin/id

@(#)illumos rti-banner-0-gb41f086d5d April 2020

Actions #3

Updated by Joshua M. Clulow about 2 years ago

Testing Notes (Supplemental)

Built the final patchset for this change and rebooted into it. Confirmed visually that the boot banner is updated correctly with the same version shown in uname -v. Booted a zone and checked that the zone console (zlogin -C) also displayed the same updated banner.

Earlier I also performed a build and test with the two line boot banner that Peter suggested he would like to have, and that also worked both on the system console and on the zone console.

Confirming also that the mcs comments are working as expected:

$ uname -v

$ mcs -p /usr/bin/ls

@(#)illumos rti-banner-0-g6dc88a2f5f April 2020

$ mcs -p /usr/bin/pax

@(#)SunOS 5.11 onnv-gate:2010-08-18 August 2010
Actions #4

Updated by Joshua M. Clulow about 2 years ago

Testing Notes (Appendix)

Some additional specifics on template string testing appear below. I wrote a unit test program to exercise the template engine while I was developing it:

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/bootbanner.h>

printfunc(const char *line, uint_t lnum)
        printf("    [%u] %s\n", lnum, line);

main(int argc, char *argv[])
        bootbanner_print(printfunc, 0);
        return (0);

Run under a harness:


function t {
        printf -- '---- TEMPLATE: %s ----\n' "$1" 

        [[ -n $1 ]] && printf '    BOOTBANNER1="%s"\n' "$1" 
        [[ -n $2 ]] && printf '    BOOTBANNER2="%s"\n' "$2" 
        [[ -n $3 ]] && printf '    BOOTBANNER3="%s"\n' "$3" 
        [[ -n $4 ]] && printf '    BOOTBANNER4="%s"\n' "$4" 
        [[ -n $5 ]] && printf '    BOOTBANNER5="%s"\n' "$5" 
        printf '\n'

        rm -f bbt
        gcc \
            -I$SRC/uts/common \
            -DBOOTBANNER1="\"$1\"" \
            -DBOOTBANNER2="\"$2\"" \
            -DBOOTBANNER3="\"$3\"" \
            -DBOOTBANNER4="\"$4\"" \
            -DBOOTBANNER5="\"$5\"" \
            -o bbt bbt.c bootbanner.c

        printf -- 'output:\n' "$1" 

        printf '\n'

t 'five lines, no expansion' a b c d e
t 'one line, no expansion' a
t 'illumos default' '^o Version ^v ^w-bit'
t 'retro' '^s Release ^r Version ^v ^w-bit'
t 'tribblix' 'Welcome to Tribblix, the retro ^o distribution' \
    '^v | March 2020 |'

The test harness produces this output:

---- TEMPLATE: five lines, no expansion ----

    [0] a
    [1] b
    [2] c
    [3] d
    [4] e

---- TEMPLATE: one line, no expansion ----

    [0] a

---- TEMPLATE: illumos default ----
    BOOTBANNER1="^o Version ^v ^w-bit" 

    [0] illumos Version rti-banner-0-g6dc88a2f5f 64-bit

---- TEMPLATE: retro ----
    BOOTBANNER1="^s Release ^r Version ^v ^w-bit" 

    [0] SunOS Release 5.11 Version rti-banner-0-g6dc88a2f5f 64-bit

---- TEMPLATE: tribblix ----
    BOOTBANNER1="Welcome to Tribblix, the retro ^o distribution" 
    BOOTBANNER2="^v | March 2020 |" 

    [0] Welcome to Tribblix, the retro illumos distribution
    [1] rti-banner-0-g6dc88a2f5f | March 2020 |

I have also done the full OS build and reboot and zone checks for both the default configuration (no overrides in the environment) and the sample Tribblix string from above. The chief difference between the kernel and the usermode implementation is how we produce the bit width string, and the default banner template exercises that.

Actions #5

Updated by Electric Monk about 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 6112cec5d5374dff12a12bd285afeb5e660b7154

commit  6112cec5d5374dff12a12bd285afeb5e660b7154
Author: Joshua M. Clulow <>
Date:   2020-05-01T20:46:49.000Z

    12517 allow for custom per-distribution branding
    Reviewed by: Andy Fiddaman <>
    Reviewed by: Peter Tribble <>
    Reviewed by: Toomas Soome <>
    Approved by: Robert Mustacchi <>

Actions #6

Updated by Joshua M. Clulow about 2 years ago

  • Related to Bug #12878: check_rtime: missing entries added

Also available in: Atom PDF