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

Using FOG without PXE - FOG client on USB key

Scheduled Pinned Locked Moved
General
3
10
1.4k
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.
  • L
    louis.tasse
    last edited by May 29, 2023, 6:00 PM

    Hello,

    Our organization will not provide its DHCP server to serve our FOG PXE server and thus must rely on a FOG client on a USB key.

    As such I have tried using the following procedure “https://forums.fogproject.org/topic/6532/usb-boot-target-device-into-fog-os-live-fosl-for-debugging” to create the FOG client. Unfortunately, I have encountered a problem when trying to install the “grub” bootloader from the command:

    sudo grub-install --force --no-floppy --boot-directory=/mnt/boot /dev/sdX

    and getting the following error:

    Installing for x86_64-efi platform.
    grub-install: error: cannot find EFI directory.

    Is there an up-to-date procedure to create the FOG USB client as I believe this may related to new EFI technology?

    Specifications on procedure

    Fog server (@ version 1.5.10) on Ubuntu
    USB client created on Kali Linux

    Thank you.

    Louis.

    G 1 Reply Last reply May 29, 2023, 7:21 PM Reply Quote 0
    • G
      george1421 Moderator @louis.tasse
      last edited by May 29, 2023, 7:21 PM

      @louis-tasse said in Using FOG without PXE - FOG client on USB key:

      Our organization will not provide its DHCP server to serve our FOG PXE server and thus must rely on a FOG client on a USB key.

      is it that your organization provides dhcp services but you can not change its settings? If yes, are your fog pxe clients and fog server on the same subnet? If yes then we can use dnsmask to supply pxe boot info.

      I can also give you a starter image for your usb booting if you need it.

      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
      • R
        RipAU
        last edited by May 29, 2023, 11:14 PM

        We have something similar, we are unable to get DHCP proxy working, I’m unsure why.
        They made a change and it broke any ability to proxy from what I’ve been able to test.

        We get around this by creating a PXE client on the USB key pointed at our FOG server.

        Previously we used ROM-O-Matic but that has fallen over and hasn’t been picked up again. I assume it was a niche service.
        On our iPXE USB we use the iPXE script like this:

        #!ipxe
        prompt --key 0x02 --timeout 1000 Press Ctrl-B for the iPXE command line... && shell ||
        dhcp
        cpuid --ext 29 && set arch x86_64 || set arch i386
        params
        param mac ${net0/mac}
        param arch ${arch}
        chain http://x.x.x.x/fog/service/ipxe/boot.php##params
        

        No doubt there are other ways to achieve the same result.
        Anything I’ve found useful for FOG/iPXE or managing systems I usually keep in my github.

        https://github.com/mediocreatmybest/FOG-O-Matic/tree/main/iPXE

        I’ve got the ROM-O-Matic settings I used for iPXE as well, no doubt needs updating but last time I built the key I didn’t have any issues with it.

        https://github.com/mediocreatmybest/FOG-O-Matic/tree/main/iPXE/iPXE-Scripts

        L 1 Reply Last reply May 30, 2023, 1:12 PM Reply Quote 0
        • L
          louis.tasse
          last edited by May 30, 2023, 12:11 PM

          Hello george1421,

          Thank you for your prompt reply.

          Contrary to my recommendation, our organization decided to go with a commercial solution (Ghost @ Broadcomm) and was not able to configure their new DHCP server (BlueCat) to accommodate two PXE servers…

          While I would like to continue to use my Fog server, I am left without PXE/network boot. Unfortunately, our environment has 5 different VLAN’s, 3 of them being classrooms and one where the Fog Server is sitting. Upon reading the documentation on “Fog without PXE”, I understand that using a USB client reduces Fog functionality which is fine for doing what I intent to do.

          Then yes, if you can provide a starter image for network USB booting that would be awesome.

          Greatly appreciated.

          Louis.

          G 1 Reply Last reply May 30, 2023, 6:27 PM Reply Quote 0
          • L
            louis.tasse @RipAU
            last edited by May 30, 2023, 1:12 PM

            @RipAU,

            Thank you for replying to my support post.

            I am trying to understand how your solution works:

            1. your create a bootable USB key and boot from it: any specifics on the bootable device?
            2. you take the above mention shell script and install it on the USB key?
            3. you invoke the shell script which will point to the Fog Server and mimic a typical PXE request?
            4. the end results of the script completion is that the Fog runtime is loaded on the device and the resulting Fog menu?

            Thanks.

            Louis.

            1 Reply Last reply Reply Quote 0
            • G
              george1421 Moderator @louis.tasse
              last edited by May 30, 2023, 6:27 PM

              @louis-tasse said in Using FOG without PXE - FOG client on USB key:

              if you can provide a starter image for network USB booting that would be awesome.

              The instructions for creating the FOS linux boot drive is here: https://forums.fogproject.org/topic/7727/building-usb-booting-fos-image Look at the FOG forum chat for an additional hint.

              In regards to what RipAU mentioned that method will also work, you gain the ability of multicast imaging and quick deploy image if you boot using iPXE. As was mentioned you just need to update the boot time script with the IP address of your fog server. FOG has the needed tools built in to compile ipxe, there is no need for the rom-o-matic site that seems to have been retired. I have a tutorial here on how to recompile ipxe on the fog server: https://forums.fogproject.org/topic/15826/updating-compiling-the-latest-version-of-ipxe I would run through the script the first time to compile everything. Now comes the part to integrate what RipAU mentioned. In the based directory where you cloned the fogproject github site (typically /root/fogproject or /opt/fogproject depending on whos instructions you used) There will be a src/ipxe directory. In that directory tere will be a src and src-efi directory, these are the source files used to create FOG’s version of iPXE. If you go into each of those directories there will be a file called ipxescript That is where the startup script for iPXE is.

              #!ipxe
              isset ${net0/mac} && ifopen net0 && dhcp net0 || goto dhcpnet1
              echo Received DHCP answer on interface net0 && goto proxycheck
              
              :dhcpnet1
              isset ${net1/mac} && ifopen net1 && dhcp net1 || goto dhcpnet2
              echo Received DHCP answer on interface net1 && goto proxycheck
              
              :dhcpnet2
              isset ${net2/mac} && ifopen net2 && dhcp net2 || goto dhcpall
              echo Received DHCP answer on interface net2 && goto proxycheck
              
              :dhcpall
              dhcp && goto proxycheck || goto dhcperror
              
              :dhcperror
              prompt --key s --timeout 10000 DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
              
              :proxycheck
              isset ${proxydhcp/next-server} && set next-server ${proxydhcp/next-server} || goto nextservercheck
              
              :nextservercheck
              isset ${next-server} && goto netboot || goto setserv
              
              :setserv
              echo -n Please enter tftp server: && read next-server && goto netboot || goto setserv
              
              :chainloadfailed
              prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
              
              :netboot
              chain tftp://${next-server}/default.ipxe || goto chainloadfailed
              

              Remove the following lines from that script

              isset ${proxydhcp/next-server} && set next-server ${proxydhcp/next-server} || goto nextservercheck
              
              :nextservercheck
              isset ${next-server} && goto netboot || goto setserv
              
              :setserv
              echo -n Please enter tftp server: && read next-server && goto netboot || goto setserv
              

              now change the very last line

              chain tftp://${next-server}/default.ipxe || goto chainloadfailed
              

              Replacing ${next-server} with the IP address of your fog server. Do this for both the fogproject/src/src and fogproject/src/src-ipxe ipxescript files.

              Now recompile iPXE and move the updated files to the /tftpboot directory as instructed in the previously linked tutorial.

              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!

              L 1 Reply Last reply Jun 1, 2023, 4:35 PM Reply Quote 0
              • R
                RipAU
                last edited by May 31, 2023, 12:03 AM

                Yep, while it isn’t complex if you have done it a few times, it can seem a little daunting, (and frustrating behind a corporate proxy that uses SSL inspection and other proxy shenanigans.)

                As george1421 mentioned, the Rom-O-Matic site was shutdown, mainly due to resources on the iPXE community and the will power to fund it, I suspect. I just personally liked this method, as it was a fast and easy way to generate images. Alas. Manually compiling is the way forward.

                When creating the image as mentioned above, (using the fog method linked by george1421) you take the image and add it to a USB key, depending if you wanted UEFI USB key or Legacy method, will depend on which image you use. (Some old devices crap out with UEFI, so I only mention this due to old devices, so results may vary.) The method above uses the UEFI images.

                Anyway hopefully I haven’t made it more confusing. 🙂

                1 Reply Last reply Reply Quote 0
                • L
                  louis.tasse @george1421
                  last edited by Jun 1, 2023, 4:35 PM

                  ((/assets/uploads/files/1685636674613-fos-usb-01-resized.jpeg) /assets/uploads/files/1685636634643-fos-usb-01-resized.jpeg) @george1421 said in Using FOG without PXE - FOG client on USB key:

                  https://forums.fogproject.org/topic/7727/building-usb-booting-fos-image

                  Hello george1421,

                  Got your image, created a USB bootable key (using Rufus) and booted the computer with success. While I was able to get a Fog menu and work with all items except the “1. Fog Image Deploy/Capture”. I tried first (scenario #1) by selecting the item menu and received errors. I then (scenario #2) tried to set a job on the Fog server for a “deploy” for the computer and got a different set of errors the most important seemed to be “unable to locate image store”. Attached are the pictures showing the logs/errors.

                  Thanks.

                  Louis.

                  FOS-usb-01.jpeg —> Fog
                  FOS-usb-02.jpeg —> scenario #1 (selecting item menu #1)
                  FOS-usb-03.jpeg —> scenario #2 (selecting item menu with a configured “deploy” job on Fog server)

                  G 1 Reply Last reply Jun 1, 2023, 8:24 PM Reply Quote 0
                  • G
                    george1421 Moderator @louis.tasse
                    last edited by Jun 1, 2023, 8:24 PM

                    @louis-tasse ok the first error is because you did not schedule the task first in the FOG ui. The “NULL” message indicates that there was no task found on the server. This fact is noted in the caveats in the tutorial.

                    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
                    • L
                      louis.tasse
                      last edited by Jun 8, 2023, 7:37 PM

                      Hello george1421,

                      Got everything working with the USB client.

                      Thank you for your help.

                      Louis.

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

                      279

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project