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

USB Network Adapters

Scheduled Pinned Locked Moved
FOG Problems
fogapi-psmodule
5
8
872
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.
  • R
    Richard Wise
    last edited by JJ Fullmer Mar 31, 2023, 7:38 AM Sep 9, 2021, 9:55 AM

    We have recently acquired 170 laptops that do not have built in wired network ports so we have purchased a batch of 30 USB network adapters. The issue we have is that as the laptops are identified by the network adapters MAC address when one laptop is registered if we reuse a USB network adapter on another laptop it comes up as already registered with the original laptops hostname, so we then have to identify which USB adapter is being used and manually change the hostname on the fog server to the new hostname and then deploy the image (meaning we would only be able to add 30 hosts rather than the full 170). Is there a way to identify different hosts other than by using the network adapters MAC address?

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Sep 9, 2021, 4:09 PM

      @richard-wise said in USB Network Adapters:

      Is there a way to identify different hosts other than by using the network adapters MAC address?

      The short answer is no. Now the longer answer: This has been discussed a couple of times over the years but we never got to a final working solution. If you are keen you can work on this part of FOG.

      The other possible solution is that some device firmware allows for an internal MAC address (e.g. from the wireless adapter) to be seen instead of the USB network adapter MAC address.

      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
      • R
        Richard Wise
        last edited by Sep 16, 2021, 10:28 PM

        I have been having a think about this. I use a postdownload script to update the unattend file with the computername. Could I add the USB Network adapters as nonspecific hosts in fog and add them to a group, then in this postdownload script add a section that see’s if the host is in this specific group and if it is then look at the system serial number from the BIOS (DMI) then using if or case find the serial number in a list and return the corresponding hostname, which can then be updated in the unattend file. If so would I need to add all 170 laptops info in to the actual postdownload script or can the script be set to look at an external csv file?

        G J 2 Replies Last reply Sep 18, 2021, 1:15 AM Reply Quote 0
        • G
          george1421 Moderator @Richard Wise
          last edited by Sep 18, 2021, 1:15 AM

          @richard-wise Do you use the FOG server to manage the target computers post deployment or do you just load and go with imaging?

          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!

          R 1 Reply Last reply Sep 20, 2021, 12:33 PM Reply Quote 0
          • R
            Richard Wise @george1421
            last edited by Sep 20, 2021, 12:33 PM

            @george1421 Just deploy and go, I don’t use the fog client.

            G 1 Reply Last reply Sep 20, 2021, 9:25 PM Reply Quote 0
            • G
              george1421 Moderator @Richard Wise
              last edited by Sep 20, 2021, 9:25 PM

              @richard-wise said in USB Network Adapters:

              Just deploy and go, I don’t use the fog client.

              OK good. So how do you name your systems? Is it something that can be calculated or prompted for during imaging?

              In our case we use the load and go method, where the system name is calculated based on the install site and asset tag of the computer. We don’t use the fog client either. There is no need to register, we just pxe boot and pick deploy image. The post install script does everything to make the target system unique and update the unattend file. It sounds similar to what you do. We don’t worry about usb adapters or having the same mac address because that info is never stored.

              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
              • J
                Junkhacker Developer @Richard Wise
                last edited by Junkhacker Sep 22, 2021, 1:10 PM Sep 22, 2021, 7:09 PM

                @richard-wise if you go the route of using an external csv file, might i suggest putting it in the /images/postdownloadscripts directory of the fog server? it’s a location that will be mounted anyway

                signature:
                Junkhacker
                We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                1 Reply Last reply Reply Quote 0
                • J
                  JJ Fullmer Testers
                  last edited by Oct 8, 2021, 2:17 PM

                  My solution for this problem has been to use the api the remove usb macs when my provisioning script is done. I have it working by using the client.
                  The basics are

                  • Computer gets registered with usb adapter
                  • My custom provisioning starts and the fog service is started which will add pending macs
                  • I leave the usb adapter plugged in until my provisioning is complete (so software install and whatnot happens over ethernet not wifi)
                  • Last step of provisioning uses a powershell api function to remove any existing usb macs (I have a saved list in the powershell of macs in my code)
                  • Adapter can then be removed and used on the next device

                  My custom functions uses my published fogapi powershell module, particularly this function https://fogapi.readthedocs.io/en/latest/commands/Remove-UsbMac/
                  Here’s a link to the code on github https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Remove-UsbMac.ps1
                  The function also handles making a new mac the client found be the primary mac if the usb mac is the current primary.
                  If you’re not using the client, you could also create a custom automation to find the mac addresses of the machine during a postscript/firstlogon/provisioning step and have it use https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Add-FogHostMac.ps1 to add a new unique mac then use the remove-usbmac function to remove specified usb macs.

                  If you’d like more info or examples I’d be happy to help, just wanted to offer a quick overview of a possible solution.

                  Have you tried the FogApi powershell module? It's pretty cool IMHO
                  https://github.com/darksidemilk/FogApi
                  https://fogapi.readthedocs.io/en/latest/
                  https://www.powershellgallery.com/packages/FogApi
                  https://forums.fogproject.org/topic/12026/powershell-api-module

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

                  155

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project