• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.
  • E
    emkey
    last edited by Jul 4, 2014, 11:03 AM

    Hello there,

    I’m looking for a deployment solution for a kind of special environment where I have to deploy an win7 image via multicast (works fine with fog) and have to change the hostname. The problem is that I am not able to prepare the computer before taking the image.

    As I understand the documentation right I can do this by using early hostname change without having to install any software into the image (proprietary solution like Symantec Ghost or Acronis Snap Deploy can do this, too).

    At the end of the download task the script states that the hostname change has been done. But when the system is booted up it still tells me the old hostname defined in the image file.

    Am I misunterstanding the process or is this feature not working as intended? I would appreciate any help, thank you very much.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jul 4, 2014, 11:06 AM

      This depends. How are you preparing the system? Is it sysprepped/generalized and set into an OOBE state? If this is the case, this is most likely why you’re not seeing the system change its name. Also, what version of FOG are you using?

      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 Jul 4, 2014, 11:14 AM

        No, the system is not being prepared in any way as this is not possible in our environment. So no sysprep or anything.

        I am running a fresh install of fog 1.1.2 on ubuntu server 12.04.04 LTS.

        1 Reply Last reply Reply Quote 0
        • T
          Tom Elliott
          last edited by Jul 4, 2014, 11:21 AM

          I’m pretty sure this works as expected, is HOSTNAME_EARLY actually enabled? Are the hosts registered properly with FOG?

          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 Jul 4, 2014, 11:28 AM

            On the web interface FOG Configuration > FOG Settings > General Settings > FOG_CHANGE_HOSTNAME_EARLY is enabled.

            Which information has to be provided to register the hosts properly? Currently they are defined with mac address, hostname I want them to get and host image file (which is set to type win7, multiple partition image - single disk - not resizable).

            Anything else to set up?

            1 Reply Last reply Reply Quote 0
            • E
              emkey
              last edited by Jul 4, 2014, 11:57 AM

              And the setting also seems to be enabled in the database:

              | 88 | FOG_CHANGE_HOSTNAME_EARLY | This is an experimental feature that will can be used to change the computers hostname right after imaging the box, without the need for the FOG service. (1 = enabled, 0 = disabled). | 1 | General Settings |

              1 Reply Last reply Reply Quote 0
              • E
                emkey
                last edited by Jul 7, 2014, 6:50 AM

                Is there any way to debug this problem / enable a helpful logfile for this function? I really like your project and would like to use it, but without the early hostname change it is not an option for me.

                I would really appreciate if you could give me some hint where to look out for the problem.

                1 Reply Last reply Reply Quote 0
                • J
                  Junkhacker Developer
                  last edited by Jul 7, 2014, 2:52 PM

                  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 Jul 7, 2014, 3:20 PM

                    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
                    • T
                      Tom Elliott
                      last edited by Jul 7, 2014, 3:23 PM

                      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 Jul 7, 2014, 3:44 PM

                        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
                        • J
                          Junkhacker Developer
                          last edited by Jul 7, 2014, 4:07 PM

                          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 Jul 7, 2014, 4:15 PM

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

                            1 Reply Last reply Reply Quote 0
                            • J
                              Junkhacker Developer
                              last edited by Jul 7, 2014, 4:24 PM

                              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 Jul 7, 2014, 5:02 PM

                                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 Jul 8, 2014, 7:21 AM

                                  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 Jul 8, 2014, 3:44 PM

                                    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 Jul 9, 2014, 3:57 PM

                                      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 Jul 11, 2014, 10:07 AM

                                        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
                                        1 / 1
                                        • First post
                                          12/19
                                          Last post

                                        155

                                        Online

                                        12.0k

                                        Users

                                        17.3k

                                        Topics

                                        155.2k

                                        Posts
                                        Copyright © 2012-2024 FOG Project