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

    Capture and deploy image hostname always same

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    3
    6
    746
    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
      Lukaz
      last edited by

      Hello!

      I’m new here and I have just tested Fog as PXE boot server.

      I installed it on linux ubuntu, and everything works fine, execept when I set up linux mint on one of my test PC’s I had to put in hostname (“Laptop”) of the computer.
      When i cloned the computer it worked fine and no trouble at all, but when deploying image on other PC’s or laptops, the hostname is always changed to “Laptop”.
      I unchecked the box where it says “FOG Client - Hostname changer”, but the hostname has still changed.

      Can anyone tell me what I did wrong or is there a way that hostname of computer wouldn’t change and would be something computer would get from motherboard.

      Thanks!

      Tom ElliottT JJ FullmerJ 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @Lukaz
        last edited by

        @Lukaz For linux based hostnames, theres actual files that store the names. For windows there’s a registry that we can hackishly setup, but for LInux there’s a utility on most modern installs to the effect of hostnamectl and possibly others.

        Because of this, we don’t know where all the different names might be stored and we leave it alone.

        Because you captured the blocks of the disk (which includes the files as they were originally written) the device names are set to that of the captured host. It’s not really “changing” the names.

        To address this we do have a client utility that should be able to change the hostname for you to the damn of the actual machine based on what it is registered as under the UI, but it would mean installing the FOG Client on the image and using that image as the base for deploying to other machines.

        Of note, with the FOG CLient method, until the client performs the hostname change operation, the machine would still have the name as whatever the captured machines name was.

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        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

        L 1 Reply Last reply Reply Quote 0
        • L
          Lukaz
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • L
            Lukaz @Tom Elliott
            last edited by

            @Tom-Elliott so there isnt a file like virt-sysprep in FOG project in which the user could change username and password and computer name on the first boot after PXE deploy has finished?

            Best regards!

            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @Lukaz
              last edited by Tom Elliott

              @Lukaz No. not for linux at least, and technically not for windows either.

              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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
              • JJ FullmerJ
                JJ Fullmer Testers @Lukaz
                last edited by

                @Lukaz You could try doing a post download script that takes the hostname you set for that fog host and put it in the /etc/hostname file.
                I think there may be other locations that hostnamectl sets on newer linux builds, but this could still work.

                I haven’t done a linux post download script but you can see some other examples in these posts, mostly windows based, but I’m sure we can apply the idea to linux without too much trouble. Just gotta mount the client disk in FOS (Fog operating system that you boot into over the network for the imaging process) after imaging is done and inject the fog hots hostname variable (not sure what the var name is off the top of my head) into /etc/hostname on the client. It’s a bit of work initially, but once setup should just work from then on.

                https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection?_=1682187993801

                https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-script

                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

                156

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project