[How to] Create/change Porteus boot menu splash screen

Post tutorials, HOWTO's and other useful resources here.
rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

[How to] Create/change Porteus boot menu splash screen

Post#1 by rara » 29 Aug 2015, 15:41

Tutorial: How to create and change boot menu splash screen for Porteus

One of the first thing hobbyists (or pros as the case may be) want to do when they install a brand new OS is – change the associated graphics to personalize their installation to suit their needs/taste. In this tutorial we will see how to create and change boot menu splash screen for Porteus.

We will split this tutorial in two parts for the ease of understanding for maximum readers. In part 1, we will see how to create a splash screen, and in part 2 we will see how to change the splash screen to the new one.



1. How to create a splash screen for Porteus

The splash screen for Porteus is the standard splash screen for the boot loader *1* in use. So, whether you use Syslinux, LILO, or GRUB etc the splash screen for Porteus remains the same as the one used by the boot loader.

In most simple words, the splash screen is a VGA resolution (640 pixels wide, 480 pixels tall) image. The file format used by default is PNG, but it can be in a more popular JPEG format as well. Image color depth is theoretically limited to 14 colors, but in practice I have used full color photographs and they have worked flawlessly. To create a splash image for Porteus you need to keep in mind the above three criteria.

To create an image conforming to the above you need to use a graphics tool such as ImageMagic, IrfanView, ACDsee, mtPaint, Photoshop, GIMP. Basically any graphics editor that allows resizing and saving to PNG and/or JPEG format will do.

To create a splash image, open your desired image in your favorite editor and resize *2* it to 640x480 pixels and save it in PNG *3* or JPEG format.

If you don’t understand much of above, just open the image you want to set as splash image in your favorite editor and resize it to 640x480 pixels. Save the image as PNG or JPEG format.



2. How to change the splash screen for Porteus

Method 1: If you saved your splash image to PNG format, rename your image to “porteus.png”. Now find the file named “porteus.png” on your boot media and replace *4* it with your image.

Method 2: Method 1 will overwrite the original splash image. If you would rather retain it in case you want to revert back to this image, you can either rename the original “porteus.png” to something like “porteus.png.org” and rename your image to “porteus.png” and place it in the same folder.

Method 3: If you saved your splash image to other than PNG format, you need to place your image in the folder containing the “porteus.png” and edit *5* your configuration file (usually “porteus.cfg”). Open the configuration file and change the MENU BACKGROUND line to reflect the name of your image file. Exact line to modify in your configuration file will depend on the boot loader you use.

Method 4: If you saved your splash image to other than PNG format, or you would like to keep more than one splash images on your boot media to use with different configuration files, or to change them frequently, follow the above method 3. Drop the image file in appropriate folder and edit the configuration file to use your image file rather than included “porteus.png”.

Done! Now you are ready to boot. If you did everything right you will see your new splash image!



3. A special note on aspect ratio

Due to the timeline of writing the boot loaders, and to retain maximum compatibility with various display devices, the resolution of the splash screen has been fixed at 640x480 pixels. While this resolution offers maximum compatibility, it also causes unpleasant side effects.
  • If the size of attempted splash image is larger than the specified size, the boot loader completely ignores it.
  • If the size of attempted splash image is smaller on one side, the boot loader tiles it on the smaller side.
  • If the size of attempted splash image is smaller overall or is correct size, it stretches it to ‘fit the screen’.
The above situations 1 and 2 are annoying. 3 can be annoying too if the attempted splash image is too low res or incorrect aspect ratio.

640x480 is a 4:3 (1.333) screen ratio, the gold standard from 2 decades ago. But most displays these days have other aspect ratio, most common being 16:9. When the 640x480 splash image is “stretched to fit” a 16:9 screen, it distorts the visual (Things look fat. Lovely skinny ladies look like fat cows).

To prevent your final splash image from looking distorted start with an image that perfectly matches the aspect ratio of your screen. For example: if your screen is 16:9, start with an image of size 1366x768 or 1600x900 or 1920x1080 and resize it to 640x480. Similarly, if your screen is 16:10, start with an image of size 1440x900, 1600x1000 and resize it to 640x480.



Sample image

Here is a sample image formatted for a 16:10 aspect ratio screen.

Image



Footnotes

*1*. If you don’t understand what a boot loader is, there is nothing to worry. In order to create a splash screen you don’t need to understand it.

