boot.php hidden menu prompt translation



  • Hi FOG community !

    I am currently struggling to understand from where a particular line in my boot.php file is coming from. I am using the “Hide Menu” fonction from the “FOG PXE Boot Menu Configuration” page, and I would like the prompt (Press ${keyName} to access the menu) to be translated in my users language.
    Here is my (default) boot.php :

    http://srv-fog/fog/service/ipxe/boot.php

    #!ipxe
    set fog-ip 172.16.0.66
    set fog-webroot fog
    set boot-url http://${fog-ip}/${fog-webroot}
    cpuid --ext 29 && set arch x86_64 || set arch i386
    iseq ${platform} efi && set key 0x1b || set key 0x1b
    iseq ${platform} efi && set keyName ESC || set keyName Escape
    prompt --key ${key} --timeout 5000 Booting... (Press ${keyName} to access the menu) && goto menuAccess || sanboot --no-describe --drive 0x80
    :menuAccess
    login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param platform ${platform}
    param username ${username}
    param password ${password}
    param menuaccess 1
    param debug 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    :bootme
    chain -ar http://172.16.0.66/fog/service/ipxe/boot.php##params
    

    Could you explain me which file or fonction creates the line of code below ?

    prompt --key ${key} --timeout 5000 Booting... (Press ${keyName} to access the menu)
    

    I am running FOG Version 1.4.4, SVN Revision: 6077 on an ubuntu 16.04 server.

    Thank you,

    Frederic



  • Thank you so much, I made the changes I needed in the bootmenu.class.php file (line 528) and now the prompt is in french !

      $Send['chainhide'] = array(
                    'cpuid --ext 29 && set arch x86_64 || set arch i386',
                    "iseq \${platform} efi && set key 0x1b || set key $KSKey",
                    "iseq \${platform} efi && set keyName ESC || "
                    . "set keyName $KSName",
                    "prompt --key \${key} --timeout $this->_timeout "
                    . "Demarrage en cours... (Presser la touche \${keyName} pour acceder au menu) && "
                    . "goto menuAccess || $this->_bootexittype",
    

    I know it might sound trivial, but I would like to insert some kind of ascii logo to warn my users that it’s time to press the escape button. I can’t figure out how to insert a line break in the line of code below without breaking things… I would like to display someting like :

      . "Demarrage en cours... "line break"
     _____                  "line break"
    /  __ \                 "line break"
    | /  \/ ___  _ __ _ __  "line break"
    | |    / _ \| '__| '_ \ "line break"
    | \__/\ (_) | |  | |_) |"line break"
     \____/\___/|_|  | .__/ "line break"
                     | |    "line break"
                     |_|    "line break"
    (Presser la touche \${keyName} pour acceder au menu) && "
    

    Thank you again for your time !

    Regards,

    Frederic


  • Developer

    @george1421 Sure, the parameters are coming from those settings you just mentioned. I am not to sure what exactly the OP was asking but to me it sounded like he/she wanted to know which part of the code would generate this line. Maybe I got this wrong.


  • Moderator

    @sebastian-roth Isn’t that iPXE menu line managed by these WebUI settings?

    1. FOG Configuration->FOG System Settings->FOG Boot Settings->FOG_PXE_MENU_HIDDEN
    2. FOG Configuration->FOG System Settings->FOG Boot Settings->FOG_PXE_HIDDENMENU_TIMEOUT

  • Developer

    @fred_chx This line is being generated by bootmenu.class.php as all the other lines as well. See here: https://github.com/FOGProject/fogproject/blob/1.4.4/packages/web/lib/fog/bootmenu.class.php#L527 (line 527f)


 

534
Online

41.9k
Users

12.4k
Topics

116.7k
Posts