Early hostname change not working (win7)
-
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?
-
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.
- Set up ubuntu server.
- Follow the guide on the website to install fog.
- Log in to web interface and add new image file (win7, Multiple Partition Image - Single Disk (Not Resizable) - (2))
- Add new Host by Mac address and hostname (inserted the new name i wish to have, lets say NEW1) and added the image
- Checked that early hostname change is enabled (unchecked and rechecked to make sure there is no display error)
- created upload task, restarted system, uploaded image
- 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.
-
hostname change early should be working properly under those circumstances. how are you checking the hostname?
-
I just use right click on Computer, Properties. But there I still get the unchanged old name.
-
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]
-
I will check it tomorrow morning, I am currently not at the place anymore. Thanks already for all the help.
-
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.
-
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.
-
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
-
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.downloadThen 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 doneroot@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 initThat’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.