*2*. Some graphics editors have an aspect-ratio lock in place by default. Chances are most that you will need to disengage that lock in order to re-size the image perfectly to required dimension. If not, only one side of the resultant image may conform to the size requirement (640x480).

*3*. Most graphics editors save to JPEG format by default. Changing it to PNG may be beneficial in most cases, as PNG image are often relatively free of compression artifacts (compared to their similar sized JPEG counterparts).

*4*. To replace the file you need to be root.

*5*. To edit the file you need to be root.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: [How to] Create/change Porteus boot menu splash screen

Post#2 by francois » 29 Aug 2015, 20:53

Very interesting and we'll formulated howto rara. :D

I realize that my menu.lst does not provide the splash screen under grub legacy. I will come back with it so that we can troubleshoot it. I do have the same problem under grub 2.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: [How to] Create/change Porteus boot menu splash screen

Post#3 by brokenman » 29 Aug 2015, 21:16

Excellent initiative. Nice job.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: [How to] Create/change Porteus boot menu splash screen

Post#4 by francois » 30 Aug 2015, 03:31

Here is my grub menu.lst:

Code: Select all

# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'.  Wed Jul 31 00:39:45 2013
#
# The backup copy of the MBR for drive '/dev/sda' is
# here '/boot/grub/mbr.sda.4431'.  You can restore it like this.
# dd if=mbr.sda.4431 of=/dev/sda bs=512 count=1
#
# Start GRUB global section
timeout 3

#color light-gray/blue black/light-gray
# End GRUB global section

title porteus  on sda5 64bit_v31rc1  extramod KDE 
root (hd0,4)
kernel /64bit_v31rc1/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v31rc1 extramod=/mnt/sda5/64bit_v31rc1/kde changes=EXIT:/64bit_v31rc1/kde login=root
initrd /64bit_v31rc1/boot/syslinux/initrd.xz
boot

Where should I insert the splash information?
Voltaire: Le mieux est l'ennemi du bien.

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: [How to] Create/change Porteus boot menu splash screen

Post#5 by rara » 30 Aug 2015, 03:52

Thanks francois, glad you like the write up.

For GRUB (Legacy) things are a bit complicated. GRUB has an elaborate way of searching for a splash image to load. To simplify things you can place your splash image in /usr/share/images/desktop-base/ and add this line in the boot menu config file.

Code: Select all

GRUB_BACKGROUND="/usr/share/images/desktop-base/your_splash_image_name_here.png"
Hopefully, this should do. If not, we can always troubleshoot further.

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: [How to] Create/change Porteus boot menu splash screen

Post#6 by rara » 30 Aug 2015, 03:56

Thanks brokenman, just a small attempt for thanking you and the team for the hard work they are doing with the distro.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: [How to] Create/change Porteus boot menu splash screen

Post#7 by Bogomips » 30 Aug 2015, 16:36

rara wrote:To create an image conforming to the above you need to use a graphics tool such as ImageMagic, IrfanView, ACDsee, mtPaint, Photoshop, GIMP. Basically any graphics editor that allows resizing and saving to PNG and/or JPEG format will do.
There are already some pretty good tools in the Porteus repertoire, so IMHO one need look no further than: Applications > Graphics > KDE Imageviewer Gwenview (in the case of KDE)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: [How to] Create/change Porteus boot menu splash screen

Post#8 by rara » 31 Aug 2015, 14:32

Good piece of info! Thanks for adding Bogomips.

If a user is already up and running with Porteus, most likely they already have one or another simple graphics viewer/editor at their disposal.

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: [How to] Create/change Porteus boot menu splash screen

Post#9 by Rava » 31 Aug 2015, 18:52

Thanks, rara, brilliant and detailed HowTo. <B
rara wrote:Tutorial: How to create and change boot menu splash screen for Porteus
[...]
*2*. Some graphics editors have an aspect-ratio lock in place by default.
Even mtPaint has that. (GIMP sure does have it as well) GIMP and mtPaint run on any XWindow environment you choose. And since mtPaint is the most slim one, I give a short heads up on that one. (I do my daily edits mostly with mtPaint, and only on rare occasions I fire up teh GIMP)

In mtPaint, you either press [PageUp] or via menu: Image / Scale Canvas, and the untick [x] -> [ ] the Fix Aspect Ratio like so:
Image
:D

