PXE Background Image and Screen Resolution?



  • Hello,

    I found that PXE (UEFI) will crash/reboot when trying to load the default bg.png image for the background. Found the option to change it in the web GUI and simply removed it and confirmed it boots.

    I had the same problem prior using PXE/Syslinux and the resolution for me was to use a jpg instead of a png file. I uploaded my background image (pxe.jpg), placed it in the /var/www/html/fog/service/ipxe/ directory, set ownership to the same as bg.png (644 I think). I added the entry to the web GUI (file name no path just like bg.png) and saved. Notification said save was successful.

    However the image doesnt display in either UEFI or BIOS boot, but it does boot and get to the menus.

    This leads me to believe the resolution is the problem. Is there a way to adjust the screen resolution of the iPXE/PXE menus? I poked around settings, searched the forums and searched the wiki/google. It seems for 1 person permissions was the issue (doesnt help me).

    It looks like the default bg is 800x600, so I am guesing if I sized my image to that it may work (ill give it a shot) however in UEFI the menu is very small, taking up maybe 1/4 of the screen, it would be great if I could push it up to something like 1024x768.

    Thanks



  • @sebastian-roth I changed that line but do not see any difference. This is what I altered:

    explode("\n", $mainFallback),
                array(
                    'goto MENU',
                    ':get_console',
                    "console --x 1024 --y 768 --picture $this->_booturl/ipxe/$bgfile "
                    . "&& goto console_set || goto alt_console",
                )
    

    I also noticed a vast difference between the size of the menu in BIOS and UEFI, the BIOS version is actually a little too big if anything, but the UEFI version takes up maybe 1/4 of the screen.

    Any way to get these 2 menus on par in terms of size with each other?

    As an aside, I thought setting the resolution to 1024x768 (matching my bg) would get the background to display, but it has not.

    I guess next step is to try and save my bg as 800x600 and see if it displays, then as png instead of as jpg.

    Thanks


  • Developer

    @Zer0Cool Take a look at line 1905ff in /var/www/html/fog/lib/fog/bootmenu.class.php. Depending on the version of FOG you run the line of code might be a little further up or down but should be somewhere around there.



  • So I have found this:
    https://github.com/nielsbasjes/ipxe-boot-rom/blob/master/menu.ipxe

    There are other examples online showing adding parameters to the console line in menu.ipxe as to change the screen resolution of the iPXE menu:

    ex:

    console --x 1024 --y 768 --picture http://ipxe.org/_media/logos/ipxe-large.png --depth 32
    

    My boot.php shows a similar line like:

    console --picture http://myip/fog/service/ipxe/pxe.jpg --left 100 --right 80 && goto console_set || goto alt_console
    

    However upon review I am unsure where I can update this line to include the -x/-y parameters. The boot.php is pretty sparse and looks like it relies on many other resources to build up the menu dynamically. I was unable with any digging to find the lines/lines of code responsible for the console line.

    I would really like to adjust the resolution, as especially on UEFI boot the menu is super small, roughly 1/4 of the screen making it hard to see.

    I came across mention of using some advanced options to customize the menu in the wiki but they seem to be dated (and specific to syslinux menus).

    My apologies if there is a simple way to set this in the GUI I have overlooked. Any help would be great,

    Thanks



  • If it helps, I remember changing bg.png in a past version by using the GIMP and then compressing it to minimal filesize (an online tool like compresspng.com/tinypng.com gave the best results back then)



  • @zer0cool said in PXE Background Image and Screen Resolution?:

    Is there a way to adjust the screen resolution of the iPXE/PXE menus?

    No. I believe the image has to be an exact resolution. I don’t remember the resolution it needs.


 

490
Online

5.4k
Users

12.6k
Topics

118.9k
Posts