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

    Hyper V and Pxe boot to Fog problems

    Scheduled Pinned Locked Moved
    General Problems
    10
    64
    20.5k
    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.
    • P
      Paulman9 @lukebarone
      last edited by

      @lukebarone Found on the wiki. Only difference here is open general.h after downloading and change #define to #undefine for these lines:
      #define DOWNLOAD_PROTO_HTTPS
      #define IMAGE_TRUST_CMD
      #define CERT_CMD
      These lines aren’t consecutive in the file so you’ll have to look for each.

      1 Reply Last reply Reply Quote 0
      • P
        Paulman9 @Sebastian Roth
        last edited by

        @sebastian-roth Finally got it to work. Unsure if something is wrong on my side but I had to delete the sleep line to get it to compile properly. As a result, my images are dim since I had to pause the VMs to get screenshots.
        Working:
        0_1522268955120_a0bf3f5b-aa50-44ee-ab70-f6a44db900f6-image.png
        No-worky:
        0_1522268991450_e3135810-e888-4e6f-a8c1-0f6b7eb1362d-image.png

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

          @Paulman9 Great to see you got it working and figured a way to get the pictures. Sorry for the sleep compile issue. I forgot to tell you need to add the unistd header at the top (e.g. line 29) for that to work.

          ...
          #include <ipxe/device.h>
          #include <ipxe/console.h>
          #include <ipxe/init.h>
          #include <unistd.h>
          ...
          

          Now the next step is to figure out which startup functions are called and where it hangs. Unfortunately there does not seem to be an easy way to get the function names from the pointers. So you need to add debug code to each of the startup functions by hand - sorry!
          Here is a list of all eleven startup functions in iPXE (found running find ipxe/src/ -type f -exec grep "\.startup =" {} /dev/null \;😞

          ipxe/src/hci/linux_args.c:	.startup = linux_args_parse,
          ipxe/src/arch/x86/interface/pcbios/hidemem.c:	.startup = hide_etherboot,
          ipxe/src/arch/x86/interface/pcbios/bios_console.c:	.startup = bios_inject_startup,
          ipxe/src/arch/x86/image/initrd.c:	.startup = initrd_startup,
          ipxe/src/arch/x86/core/cachedhcp.c:	.startup = cachedhcp_startup,
          ipxe/src/arch/x86/core/runtime.c:	.startup = runtime_init,
          ipxe/src/interface/linux/linux_console.c:	.startup = linux_console_startup,
          ipxe/src/interface/efi/efi_timer.c:	.startup = efi_tick_startup,
          ipxe/src/core/device.c:	.startup = probe_devices,
          ipxe/src/crypto/rootcert.c:	.startup = rootcert_init,
          ipxe/src/crypto/rbg.c:	.startup = rbg_startup_fn,
          

          Should maybe start with the crypto stuff as we think this might be causing it here. So edit ipxe/src/crypto/rootcert.c, jump to line 95 and add a DBGC as first call after the function header:

          ...
          static void rootcert_init ( void ) {
                  DBGC(0x1, "rootcert start");
                  static int initialised;
          ...
          

          Now compile the binary with make ... DEBUG=init,rootcert and try it out. Follow the same schema for all the other startup functions. The first parameter is just a color code, can be any hex number really. So you can use 0x1 for the first, 0x2 for the second if you like it colorful.

          Note that you have the calling startup function 0x... printout first and then your newly added output when it enters the particular startup routine. So I suspect it to halt after one of your newly added printouts. From there you can add more printouts throughout that function and those being called. Let me know what you find or if you get stuck at some point.

          PS: I’ve done those debugging steps a couple of times when trying to find out why iPXE would hang on some particular hardware. Usually I’d just compile the binary and give it to users for testing. So this is the first time I hand over the knowledge on how to debug iPXE init code and I am grateful @Paulman9 is keen to follow this. @Wayne-Workman mind adding that to the wiki as well?

          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

          P 1 Reply Last reply Reply Quote 0
          • P
            Paulman9 @Sebastian Roth
            last edited by Paulman9

            @sebastian-roth Here is the output from a working vm:
            0_1522325748051_2b166999-769c-45bd-b78d-8ea6e540ade6-image.png
            I’m no programmer so you’re way over my head here haha Output seemed the same as before on the non-working one

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

              @Paulman9 Ok, so it’s definitely not the rootcert code causing the hang. Just keep going like this with all the other files. Try adding debug to ipxe/src/crypto/rbg.c next I’d suggest and pxe/src/interface/efi/efi_timer.c is a good candidate for an issue as well!! Just don’t forget to add those to the make ... DEBUG= command too when compiling.

              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

              P 1 Reply Last reply Reply Quote 0
              • P
                Paulman9 @Sebastian Roth
                last edited by

                @sebastian-roth I suppose this is what I am looking for then?
                0_1522355026027_f97ed95b-6c4a-4fea-9153-31019a00dfb1-image.png

                Non working machine stalled here

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

                  @Paulman9 Yeah, exactly. Now from here just put in more DBGC startments in the rbg_startup function (line 73ff) to see if it gets past the fetch_uuid_setting and drbg_instantiate calls.

                  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
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @Paulman9 Any news on this. Please let me know if you need further assistance.

                    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
                    • S
                      Sebastian Roth Moderator
                      last edited by

                      I just came across this by accident and wondered if this was ever solved. Reading through it and the related iPXE forum post (link) it seems like this was caused and fixed by Microsoft. So if you have this issue, update and you should be fine.

                      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

                      P 1 Reply Last reply Reply Quote 0
                      • P
                        Paulman9 @Sebastian Roth
                        last edited by

                        @Sebastian-Roth Sorry, I completely forgot about this. Just updated to latest kernel on my server and tested on 1803, worked perfect. Thanks for the update.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 4 / 4
                        • First post
                          Last post

                        163

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project