• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    boot.php hidden menu prompt translation

    Scheduled Pinned Locked Moved
    General Problems
    3
    5
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fred_chx
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Sebastian Roth

        @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)

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        george1421G 1 Reply Last reply Reply Quote 1
        • george1421G
          george1421 Moderator @Sebastian Roth
          last edited by

          @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

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @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.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • F
              fred_chx
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              134

              Online

              12.1k

              Users

              17.3k

              Topics

              155.4k

              Posts
              Copyright © 2012-2024 FOG Project