Get iPXE Menus to Resemble Old Syslinux PXE Menus?



  • Hey All,

    FOG 1.5.2
    CentOS 7.4.1708
    Acting as DHCP, TFTP, iPXE, etc.
    Seperate DNS server

    I have testing workstation booting and displaying menus both BIOS and UEFI booted. My question/problem is 2 part:

    1. Is it possible to get the FOG iPXE menus via BIOS and UEFI to have the same appearance/style?
    2. Is it possible to replicate the appearance/style of my old Syslinux based PXE menus?

    Re #1:
    As of now, the UEFI menu is much smaller then the same menu displayed BIOS booted. It also will not boot using the default background image under UEFI. If I clear the field for background it boots UEFI, otherwise it just boot loops.

    Basically the BIOS menu is sized pretty large, taking up mostly the whole screen which is good, making it easy to read. The UEFI menu is about 1/4 of the screen and very hard to read. Id like to get them to both appear similar in terms of size/placement.

    Re #2:
    I had prior a manual install of tftp/dhcp/etc and using Syslinux (vesamenu.c32) under BIOS and UEFI had a very nice menu setup. Sub-menus, appearance exactly the same under either boot. I am not stuck on having submenus, but the theme/background would be ideal.

    Here is an excerpt from “pxe.conf”, which is the theme file that passes all the appearance parameters to the menus:

    MENU TITLE ---=== My Lab PXE Server ===---
    MENU RESOLUTION 1024 768
    NOESCAPE 1
    ALLOWOPTIONS 1
    # PROMPT 0
    # MENU WIDTH 120
    # MENU ROWS 16
    # MENU TABMSGROW 26
    # MENU MARGIN 10
    # MENU HELPMSGROW 22
    # MENU TIMEOUTROW 24
    # MENU BACKGROUND 40;40 #00000000 #00000000 none
    MENU BACKGROUND pxelinux.cfg/pxe.jpg
    MENU COLOR sel 7;36;40 #ff0077c8 #ffffffff none
    

    I am having a bit of a hard time finding out what parameters to change in FOG to get the same colors I had (black background, white text un-selected, particular shade of blue for title and selected text (with selection having white background). The pxe.jpg is 1024x768, mostly black with a logo at the bottom right. I tried this previously in FOG and it wasnt loaded, seemed like it was ignored. Never figured out if it was a format issue, resolution issue or FOG issue.

    In any case any help would be appreciated. Thanks



  • Could anyone help me with just getting the colors as per my original post. I have been in the iPXE General Config | Menu colors, pairing, settings for hours and cant wrap my head around whats whats.

    Put simply, here is the color scheme I am aiming for:

    • title text and selected text to be 0x0077c8 (selected text white background)
    • background black
    • unselected text white

    Right now both UEFI and BIOS are greyish title, white selected text with red background, red unselected text. Its really hard on the eyes.

    I have been mulling over:
    http://ipxe.org/cmd/cpair
    http://ipxe.org/cmd/colour

    and my boot.php and just cant wrap my head around what changes what. I have tried playing around with it and the results so far have been 100% not what I expected making it impossible to gain any traction on it. Some options I cahnge and expect to see a difference appear to do nothing, others I change and expect a certain element/color to change and something completely different changes.

    Thank you


  • Moderator

    @zer0cool I was going to test with this but ran out of time at the moment.

    When you pxe boot and ipxe is at “Initializing devices…”, unplug the network cable. You will get an error message and something about pressing s for the ipxe console. Do that. Once at the console then plug the network cable back in.

    On the ipxe console, key in dhcp net0 to init the network adapter.

    At this point you should be able to key in ipxe commands such as console and /or load your custom .png file for the background.



  • @george1421 Very cool.

    My png weighs in at a hefty 9kb lol. I will have to check the depth. Also I noticed in the boot.php that the console line does not include a statement for the depth (which may be fine).

    The documentation here is unclear on the matter

    The width, height, and colour depth are specified as minimum requirements; the actual values used may be higher than specified. If a background picture is used then the width and height may be omitted; the console size will then be chosen based on the size of the background picture.

    So above I get that without a picture width, height and depth should be used? They then say that with a background width and height can be omitted, but do not say the same for depth.

    Beyond that, they also say that the resolution should adjust to the size of the background image, leading me to believe if you had a 1024x768 background it should adjust to that resolution without specifying it on the console line which is good.

    I am however wondering if adding the --depth parameter may correct the issues with the background on UEFI?


  • Moderator

    @zer0cool OK lets start over.

    I just grabbed an optiplex 7050, 7040, Latitude 7270 and 7280 from inventory, pxe booted it and it displays the FOG background, as other systems do in bios/legacy mode. The 7010 I had in the build up room of course does not get past ipxe initializing devices…

    My production server is still running fog 1.4.4.

    The default fog bg.png file is 800x600x32 bits. If I remember correctly there is a maximum file size for this image. For some reason 70K comes to mind. I need to do some research on that data point.

    Yes png files are only supported by iPXE.



  • @george1421 Ok, I am with you now.

    Anyway you know of for me to include the png but prevent the crash when booting UEFI on some clients?


  • Moderator

    @zer0cool said in Get iPXE Menus to Resemble Old Syslinux PXE Menus?:

    @george1421 are you saying then that @Tom-Elliott is incorrect in his statement or have I misunderstood what he said?

    I’m not saying either, but based on my experience I’ve see the fog ipxe menu displayed on some uefi based computers, other display a black screen with white characters and some kind of reddish highlight and other look like 80x25 character mode, and other be like character mode but the font size is 3 or 4 point in size (frick’n small).



  • @george1421 are you saying then that @Tom-Elliott is incorrect in his statement or have I misunderstood what he said?

    If it is actually down to the UEFI device, is there a way to include the background image so that it displays on capable systems but does not crash system which cannot display it?

    After reading iPXE documentation it appears only png is supported (2 other file types for images I never heard of, not the typical jpg, bmp, etc), so I created an 800x600 version of my background as png (instead of 1024x768) and iPXE still crashes when it gets to the line loading the png. Computer makes a single beep and reboots.

    I have been using a relatively new/modern Dell Precision T3620, updated to latest firmware. The server grade machines I will need to deploy to are generally ~5 years old or newer (in terms of when the parts in them came out, not the age of the machine itself).

    What I have found so far is any attempt to add an image causes UEFI booting to crash, but I havent tried any other machines yet.


  • Moderator

    @zer0cool said in Get iPXE Menus to Resemble Old Syslinux PXE Menus?:

    In any case its a bit disappointing if iPXE indeed is limited to no background image under UEFI

    Its only limited on certain uefi implementations. I have see the fog background on some uefi systems and not others. I really just ignore it. That doesn’t mean its right only that I don’t pay attention now. The next time I image a uefi system I’ll note if the background is displayed.



  • @tom-elliott said in Get iPXE Menus to Resemble Old Syslinux PXE Menus?:

    ipxe efi doesn’t currently support background images.

    @Tom-Elliott Am I following correctly that this is a limitation of iPXE and not FOG then?

    To re-state it and make sure I am following along:

    iPXE itself does not support background images when booting UEFI?

    If so, I have been unable to find any mention of this limitation anywhere else (not that I dont believe you, but was hoping to be able to track progress on the issue). Is it a known issue as far as the iPXE folks are concerned?

    I tried to register for the iPXE forums yesterday to ask them some questions but their registrations reCapture is broken, so I cant register. I emailed them and havent heard back regarding registration yet.

    In any case its a bit disappointing if iPXE indeed is limited to no background image under UEFI



  • @tom-elliott Yea I am ok keeping it a flat menu structure, but right now my 2 big issues are:

    1. UEFI and BIOS menus looking different (especially in size)
    2. I am unclear on the correlation between the menu color fields and what they actually set in the Web GUI. The documentation on the matter has not clearly defined for me what the syntax of the fields means.

  • Senior Developer

    @quazz ipxe efi doesn’t currently support background images. This is ipxe as you guessed. Image sizes of png are automatically figur d out which is why we don’t set them, but they can be setup though it entails modifying the bootmenu.class.php file directly.

    Of note, ipxe is not syslinux, though it can build ipxelinux.0 with syslinux. Ipxe can handle submenu layers and the advanced menu is one way to do it. It could be done via the create new menu element as well, but it can be complex. We have examples on the forums about how one can do sub menus and just custom elements so please read up. Ipxe was chosen over the older pxe style for a reason. While syslinux has come a long way I find ipxe much easier for fogs needs.


  • Moderator

    I believe iPXE expects a png image as background as opposed to a jpg. That said, it crashing on the default image seems to be similar to this issue here: https://forums.fogproject.org/topic/11763/pxe-background-image-and-screen-resolution/6

    That being said, I’m not entirely sure why the menus aren’t consistent accross UEFI/BIOS. I have noticed as well that background images don’t load in UEFI and that the colors are different (fallback colors, maybe?). Is this a problem with iPXE? I can’t find any information on this looking around a bit. The size could theoretically be hardcoded like in Syslinux I think, but isn’t currently set up in FOG.

    FOG currently only has one submenu “Advanced menu” which the user can fill in as they desire (assuming valid menu structure).


 

485
Online

5.4k
Users

12.6k
Topics

118.9k
Posts