PostgreSQL ascii logo for FreeBSD boot loader

I use FreeBSD as my main PostgreSQL server, and also as virtual machine for training courses. A long time ago, I changed the message of the day (/etc/motd) to reflect the elephant logo in ascii-art, but why not changing also the booloader logo?
FreeBSD by default shows what is called orb or the devil (named beastie), and the new Lua based bootloader use some simple string concatenation to generate a logo. However, it was not so simple to make a new logo, since I’ve no idea about how to debug it production, and that forced me to a very long and repetitive *try and reboot** process to identify all the problems with my logos.
Last, I made it!
Now there are two available logos for the bootloader that provide both the black-and-white and the coloured elephant. Below you can see a couple of screenshoots:




In order to use one of the logos, you have to:
  • download the Lua script from my Github repository, within the logos directory you can find the files
  • put the choosen file into the /boot/lua directory and provide read permissions;
  • edit your /boot/loader.conf and add the setting loader_logo depending on the chosen logo
    # for the coloured version
    loader_logo="postgresql"
    # or for the black-and-white version
    # loader_logo="postgresqlbw"
    
  • and of course, reboot!

Why cyan instead of blue?

You probably have noticed that the coloured elephant is made in cyan and not in the well known blue. The reason for that is that the console foreground blue is too dark to make the elephant appear. However, it is possible to manipulate the escape sequences in order to get a different color, but please note that for a reason I don’t know, highlighting colors (e.g., escape sequences like 94) are not working in the bootloader. In the logos directory there is also the motd file, or better, an example of message-of-the-day. Place it on your machine and customize at your wills.

What about the ascii art?

Credits to the ascii art go to Oleg Bartunov, even if I’m not able to find out anymore a message thread where he proposed the elephant logo. However, thanks also to Charles Clavadetscher that provided another version.

Feel free to contribute!

As usual, having posted the logos on my Github repository, any contribution and improvement is welcome.

The article PostgreSQL ascii logo for FreeBSD boot loader has been posted by Luca Ferrari on November 12, 2019