Hostname changing and drive's letter after deployment
-
@Tom-Elliott
Ok but it doesn’t work for me…By default the hostname in our image is STATIONXXX, after deployment on for example: STATION001 (His name in HOST MANAGEMENT), it remains unchanged (STATIONXXX)…
-
@Ph3noM Are your images sysprepped?
-
Just for clarity what do you mean by “fresh install”?
Do you have FOG 1.2.0 stable or a FOG 1.2.0 trunk version (a.k.a pre 1.3.0) installed?
Assuming you are using a trunk build, do you have these features enabled in:
FOG Configuration->FOG System Settings->FOG Service - Client Updater->
FOG_SERVICE_CLIENTUPDATER_ENABLED (checked)and
FOG Configuration->FOG System Settings->FOG Service - Hostname Changer
FOG_SERVICE_HOSTNAMECHANGER_ENABLED (checked) -
@RLane said:
Within sysprep and your unattend.xml file you can create a PS batch script to change the hostname. Only problem is this will require manual input rather than have FOG do it automatically.
This isn’t entirely true. You can have a post install script run a simple sed command to replace/change/edit the hostname or any other unattend.xml variable just after imaging and before the first OS boot. I do this today to update some location and OU specific variable in the unattend file.
For reference:
echo " * Setting the Computer name to [${hostname}]"; sed -i -e "s#<ComputerName>\([^<][^<]*\)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi" $unattendfilepath
Yes it did take quite a bit of head scratching to get that pattern match just right.
-
@Tom-Elliott
Nope, we used NewSID until now which was enough with xp.
I’ll try to sysprep a new image to test!Thanks you.
Another question : is it possible to modify or delete a partition just before deployment? (But not modifying the master image).
-
@Ph3noM I’m not asking if you are using sysprep to suggest you “NEED” to use it. WHen an image is sysprepped, it knows nothing about the registry values (sometimes), and other times it does. the Hostname_early fog setting is the item you’d likely be looking for, but I need more information.
What version of fog are you using (THe number in the FOG Logo Cloud)? What is the partition structure of your Windows system(s)?
-
I’m using FOG 1.2.0 stable (by “fresh” I mean “new”. Sorry I still have to improve my english ).
As described above, i’m on 1.2.0.
80% have: 1 disk with 2 partitions -
@george1421 @tom-elliott I stand corrected, thanks y’all. Not trying to hijack this, in the past we’ve used a manual PS+HTA script that allowed us to import them to a OU and rename them post-imaging.
-
@RLane No worries, all comments are welcome. That is the way we all collectively learn and grow. There are just different ways to go about doing the same thing.
The thing we need to keep in mind is the FOS (Fog Operating System) is based on linux and not Windows PE. So in a way we are restricted to only use linux available applications and with the same breath we are feed by being able to use some pretty powerful linux applications.
-
@Tom-Elliott said:
the Hostname_early fog setting item
I don’t find it on the web interface …
(Forgive me i am a beginner in the computer networking)
-
@Ph3noM said:
@Tom-Elliott said:
the Hostname_early fog setting item
I don’t find it on the web interface …
(Forgive me i am a beginner in the computer networking)
Web Interface -> FOG Configuration -> FOG Settings -> General Settings -> FOG_CHANGE_HOSTNAME_EARLY
-
Oh, my bad, thanks Wayne!
And i’m still stuck for hostname changing, it doesn’t work and i don’t know what to do ^^
-
@Ph3noM What do you mean by “does not work”? Did you find the setting? Tried deploying the client again? Still the old hostname? Rebooted the client a couple of times?
-
@Sebastian-Roth
Hi Sebastian,Yes the FOG_CHANGE_HOSTNAME_EARLY option is active.
And I tried all, with Win xp and Win10.I think i’m going to bring myself to use the fog client. ^^
-
Anyone have an idea ?
-
@Ph3noM Please schedule a debug deploy task (normal deploy task but tick the option “Schedule task as a debug task”), start the machine up and wait till you get to the shell. Then start cloning (command
fog
) and step through the tasking. When you get back to the shell run the following commands to see if the registry changes were done correctly - make sure to choose the correct windows (7/10 - won’t work for XP!) system partition for /dev/sdaX, e.g. /dev/sda2:shell> mkdir -p /ntfs shell> ntfs-3g -o force,rw /dev/sdaX /ntfs shell> reged -e /ntfs/Windows/System32/config/SYSTEM ... reged> cd ControlSet001\Services\Tcpip\Parameters reged> ls ... <Hostname> ... reged> cd ControlSet001\Control\ComputerName\ComputerName reged> ls ... <ComputerName> ... reged> q shell> umount /ntfs
See what you get for
<Hostname>
and<ComputerName>
…