In case someone is interested, when it comes to physically resizing ("scale canvas"), especially making a small image larger, quality-wise my most common choice is "Bicubic better", and the second most common used is "Bicubic edged". I ran some trial-and-error on some images, using every available option scale-canvas-wise, and in the end, the above named gave me the best results. And increasing the canvas of a small image is not that easy a task, and results could look ugly quite easily...
Cheers!
Yours Rava

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: [How to] Create/change Porteus boot menu splash screen

Post#10 by rara » 01 Sep 2015, 03:38

Nicely illustrated, Rava :D

I never really gave mtPaint a serious look. My go to Graphics editors are IrfanView and Photoshop. mtPaint looks like a capable editor, too. Good choice for Porteus. I guess this is good enough editor for simple editing tasks.

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: [How to] Create/change Porteus boot menu splash screen

Post#11 by Rava » 01 Sep 2015, 04:50

<digress>
rara wrote:My go to Graphics editors are IrfanView and Photoshop.
Both are not available as native Linux applications, or are they?
And the first one is not even free. So, for more complex stuff it's GIMP, and for most cases mtPaint does the job.
rara wrote:Good choice for Porteus. I guess this is good enough editor for simple editing tasks.
It indeed is. Amazingly small and stable program, seeing how much it actually is capable off, in regards to it's size. :) </digress>

<onTopic>
When it comes to your 2nd to-be-made post (the one implementing the image into the bootloader), please do mention that, depending on the chosen overall colours / gamma / brightness, the predefined menu text colours need to be changed, or else it could end in a near unreadable menu with very similar colours of similar brightness between menu text and background.
Cheers!
Yours Rava

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: [How to] Create/change Porteus boot menu splash screen

Post#12 by rara » 01 Sep 2015, 13:50

Rava wrote:Both are not available as native Linux applications, or are they?
Actually, I do include stuff that people from the other world can understand/are more comfortable with. I am a tad considerate for (ex) Windows users. :ROFL:

Rava wrote:When it comes to your 2nd to-be-made post (the one implementing the image into the bootloader), please do mention that, depending on the chosen overall colours / gamma / brightness, the predefined menu text colours need to be changed, or else it could end in a near unreadable menu with very similar colors of similar brightness between menu text and background.
You have made an excellent point!

My first (compelling) reason behind changing the boot screen graphics was that its color was very similar to the menu color scheme I was using. Now, for readability some contrast is required. I had two choices, one I could change dozen odd colors in menu design, two I could use a different background graphics. I chose the simpler and visually more appealing way out, the second option.

Gamma and Brightness settings can be used to help enhance the contrast with all images. But ultimately users will benefit most by choosing a darker, or a brighter, or an image with a different hue. For example, in my case I chose a slightly darkish image that offered a better contrast and readability.

Your post will definitely help readers whose choice of graphics doesn't offer much in the name of color contrast.

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: [How to] Create/change Porteus boot menu splash screen

Post#13 by Ed_P » 01 Sep 2015, 14:06

Rava wrote:<digress>
rara wrote:My go to Graphics editors are IrfanView and Photoshop.
Both are not available as native Linux applications, or are they?
And the first one is not even free.
Irfanview is not a native Linux app but easily runs under Wine. It is however definitely free for most of us.
http://www.irfanview.com/ wrote:IrfanView is provided as freeware, but only for private, non-commercial use (that means at home).

IrfanView is free for educational use (schools, universities, museums and libraries) and for use in charity or humanitarian organisations.
</digress>
Ed

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: [How to] Create/change Porteus boot menu splash screen

Post#14 by Rava » 01 Sep 2015, 15:27

rara wrote:
Rava wrote:Both are not available as native Linux applications, or are they?
Actually, I do include stuff that people from the other world can understand/are more comfortable with. I am a tad considerate for (ex) Windows users. :ROFL:
I am putting in my own experience with Windoze vs Linux here.


TL;DR
Working more with Linux, especially including CLI and scripting, makes you a better PC user that just shifting the mouse and only working with clicky-colory [1] neat looking GUI...
TL;DR: read on below with the 2nd quote of rara. :)

I started, like many, in the early 1990th with not a PC, but with Atari. Then, after that went down, I switched to PCs, first with Windoze 3.1, 3.11, W95 and so on.
Then I started my first Linux experience with Suse, only to have it's yast to destroy my manual setup for something vital that tooke me, like, 2 days to get finally running, andf that was the moment I started disliking any Linux that thinks it knows - similar to how Windoze does it - better than you how to configure your system. And in the end ended with Slackware/Slack/Porteus. xD

