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

Fog Hostname problem after w10 SYSPREP

Scheduled Pinned Locked Moved Unsolved
FOG Problems
3
12
430
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.
  • J
    jeje3346
    last edited by Jan 8, 2025, 9:26 AM

    Hello everyone,

    Our environment :
    -fog server 1.5.9 on deb12
    -W10/W11 clients without fog client service

    With this AmaZing Fog, When i deploy image W10 without sysprep, the hostname is the one that i have written in Fog GUI, and all is fine.

    When i deploy image W10 with sysprep, the hostname is random and different of my Fogdatabase.

    In the unattend file i got <ComputerName></ComputerName> and with or without value it changes nothing, it’s not the fog hostname from GUI.

    In fog server, i saw variable called $hostname, is it possible to implemant this variable in the unattend file ?
    or another easy way is possible ?

    Need Help please. Thx

    R 1 Reply Last reply Jan 8, 2025, 6:58 PM Reply Quote 0
    • R
      rodluz Developer @jeje3346
      last edited by Jan 8, 2025, 6:58 PM

      @jeje3346 I have seen this issue when sysprep domains the computer through the unattend file. Once the computer is domained, FOG is not able to change the computer name. If this is the case, I would recommend you domain the computer through the active directory options in FOG or through a snapin instead of the unattend file.

      I would also recommend you upgrade your FOG install to the latest stable release 1.5.10.1629 since there have been a lot of improvements done since version 1.5.9.

      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

      J 2 Replies Last reply Jan 8, 2025, 8:23 PM Reply Quote 0
      • J
        jeje3346 @rodluz
        last edited by Jan 8, 2025, 8:23 PM

        @rodluz
        Thx you for tour answer. Well, at first and to this stape, we don t want any options for joining domain. That s why our unattend file is voluntary light.
        I will try a fog client installation on my golden image before sysprep then New capture and deploy to see if it changes something or not with the hostname.
        Moreover I will try to migrate on 1.5.10 like you suggest.
        I will tell you the results.

        R 1 Reply Last reply Jan 8, 2025, 9:49 PM Reply Quote 0
        • R
          rodluz Developer @jeje3346
          last edited by Jan 8, 2025, 9:49 PM

          @jeje3346 Oh yes the other thing I forgot in my previous reply is that you need to have the FOG client installed on the computer so that the name change can happen.

          If you are wanting to install the FOG client on your golden image, make sure that you disable the FOGService in the windows services. You can use this link for reference of how to do this correctly with sysprep. https://wiki.fogproject.org/wiki/index.php/FOG_Client#FOG_Client_with_Sysprep

          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
          • J
            jeje3346 @rodluz
            last edited by Jan 9, 2025, 7:42 PM

            @rodluz
            Hello rodluz,
            Well i follow what you suggest and it works with Fog client into the machine the Setup complete and auto reboot.

            I would have prefered a solution without the Fog client on machine but it seems impossible with sysprep stape.

            Thx a lot for your help!!

            1 Reply Last reply Reply Quote 0
            • J
              jeje3346
              last edited by Jan 9, 2025, 8:35 PM

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

              moderator @george1421 put an important information about possibility to update unattend file. So it would be possible to use Fog variable into the file.
              If it works like he says so it means that i don t need Fog client install on my golden image and the Setup complete cmd.

              If i understand, first in put in a post download script (/images/postdownloadscripts/myfogscript.sh)

              This :

              Unattend.xml path (note the case specifics in the file name and path)

              unattendfile=“/ntfs/Windows/Panther/unattend.xml”;

              And this :

              sed -i -e “s#<ComputerName>([^<][^<]*)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi” $unatendfile

              So it means that it could may be possible to change hostname without fog client on machine right?

              T 1 Reply Last reply Jan 9, 2025, 9:23 PM Reply Quote 0
              • T
                Tom Elliott @jeje3346
                last edited by Jan 9, 2025, 9:23 PM

                @jeje3346 Technically speaking, anything is possible.

                These postdownload scripts are customizable to your hearts content, so yes it’s possible, technically, but as far as getting support for your own scripts, we’ll try, but it’s still all best case.

                The FOG Client will do so in a well standardized method but if you don’t want to use that, that’s perfectly fine as well.

                We will still attempt to assist as required.

                Thank you,

                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
                • J
                  jeje3346
                  last edited by Jan 10, 2025, 10:25 AM

                  @Tom-Elliott
                  i think the postdownload possibility is just amazing cause you can personalize like you want.

                  in /images/postdownloadscripts/ :

                  fog.postdownload (default file)
                  fog.custominstall

                  1. in fog.postdownload (i call the created file)

                  . ${postdownpath}/fog.custominstall

                  1. in fog.custominstall (unattend declaration & sed command)

                  unattendfile=“/ntfs/Windows/Panther/unattend.xml”;

                  sed -i -e “s#<ComputerName>([^<][^<]*)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi” $unatendfile

                  Should be right ?

                  T 1 Reply Last reply Jan 10, 2025, 1:18 PM Reply Quote 0
                  • T
                    Tom Elliott @jeje3346
                    last edited by Jan 10, 2025, 1:18 PM

                    @jeje3346 it looks correct, yes.

                    You could test it by creating a simple example of the file and running the sed statement itself. Ultimately, though, it should work properly.

                    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

                    J 1 Reply Last reply Jan 10, 2025, 3:05 PM Reply Quote 0
                    • J
                      jeje3346 @Tom Elliott
                      last edited by Jan 10, 2025, 3:05 PM

                      @Tom-Elliott

                      script is working but something is wrong

                      postd2.JPG

                      it seems that fog cannot find or access to the unattend file (autounattend.xml)

                      i have read in a @george1421 post a special bloc like :
                      ####################

                      windows 10/11

                      osdiskpart=“/dev/sda2”;

                      mkdir /ntfs 2>/dev/null

                      mount.ntfs-3g “${osdiskpart}” /ntfs 2>/tmp/mntfail

                      mntRet=“$?”;
                      if [ ! “$mntRet” = “0” ]; then
                      echo “Failed to mount C:”;
                      cat /tmp/mntfail;
                      sleep 12;
                      exit 1;
                      fi
                      ####################

                      Should i put this in my fog.postdownload juste before my sed command or am wrong and another way exists ?

                      T 1 Reply Last reply Jan 10, 2025, 3:33 PM Reply Quote 0
                      • T
                        Tom Elliott @jeje3346
                        last edited by Tom Elliott Jan 10, 2025, 9:34 AM Jan 10, 2025, 3:33 PM

                        You would have a postdownload script of something like:

                        osdiskpart=“/dev/sda2”;
                        
                        mkdir /ntfs 2>/dev/null
                        
                        mount.ntfs-3g “${osdiskpart}” /ntfs 2>/tmp/mntfail
                        
                        mntRet=“$?”;
                        if [ ! “$mntRet” = “0” ]; then
                        echo “Failed to mount C:”;
                        cat /tmp/mntfail;
                        sleep 12;
                        exit 1;
                        fi
                        
                        unattendfile=“/ntfs/Windows/Panther/unattend.xml”;
                        sed -i -e “s#<ComputerName>([^<][^<]*)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi” $unattendfile
                        

                        Of course this assumes that /dev/sda2 is the windows main partition.

                        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

                        J 1 Reply Last reply Jan 10, 2025, 5:46 PM Reply Quote 0
                        • J
                          jeje3346 @Tom Elliott
                          last edited by Jan 10, 2025, 5:46 PM

                          @Tom-Elliott
                          The last problem was tha windows main partition ! Now it works perfectly ! Thx for your precious help.

                          Solved 🙂

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

                          133

                          Online

                          12.1k

                          Users

                          17.3k

                          Topics

                          155.3k

                          Posts
                          Copyright © 2012-2024 FOG Project