Hostname Change & Joining Domain Before Sysprep Runs (XP & Win7!)
-
Hi All,
As this would be a lengthy tutorial to show you how to add this to FOG i thought i would give a summary first and if anyone is interested pm me and i’ll go through in detail, if enough people interested and find it easy to implement and happy with it, i’ll post the tutorial.
How it works:
Additional code added to the fog file within init.gz and a couple of .php files added to the service folder on the fog server. Just after fog has deployed the image, the code queries the fog database and gets fog to change the sysprep.inf/unattend.xml file to the information accordingly. so when the machine boots into sysprep it will have the right hostname and ad details if required.Pros:
- No more reboots required!
- Makes imaging quicker and if snapins aren’t used stops the need for the FOGClient
- Robust and hands the responsibility to sysprep and has never failed (been using for 12months)
- Works for XP, Win7 x64 & x86.
Cons (as the code stands):
- Conflicts with hostname change early as this would no longer be required.
- requires sed package added to init.gz (Although a good guide on how modify the init exists in the wiki)
- Alot of information is hardcoded (can be easily changed but would need to be put into variables if considered for fog to be universal - maybe be able to change the variable and info set in fog settings page?):
Hardcoded example - location of sysprep.inf/unattend.xml. - Would need to get the init.gz to decrypt the ad password like the FOGClient.
- unattend.xml must contain certain empty options line to suceed.
This has really helped and shaved around 10mins off our imaging time (suprising how long two reboots can take and waiting for snapin to checkin) the snapins can now be deployed almost instantly!
-
This post is deleted! -
This post is deleted! -
Phew. You’re right, you worked hard on this, haha.
I’ll see what I can do about finding time to look into it. It may be a while - I’m going to be out of town for a bit after today. But I’ll check back in when I get time.
-
Got it working. I ended up working with a simplified version. We’re currently only using Windows 7, so I didn’t need any of the XP sections, and I actually have a different solution set up for joining the domain so I didn’t include that either – where I work, each domain user account is setup as a local admin on their own laptop (but not anywhere else), so I wrote some vbscript that handles that, joins the domain, restarts, and automatically logs in as the user.
But! Your post was very, very helpful in showing me how to get the information from mysql using php (haven’t ever worked with php before), and using sed to replace variables in files. So thanks for taking the time to post this! I really appreciate it.
-
Glad I could help
-
I am looking at doing something like this.
What support will version 0.33 have for this? I’d hate to recreate the wheel if I don’t need to.
By the way, I am using version 0.32 of FOG.
-
0.33 already has some alternative for changing the hostname by making changes using reg files. (HOSTNAME EARLY) this would conflict with this and i don’t it’s being included in 0.33. it would be same process and code for 0.33 though
-
[quote=“Lee Rowlett, post: 7954, member: 28”]Hi All,
As this would be a lengthy tutorial to show you how to add this to FOG i thought i would give a summary first and if anyone is interested pm me and i’ll go through in detail, if enough people interested and find it easy to implement and happy with it, i’ll post the tutorial.
[/quote]Hi Lee, I’m really interested in your solution.
Could you give me some more details or put up a tutorial?Thanks!
Marco
-
I would really like to implement this solution as well, any chance of getting a complete tut?