Now, during that first time with Linux in mid 1990th, for one or another reason I switched back to Windoze OS, and realizing after > 1 year, that I really got dumber by doing so. I improved my scripting skills with Linux, and did nothing like that on my brief return to Windoze, and that I realized after I started using more and more Linux OS again... that I had to start as a more dumb programmer that I previously have been at the end of my first wave of Linux experience.

Now, for that reason, and for several others, I look for native Linux programs, and propagate them to all and any new users to Linux, since I believe when it helped me becoming a better script coder, and by doing so even increasing my own brain, that this will also help any qand all newcomers to Linux, since I believe it is best for anyone to code more, and have less of clicky-coloury only experience with an OS that seems to make it more easy to the user, when for real its just takes away or hides most scripting possibilities, and by scripting, you first need to invest some hours or even days up to having finished your sripot, but when having it finished, you save every time minutes and hours of your life, since then the script can work for hours without yoiu having anything to do in the meantime; you just have to start it.

Like this neat one linere that I created reading and trial and error'ing lots of posts in various Linux forums and also on stackoverflow:

Code: Select all

find -size +0 -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate | cut -b 35-
Anyone with a bit of coding experience should be able to see what the script one-liner does. And while there are different approaches to the same goal, my approach sure was to only run the md5sum on files that already have the same size, and not on all files and discarding any results that not have the same md5sum, since that means my approach uses less CPU and also reads only the files that are needed to be read, making it quicker than any other approach using scripting, and not being written in C or assembler. Since I suck at coding in C, and I most probably will never be able to code in assembler...

</digress>
Rava wrote:Gamma and Brightness settings can be used to help enhance the contrast with all images. But ultimately users will benefit most by choosing a darker, or a brighter, or an image with a different hue. For example, in my case I chose a slightly darkish image that offered a better contrast and readability.

Your post will definitely help readers whose choice of graphics doesn't offer much in the name of colour contrast.
My theory on that is, it would be immensely helpful creating some sample images, with dark background for light text (O prefer that approach since its better for the eyes) or the traditional ones with light background and dark text.
Both with example images and example colour definitions. At least one that is an example for more than the standard Porteus loader aka porteus.cfg, like including GRUB, showing how defining different colour scheme fitting an image would work.

And then some examples with different colour schemes just using the main porteus.cfg approach to give the user some initial heads up and some easily to follow examples.

Code: Select all

from boot/syslinux/porteus.cfg
[...]
        menu color screen       37;40      #00000000 #00000000 none
        menu color border       30;44      #00000000 #00000000 none
I guess everything after the "#" is a comment, and here one should also include a description of what kind of colour that is, e.g "dark blue, light yellow" and so on.
</just my 2 cents>

________
[1] Clicky-coloury is my translation of a phrase used on German speaking forums, making fun of approached following colourful mouse control centred GUI instead of more powerful scripting CLI approach. The original reads as "Clicky-Bunti"
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: [How to] Create/change Porteus boot menu splash screen

Post#15 by Ed_P » 01 Sep 2015, 18:08

Rava wrote:Now, during that first time with Linux in mid 1990th, for one or another reason I switched back to Windoze OS, and realizing after > 1 year, that I really got dumber by doing so. I improved my scripting skills with Linux, and did nothing like that on my brief return to Windoze,
I never found that to be a problem with Windows, or DOS. These scripts are just from my working with one Windows app:

Code: Select all

guest@porteus:~$ ls /mnt/sda5/Users/Ed/"My Utilities"/PEBuilder3110a/*.cmd
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!BartPE\ menu.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!Color_Tester.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!DataExtract.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!ImDiskpluginupd.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!PEBuilder\ Bkup.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!PEtoHD.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!PEtoHD4NewUSBhd.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!PEtoUSB.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!SpybotUpdate.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!SysCleanDnld.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!SysVars.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!TMUpdate.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!Username.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!burnISO.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!burnISOnu.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!cmd_here.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!createISO.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!createWin10ISO.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!devicemanager.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!infCacheBuild.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!nu2menuTester.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!pluginEdit.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!pluginEditor.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!pluginEditor1.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!pluginEdits.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!setupldr.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!sortMenu.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!sortPluginFolders.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!unmountX.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!updateCD.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/!updateFiles.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/Stinger.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/a-SquaredUpd.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/nu2menuISO.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/pe2usb.cmd*
/mnt/sda5/Users/Ed/My\ Utilities/PEBuilder3110a/x.cmd*
guest@porteus:~$ 
Ed

Post Reply