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

    Lenovo 300e ipxe boots ok but ipxe.efi can't resolve the system

    Scheduled Pinned Locked Moved
    Hardware Compatibility
    4
    47
    6.8k
    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.
    • S
      Sebastian Roth Moderator
      last edited by

      @mjaskowski This is great news! We know it made it to load and execute the kernel. We will need to add more debugging output to see where exactly it locks up. We have done this several times with different hardware and I am fairly sure we will figure this one out as well. I won’t get to connect to my compile system until later on at night. So you will need to be patient or start learning how to compile your own kernel. It’s not that hard really.

      git clone https://github.com/FOGProject/fos
      cd fos
      export KERNEL_VERSION=4.19.48
      ./build.sh -k -a x64
      ...
      

      When this runs through without an issue you should see a message at the end telling you the kernel bzImage is ready.

      Now what you want to do is edit .config file, search for “EARLY_PRINTK” and enable this line (remove # at the beginning and add =y at the end just as you see with other lines.

      As well edit arch/x86/boot/compressed/eboot.c and search for the function called efi_main. Add print statements like efi_printk(sys_table, "Text output\n"); at various places in that function to find out where exactly it locks up.

      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
      • M
        mjaskowski
        last edited by

        [root@MCS-FOG fos]# export KERNEL_VERSION=4.19.48
        [root@MCS-FOG fos]# ./build.sh -k -a x64
        Checking packages needed for building

        • Package meld missing!
        • Package ncurses-devel missing!
        • Package bison missing!
        • Package flex missing!
        • Package gcc-arm-linux-gnu missing!
        • Package gcc-aarch64-linux-gnu missing!
          Package(s) missing, can’t build, exiting now.
        1 Reply Last reply Reply Quote 0
        • M
          mjaskowski
          last edited by

          Okay. Installed all missing packages and tried again, at the end was prompted “We are ready to build. Would you like to edit the config file [y|n]?y”, which put me in .config - Linux/x86 4.19.48 Kernel Configuration in a blue bordered editor.
          In this editor I only have options to do the following:
          lqqqqqqqqqqqqqqqqqq Linux/x86 4.19.48 Kernel Configuration qqqqqqqqqqqqqqqqqqk
          x Arrow keys navigate the menu. <Enter> selects submenus —> (or empty x
          x submenus ----). Highlighted letters are hotkeys. Pressing <Y> includes, x
          x <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> x
          x for Help, </> for Search. Legend: [*] built-in [ ] excluded <M> module x

          I searched for “EARLY_PRINTK”
          Search Results
          x Symbol: EARLY_PRINTK [=n] x
          x Type : bool x
          x Prompt: Early printk x
          x Location: x
          x (1) -> Kernel hacking x
          x Defined at arch/x86/Kconfig.debug:17 x
          x x
          x x
          x Symbol: EARLY_PRINTK_DBGP [=n] x
          x Type : bool x
          x Prompt: Early printk via EHCI debug port x
          x Location: x
          x -> Kernel hacking x
          x (2) -> Early printk (EARLY_PRINTK [=n]) x
          x Defined at arch/x86/Kconfig.debug:30 x
          x Depends on: EARLY_PRINTK [=n] && PCI [=y] x
          x Selects: EARLY_PRINTK_USB [=n] x
          x x
          x x
          x Symbol: EARLY_PRINTK_EFI [=n] x
          x Type : bool x
          x Prompt: Early printk via the EFI framebuffer x
          x Location: x
          x -> Kernel hacking x
          x (3) -> Early printk (EARLY_PRINTK [=n]) x
          x Defined at arch/x86/Kconfig.debug:43 x
          x Depends on: EFI [=y] && EARLY_PRINTK [=n] x
          x Selects: FONT_SUPPORT [=y] x
          x x
          x x
          x Symbol: EARLY_PRINTK_USB [=n] x
          x Type : bool x
          x Defined at arch/x86/Kconfig.debug:6 x
          x Selected by [n]: x
          x - EARLY_PRINTK_DBGP [=n] && EARLY_PRINTK [=n] && PCI [=y] x
          x - EARLY_PRINTK_USB_XDBC [=n] && EARLY_PRINTK [=n] && PCI [=y] x
          x x
          x x
          x Symbol: EARLY_PRINTK_USB_XDBC [=n] x
          x Type : bool x
          x Prompt: Early printk via the xHCI debug port x
          x Location: x
          x -> Kernel hacking x
          x (4) -> Early printk (EARLY_PRINTK [=n]) x
          x Defined at arch/x86/Kconfig.debug:53 x
          x Depends on: EARLY_PRINTK [=n] && PCI [=y] x
          x Selects: EARLY_PRINTK_USB [=n] x

          So not sure how to proceed.

          1 Reply Last reply Reply Quote 0
          • M
            mjaskowski
            last edited by

            In this editor I navigated to Kernel hacking and set [*] Early printk and saved. When searched again I find:
            x Symbol: EARLY_PRINTK [=y] x
            x Type : bool x
            x Prompt: Early printk x
            x Location: x
            x (1) -> Kernel hacking x
            x Defined at arch/x86/Kconfig.debug:17 x

            All the rest still [=n] I hope that’s what you mean and the only one you mean. I’ll try to edit eboot.c now.

            1 Reply Last reply Reply Quote 0
            • M
              mjaskowski
              last edited by

              In eboot.c using vi I don’t see a function called efi_main
              /* -----------------------------------------------------------------------
              *

              • Copyright 2011 Intel Corporation; author Matt Fleming
              • This file is part of the Linux kernel, and is made available under
              • the terms of the GNU General Public License version 2.
              • ----------------------------------------------------------------------- */

              #include <linux/efi.h>
              #include <linux/pci.h>

              #include <asm/efi.h>
              #include <asm/e820/types.h>
              #include <asm/setup.h>
              #include <asm/desc.h>

              #include “…/string.h”
              #include “eboot.h”

              static efi_system_table_t *sys_table;

              static struct efi_config *efi_early;

              __pure const struct efi_config *__efi_early(void)
              {
              return efi_early;
              }

              #define BOOT_SERVICES(bits)
              static void setup_boot_services##bits(struct efi_config *c)
              {
              efi_system_table_##bits##_t *table;

              table = (typeof(table))sys_table;

              c->runtime_services = table->runtime;
              c->boot_services = table->boottime; \

              1 Reply Last reply Reply Quote 0
              • M
                mjaskowski
                last edited by

                Okay. I believe I misunderstood when to edit the files, you mean after a successful build. In the build I hit one more error: Missing elfutils-libelf-devel so I installed that and started again and it’s building for a while now.

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

                  @mjaskowski Sorry, didn’t get to answer until now. Great to see you are making good progress on this!!

                  Not sure exactly why but turns out I missed to to EARLY_PRINTK_EFI in the kernel I provided earlier and it still seemed to work for you. So not sure if this is needed or not. In case you don’t get the test output as expected you might want to add the EARLY_PRINTK_EFI as well and try again.

                  In eboot.c using vi I don’t see a function called efi_main

                  Do you know how to search in VI? Make sure you are not in edit mode (hit ESC a couple of times) and type /efi_main then ENTER. It should jump to the first occurrence. If you want to step to the next hit n or shift+n to jump back. If this doesn’t work, just use page down to go to line 740. Should look like this: https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/eboot.c#L740

                  Okay. I believe I misunderstood when to edit the files, you mean after a successful build.

                  Nope, before building. But it’s no big deal! One important thing I should mention is that build.sh is preparing a lot of things for you to make the build work. But as soon as you have called it once you can also go the manual route. This is quite often better.

                  So to change the config in GUI mode do:

                  cd fos/kernelsourcex64/
                  make menuconfig
                  

                  And to build the kernel just do:

                  cd fos/kernelsourcex64/
                  make bzImage
                  

                  You can repeat the make bzImage over and over every time you make a change to the eboot.c code to get a new bzImage binary that has the code changes in it.

                  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

                    @mjaskowski And when the kernel build fine you just need to copy it over to your FOG server in /var/www/html/fog/service/ipxe/. And I’d still name it bzImage-earlyprintk so you don’t overwrite the original kernel binary.

                    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
                    • M
                      mjaskowski
                      last edited by

                      the last build failed with MK_FW firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw.gen.S
                      make[1]: *** No rule to make target linux-firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw', needed by firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw.gen.o'. Stop.
                      make: *** [firmware] Error 2
                      Since I’m starting it over I’ll edit those files prebuild but what about this error, how do I prevent a repeat?

                      george1421G 1 Reply Last reply Reply Quote 0
                      • george1421G
                        george1421 Moderator @mjaskowski
                        last edited by george1421

                        @mjaskowski said in Lenovo 300e ipxe boots ok but ipxe.efi can't resolve the system:

                        make[1]: *** No rule to make target linux-firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw’, needed by firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw.gen.o’. Stop.

                        I’ve done my share of linux kernel building (watch that statement come back and bit me in the backside). What this is saying is that you don’'t have the linux kernel firmware downloaded and saved into the root of the directory where the .config file is.

                        git this: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

                        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

                          @mjaskowski That’s kind of strange as the firmware should be downloaded by the build.sh script for you - see here. Please run ls -al fos/kernelsourcex64/linux-firmware and post output here. If you get no such file or directory run as suggested by George:

                          cd fos/kernelsourcex64/
                          git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
                          

                          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
                          • M
                            mjaskowski
                            last edited by

                            running ls -al fos/kernelsourcex64/linux-firmware resulted in ls: cannot access fos/kernelsourcex64/linux-firmware: No such file or directory there is however a fos/kernelsourcex64/firmware directory

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

                              @mjaskowski said in Lenovo 300e ipxe boots ok but ipxe.efi can't resolve the system:

                              there is however a fos/kernelsourcex64/firmware directory

                              This is not the same as fos/kernelsourcex64/linux-firmware. You need both!

                              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

                                @mjaskowski Did you get to compile the kernel yet?

                                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
                                • M
                                  mjaskowski
                                  last edited by

                                  I got pulled off this project and just back to it now. So I just updated to Kernel to bzImage Version: 4.19.48 and when I pxe boot to it I only get as far as rEFInd - Booting OS in a blue bar at the top of the screen and below prints:

                                  Starting bootmgfw.efi
                                  Using load options ’ ’

                                  and that’s all folks. What next?

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

                                    @mjaskowski Great to see you back. When you see rEFInd that means your client chainloaded to boot from disk. Make sure it is registered and a task is scheduled for it.

                                    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

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      mjaskowski @mjaskowski
                                      last edited by

                                      I’m looking at https://wiki.fogproject.org/wiki/index.php/Building_a_Custom_Kernel and it’s not clear to me where I’m to perform step 1:
                                      Build Process

                                      • Install [WHERE?] the required packages to build the kernel with:
                                        RHEL/Fedora/CentOS/.rpm other: (need confirmation that this is all the packages required?!?, may also need qt-devel and a few others)
                                        yum groupinstall “Development Tools”
                                      • Ubuntu/Debian/.deb other:
                                        sudo apt-get install qt3-dev-tools libqt3-mt-dev
                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Sebastian Roth Moderator
                                        last edited by

                                        @mjaskowski From the things you wrote weeks ago I though you where way beyond that point already. The development tools are needed to compile the kernel from source code. You install those on a machine you want to use for playing with the kernel build. You can use your FOG server for this but any other Linux machine will do just as well. Doesn’t really matter.

                                        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
                                        • M
                                          mjaskowski @Sebastian Roth
                                          last edited by

                                          @Sebastian-Roth said in Lenovo 300e ipxe boots ok but ipxe.efi can't resolve the system:

                                          @mjaskowski Great to see you back. When you see rEFInd that means your client chainloaded to boot from disk. Make sure it is registered and a task is scheduled for it.

                                          That’s the thing, I never get to the FOG menu options including the Quick Registration and all. I’ve previously tried to manually register and perform a task to no avail but I’ll try that again.

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            mjaskowski @mjaskowski
                                            last edited by

                                            @mjaskowski said in Lenovo 300e ipxe boots ok but ipxe.efi can't resolve the system:

                                            @Sebastian-Roth said in Lenovo 300e ipxe boots ok but ipxe.efi can't resolve the system:

                                            @mjaskowski Great to see you back. When you see rEFInd that means your client chainloaded to boot from disk. Make sure it is registered and a task is scheduled for it.

                                            That’s the thing, I never get to the FOG menu options including the Quick Registration and all. I’ve previously tried to manually register and perform a task to no avail but I’ll try that again.

                                            So I get the following:
                                            Succeed to download NBP file.
                                            iPXE initialising devices…ok

                                            iPXE 1.0.0+ (9907f) – Open Source Network Boot Firmware – http://ipxe.org
                                            Features: DNS FTP HTTP HTTPS iSCSI NFS TFTP SRP VLAN AoE EFI Menu
                                            Configuring (net0 3c:18:a0:11:dc:62)… ok
                                            Received DHCP answer on interface net0
                                            tftp://xx.xx.x.xx/default.ipxe… ok
                                            http://xx.xx.x.xx/fog/service/ipxe/boot.php… ok
                                            bzImage-earlyprintk… ok
                                            init.xz… ok
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output
                                            Text output

                                            to the end of the visible screen.

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

                                            216

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project