• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

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

    Scheduled Pinned Locked Moved
    General
    5
    10
    8.2k
    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.
    • Lee RowlettL
      Lee Rowlett Developer
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • Lee RowlettL
        Lee Rowlett Developer
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • Lee RowlettL
          Lee Rowlett Developer
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • D
            dvlsg
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • D
              dvlsg
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • Lee RowlettL
                Lee Rowlett Developer
                last edited by

                Glad I could help 🙂

                1 Reply Last reply Reply Quote 0
                • P
                  Paul Moisant
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • Lee RowlettL
                    Lee Rowlett Developer
                    last edited by

                    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 🙂

                    1 Reply Last reply Reply Quote 0
                    • M
                      Marco Lohnen
                      last edited by

                      [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

                      1 Reply Last reply Reply Quote 0
                      • B
                        Bill
                        last edited by

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

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        149

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project