iPXE Menu Colors Help
-
FOG 1.5.2
CentOS 7.5For the life of me I seem to be unable to change the default coloring of the menus without completely making a mess of things.
I just dont have my head wrapped around the iPXE/FOG handles menu coloring despite reading over:
http://ipxe.org/cmd/cpair
http://ipxe.org/cmd/colourMy menus by default show up as red text, black background and selected text being white text with a red background. The title “Host is not registered!” (and the — under) are white/grey.
What I would like to accomplish is getting the un-selected text to be white, background remains black, selected text is a shade of blue (0081c6) with a white background and the title is also the same shade of blue (0081c6).
I am as of yet unable to determine what specifically to change to get this result. Everything I try either has no effect or does not result in the desire element being changed or with the right color.
Any help would be great, Thanks
-
ipxe uses a different ‘console’ for BIOS and UEFI by default.
Afaik at the moment in UEFI (perhaps only certain UEFI implementations) not everything quite works as it should, so it falls back to ‘default options’ in order to still display the menu.
I’m guessing you also have no background image, correct?
-
@quazz I removed the background image (the default) from the web GUI as it caused iPXE to crash when booting UEFI.
I however have the same red text/black background menu in BIOS and UEFI. I would of course like to alter this in both (if they are manipulated separately) so that it is uniform under BIOS/UEFI.
The background working under UEFI would be a cherry on top but not really important to me right now. My primary concern is getting the colors right.
Thanks
-
@zer0cool The settings are the same, I’m only trying to explain why it works fine in BIOS, but not UEFI.
There isn’t necessarily a fix currently.
Try the fallback method, maybe:
Not all consoles support full RGB colours. You can use the basic ANSI colour as a fallback. For example, to define colour 6 as turqouise, falling back to cyan if RGB colours are not available:
colour --basic 6 --rgb 0x40e0d0 6
-
@quazz I feel a bit silly here, but I am really lost. A fair portion of what you are saying is over my head.
@quazz said in iPXE Menu Colors Help:
Try the fallback method, maybe:
Not all consoles support full RGB colours. You can use the basic ANSI colour as a fallback. For example, to define colour 6 as turqouise, falling back to cyan if RGB colours are not available:
Not sure were I do the above, I assume in the web gui under the menu colors/config, but not sure which field(s).
From your description it sounds like there are 2 ways of displaying the menu, the standard and a fallback in case it doesnt/wont work. How do I configure both to follow the simple format I proposed? The only potential issue with the format I proposed I can imagine is the specific shade of blue, in which case ill try and find the closest one…i just have no idea what specifically to change and what to change it to, to accomplish my goal.
Thanks
-
@Quazz @Tom-Elliott @george1421 I hope you guys dont mind me directing this post towards you guys, but you have proven knowledgeable and I am sure one of you most likely can solve this.
I reverted my changed in the web gui under iPXE General Settings to the default colors/pairings.
I have made some “discoveries” as to why the formatting is giving me trouble. The below points led me to this:
- Out of the box, the iPXE menu will load fine in BIOS but not in UEFI due to the background image. Removing the “bg.png” from the web gui under iPXE General configuration and leaving it blank then allows booting in BIOS or UEFI.
- The above results in red text, black background. It is my understanding this is due to the “fallback” colors/pairings being used.
- The fallback colors are very limited, seemingly not allowing for using rgb defined colors.
With the above, and looking at the boot.php in the browser this line stood out to me:
console --picture url/ --left 100 --right 80 && goto console_set || goto alt_console
As I understand it, console is trying to load nothing as the picture, failing thus evoking
goto alt_console
, essentially the fallback settings. So by removing the image that was preventing UEFI booting I have forced it into booting in this fallback mode.That has led me trying to alter
/var/www/html/fog/lib/fog/bootmenu.class.php
at roughly line 1905:default
array( 'goto MENU', ':get_console', "console --picture $this->_booturl/ipxe/$bgfile --left 100 " . "--right 80 && goto console_set || goto alt_console", )
What I have tried:
"console && goto console_set",
// this would load BIOS/UEFI with all white text, black background. Thus not following any color settings."console --x 1024 --y 768 --left 100 --right 80 && goto console_set",
//this loads with the expected colors in BIOS (blues and whites) but loads messed up in UEFI (colors are there, but its vertically smashed taking up maybe half the screen vertically and all scrambled). In other words you can tell its the menu, with the expected colors but you cannot make anything out in a legible way. Note: other resolutions like 640x480 would cause UEFI to reboot, similar to with bg.- same as above but without offset left/right. Wont boot (system beeps and reboots while ipxe loads menu)
So long story short, it seems the root of my issues are the background image and console command in the menu. Leaving the image out allows booting to the menu but only in fallback. Trying to alter the console command to not load a background leads to partially working results.
Any help would be great. In the mean time I am going to test UEFI boot with the resolution parameters to make sure its not an issue specific to the machine.
I guess my goal here is simply to boot iPXE UEFI or BIOS to the “graphical” console/menu, which should allow me to apply a wider range of colors via rgb to the text on the menu.
Thanks
-
So I am pretty mad at Dell/Nvidia right now. I think the console command using x/y resolution works. The scrambled screen appears to be an issue with the GPU. Not a FOG issue (I think) but a Nvidia or iPXE problem?
When the monitor is connected to the Nvidia NVS 310 the UEFI menu is scrambled. However switching the monitor to be connected to the onboard (CPU built in Intel GPU) then it boots UEFI with the expected colors with no problem.
So I think the line
"console --x 1024 --y 768 --left 100 --right 80 && goto console_set",
In place of the default using the default that loads the background has resolved the problems for me, letting me use the graphical console with access to rgb colors.
EDIT: and switching to the iGPU…also resolves the issue with loading the background in UEFI. I changed the php back to the default and UEFI now boots with the background.
Moral of the story…it appears the GPU can have drastic effects on the iPXE menus loading at all/correctly.
If anyone finds a work around let me know, otherwise I just have to note on my end that these machines with this GPU need to have the monitor connected to the iGPU while pxe booting.
-
@zer0cool I can say on native Dell hardware I’ve always seen the ipxe menu background image and proper menu colors.
With that said, I happen to have T3620 at my home with an Nvidia GTX 1060 installed that operates in UEFI mode. My home FOG server is still on 1.4.4 since its running on a raspberry pi, but let me pxe boot that system and see if I can duplicate what you are seeing. You may need to update the firmware on your graphics card (just guessing).
I know messing with the iPXE colors is a bit mind blowing. I had it figured out once when I was customizing the colors. But that info is now gone. I know there is a lot of indexing/lookup tables. Once you understand what goes into where it is straight forward.
-
@george1421 I get the fog standard graphics background on my Precision 3620.
I the bios under video I have multi display on, with video select Auto.
From within win10 I have both graphics cards enable (nvidia and intel built in gpu) because the application I have will use both GPUs for video editing. I only have the nvidia card with monitors on it. Nothing is connected to the video connector on the chassis.
The firmware I’m running on the 3620 is 2.6.1 (which seems to have been pulled from distribution). 2.8.1 is the current firmware release.
-
@george1421 I am pretty sure it comes down to the Nvidia NVS 310 GPU’s for me. It may even come down to the specific make/model of them, but all of my Dell Precision T3620’s have them. The i7-6700 in each also has built in Intel iGPU.
The NVS 310 has 2x DP connections, and when connected to either the UEFI menu renders scrambled and vertically smashed. Switching to a motherboard output, using the iGPU, it renders as expected. Come to think of it, it was also scrambling and condensing the ESXi installer…at the time I presumed it was ESXi, but now I am certain it was the specific GPU.
You may even recall me “complaining” that the text size/resolution was different in UEFI vs BIOS. This is not the case using the iGPU for me. Now BIOS and UEFI are identical in size and format.
@george1421 said in iPXE Menu Colors Help:
I know messing with the iPXE colors is a bit mind blowing
Its especially hard when half the settings dont change anything because your GPU/background removal has rendered them moot (and your not aware of it). For me the problem was even with documentation and going through it meticulously as soon as I would start to wrap my head around it I would make a change and nothing would happen (or something other than expected), which would lead to presuming I didnt have my head around it. For example setting rgb either has no effect or results in transparency or a default color when in fallback mode. So imagine setting an rgb value to what you know is blue and getting white instead. Makes you question things lol.
After switching GPU’s and getting it to render in normal mode and not fallback, I have sorted out the formatting and added my own background.
Like you I have the multi-gpu setting on auto, have been using BIOS 2.6.1 and 2.8.1 (thats how long I have been working on this lol) and had leading up to this a single monitor connected DP to the NVS 310 (now the iGPU motherboard DP port).
To be honest, if it was my personal computer I would likely look into firmware updates for the NVS…but in my case I am happy just using the iGPU for staging. Thanks for the input