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

    Early hostname change not working (win7)

    Scheduled Pinned Locked Moved
    Windows Problems
    4
    19
    6.1k
    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.
    • JunkhackerJ
      Junkhacker Developer
      last edited by

      exactly what do you mean by “not being prepared in any way”
      the very fact that you have a prepared, pre-installed image of a computer that you’re deploying is “preparing” it, unless you’re deploying a factory created default image.

      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
      • E
        emkey
        last edited by

        Well, I mean that I did not perform any special preperation tasks for deployment with fog. I took an image from a system as it is being used, without any special preperation in terms of sysprep, etc. Just booted one of my systems into pxe and pulled the image. When I redeployed it I expected to get the hostname changed, didn’t happen.

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

          When you say the system is not prepared in anyway, is the uploaded image already joined to the domain? Is the hostname different.

          Your phrasing seems a we bit odd to me. Are these systems registered with FOG? They must be registered in order to change the hostname whether by the FOG Client or after the image. What’s the boot menu look like? Is hostname being sent and being sent 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

          1 Reply Last reply Reply Quote 0
          • E
            emkey
            last edited by

            Well, I am not sure if there is more to registering a system than what I did. So here are exactly the steps I did.

            1. Set up ubuntu server.
            2. Follow the guide on the website to install fog.
            3. Log in to web interface and add new image file (win7, Multiple Partition Image - Single Disk (Not Resizable) - (2))
            4. Add new Host by Mac address and hostname (inserted the new name i wish to have, lets say NEW1) and added the image
            5. Checked that early hostname change is enabled (unchecked and rechecked to make sure there is no display error)
            6. created upload task, restarted system, uploaded image
            7. created download task, restarted system, downloaded image.
              result: hostname unchanged, expected NEW1, but still OLD1

            This should be the steps I took if i didn’t miss something. And the computer I’m testing with is not joined to a domain.

            1 Reply Last reply Reply Quote 0
            • JunkhackerJ
              Junkhacker Developer
              last edited by

              hostname change early should be working properly under those circumstances. how are you checking the hostname?

              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
              • E
                emkey
                last edited by

                I just use right click on Computer, Properties. But there I still get the unchanged old name.

                1 Reply Last reply Reply Quote 0
                • JunkhackerJ
                  Junkhacker Developer
                  last edited by

                  could you please use regedit to check the values stored in [FONT=monospace][COLOR=#ba2121]HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName\ComputerName[/COLOR][/FONT]

                  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
                  • E
                    emkey
                    last edited by

                    I will check it tomorrow morning, I am currently not at the place anymore. Thanks already for all the help.

                    1 Reply Last reply Reply Quote 0
                    • E
                      emkey
                      last edited by

                      I just checked the registry and it still tells me the old hostname. A search for the new hostname inside the registry didn’t find any results, too.

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

                        We’ve have the same issue over here. None of our stations in Windows 7 is changing to the value registered in the FOG system. They keep the old one.

                        1 Reply Last reply Reply Quote 0
                        • E
                          emkey
                          last edited by

                          Could it possibly be that i have to change some setting to run the hostname change task like mentioned in this thread? [url]http://fogproject.org/forum/threads/change-windows-hostname-early-just-after-imaging-before-booting.4348/[/url]

                          I don’t think the last partition deployed is the windows partition, so if the default settings didn’t change this could be our problem. Can you tell me where to look at to solve this problem? I wasn’t able to find these settings as I don’t have the folder /bin/fog

                          1 Reply Last reply Reply Quote 0
                          • E
                            emkey
                            last edited by

                            Okay, I got the problem fixed. The issue really was the script only applying the hostname change to the last partition restored. These are the steps I’ve done:

                            root@e21a101:~# cd /var/www/fog/service/ipxe/
                            root@e21a101:/var/www/fog/service/ipxe#
                            root@e21a101:/var/www/fog/service/ipxe# xz --decompress init.xz
                            root@e21a101:/var/www/fog/service/ipxe# mkdir initmountdir
                            root@e21a101:/var/www/fog/service/ipxe# mount -o loop init initmountdir
                            root@e21a101:/var/www/fog/service/ipxe# vim initmountdir/bin/fog.download

                            Then I added the changeHostname call to line 281 like the following:
                            268 elif [ “$imgType” == “mps” ]; then
                            269 parts=fogpartinfo --list-parts $hd 2>/dev/null;
                            270 diskLength=expr length $hd;
                            271 for part in $parts; do
                            272 partNum=${part:$diskLength};
                            273 echo " * Processing Partition: $part ($partNum)“;
                            274 sleep 2;
                            275 imgpart=”$imagePath/d1p$partNum.img";
                            276 if [ ! -f $imgpart ]; then
                            277 echo " * Partition File Missing: $imgpart";
                            278 else
                            279 writeImageMultiCast $part
                            280 fi
                            281 changeHostname;
                            282 done

                            root@e21a101:/var/www/fog/service/ipxe# umount initmountdir/
                            root@e21a101:/var/www/fog/service/ipxe# rmdir initmountdir
                            root@e21a101:/var/www/fog/service/ipxe# xz -z -9 -C crc32 init

                            That’s it. This way it works perfectly for me. But keep in mind this is a rather quick and dirty fix and only applies to distribution by multicast with a mps type image (Multiple Partition Image - Single Disk (Not Resizable) - (2))! So let’s hope that there will be a clean change to the repos that targets all type of distributions and images.

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

                            160

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project