Hostname Change & Joining Domain Before Sysprep Runs (XP & Win7!)


  • Developer

    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:

    1. No more reboots required!
    2. Makes imaging quicker and if snapins aren’t used stops the need for the FOGClient
    3. Robust and hands the responsibility to sysprep and has never failed (been using for 12months)
    4. Works for XP, Win7 x64 & x86.

    Cons (as the code stands):

    1. Conflicts with hostname change early as this would no longer be required.
    2. requires sed package added to init.gz (Although a good guide on how modify the init exists in the wiki)
    3. 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.
    4. Would need to get the init.gz to decrypt the ad password like the FOGClient.
    5. 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!



  • I would really like to implement this solution as well, any chance of getting a complete tut?



  • [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


  • Developer

    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 :-)



  • 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.


  • Developer

    Glad I could help :-)



  • 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.



  • 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.


  • Developer

    This post is deleted!

  • Developer

    This post is deleted!

Log in to reply
 

361
Online

38982
Users

10712
Topics

101678
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.