14 Replies Latest reply on Feb 11, 2011 2:34 AM by Hirani

    Cannot join Windows 7 Client to a domain using OSD


      Hi Silvercoupe,


      I have tried following the steps you kindly shared in http://community.landesk.com/support/docs/DOC-7444, but the image once downlaoded boots back into Audit Mode and does not look like LANDesk sysprep 'unattend.xml' worked as it did not join to the domain etc.


      We are using Ghost 11.5.1 to capture and deploy the image. I have done all the required changes e.g. appplicaiton installs etc. After that I sysprepped it with the option "Enter System Audit Mode" and "Shutdown". Then I uploaded the image. After downloading the image back using LANDesk OSD it boots straight into Audit Mode and doesn't look like LANDesk copied the unattend.xml to the c: drive. Any help on this would be much appreciated.


      Our Core Server is: LDMS 9.0 SP2


      1. We have our own sysprep.xml file with various components. Not sure how LANDesk sysprep would merge the 2, as your post mentions not use a sysprep template in OSD

      2. We are using PXE boot from LANDesk

      3. The image has a hidden 100MB partition and the rest of the drive is one whole partition where the OS is installed. Is there a way to check if the OS volume is labelled C: in WinPE? This could be the place where things may be going wrong since nothing from the LANDesk unattend seem to have run.

      4. Non of the LANDesk Unattand.xml seem to have run and the machine boots right into Audit Mode


      To eliminate LD and PE and drive setup as the problem, I copied the LANDesk generated xml to the root of C: on my reference machine and then run sysprep manually without capturing as below:


      sysprep /audit /reboot /unattend:c:\unattend.xml


      It seemed to have gone through the motions of \sysprep\sysprep.exe /oobe /generalize /reboot after a reboot as I could see it on the screen. The machine then rebooted again and now I get an error as below:


      Windows could not parse or process the unattend answer file for pass [specialize].

      The settings specified in the answer file cannot be applied.

      The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup].


      To me this looks like the %computername% in the specialize pass, but may be wrong. Any ideas?


      Attached is my LANDesk generated unattend.xml from the \\corename\ldmain\landesk\files

      Let me know if you would like to also see our own Sysprep xml that we run manually once the image is finalised for capture and deploying. We were hoping LANDesk could merge the 2 in one just like how it was in Windows XP when using it as a template, but doesn't seem to be the case

        • 1. Re: Cannot join Windows 7 Client to a domain using OSD



          Looking at your XML, everything looks pretty good.  I think what you're dealing with is that LANDesk isn't downloading your unattend.xml during OSD, at least not to the C: volume, and TOKREPLW isn't properly replacing %COMPUTERNAME% with the correct Device Name from the LD database (probably because it can't find c:\unattend.xml).  Try this:


          1.  Do the manual sysprep again on your reference machine, but put a real computer name in for %computername% in the local unattend.xml.

          2.  Just for testing, remove the specific OU info from the unattend.xml, just let the machine be added to the default Computers container.  Let's go with a streamlined approach and get specific later.

          3.  Just to be safe, make sure your Domain Join info is using the FQDN of your domain.  I originally tried using a domain\username for the username and truncated the domain and it did not work.  Here's a snippet from mine (I put comments to the right, they should NOT be in the unattend):



          <component name="Microsoft-Windows-UnattendedJoin" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
                    <Domain>admin.schools.lcps</Domain>  'FQDN of domain, not truncated to just admin
                    <Username>username</Username>    'just the username, not domain\username
                  <JoinDomain>admin.schools.lcps</JoinDomain>    'FQDN of domain, not truncated to just admin



          I haven't worked with Ghost in quite a while.  I do everything with LD's ImageW v2 as it can capture all partitions into a single .TBI file.  It works great because combined with the other LD tools that should be running after laying the image down (again not sure if this still happens when using Ghost) it figures out where your SYSTEM and C: volumes are and works its magic to make everything bootable.  Maybe something else to try if you're not 100% tied to Ghost.


          Let me know if you get any further with the manual unattend.xml test and the specified computername.  Good luck.

          1 of 1 people found this helpful
          • 2. Re: Cannot join Windows 7 Client to a domain using OSD

            When trying to troubleshoot these kinds of issues I will often edit the OS Imaging script (advanced edit in LANDesk) and comment the last line by placing a ";" in front of it. That will stop the computer from rebooting after the image is laid down. Then you can open a command prompt in WinPE before reboot and check a few things...


            1. At the command prompt try doing a DIR of drive C: to make sure that it is the system drive. (You should see "c:\unattend.xml", "c:\Windows", etc.)
            2. Take a look at the unattend.xml file. (Type "Notepad.exe c:\unattend.xml" at the command prompt.) Scroll down to the [Specialize] section to see if LANDesk has injected the computer's device name correctly.
            3. You could also take a look at the section of unattend.xml where the computer joins the domain. Sometimes I've made a mistake in creating my xml file and instead of Domain, Username and Password I've ended up with Domain, Username, and Domain. (I think this happens mostly when I create the unattend file in Microsoft's WSIM tool. Probably I need to read the screens more carefully.)
            4. As for merging your Unattend.xml with the one that LANDesk injects during OSD - if I understand this correctly I don't think it happens that way. You can specify an "unattend.xml" when you sysprep, prior to capturing the image. But LANDesk OSD will inject it's own "unattend.xml" and use that when sysprepping the target computers. If your unattend file happens to be in the same location that LANDesk uses, yours will be over written. The key to merging your settings with the LANDesk settings is to edit the xml file in "<core server>\LDMain\LANDesk\Files", and incorporate your settings there. However I'd definitely agree with SilverCoupe - start with an unattend file that is plain vanilla and after you get it working, then you can start adding in your customizations.


            Just as a side note - after we switched to LANDesk 9 SP2 I found that my OSD scripts were being overwritten unexpectedly- losing our customizations. There is a new option in LANDesk 9 where you can right click on your OSD script in the LANDesk console and select "Disable Edit". I have done this with all my OSD scripts and it prevents the custom settings from disappearing. You won't be able to edit the script using the LANDesk wizard, but you will still have the "Advanced Edit" option.


            Good luck!

            • 3. Re: Cannot join Windows 7 Client to a domain using OSD

              Great suggestions as well.  I should have mentioned that I always Disable Edit on my OSD scripts.  The feature has been around since before LD9 I believe, but it can cause huge headaches if you've ever manually edited your OSD scripts, then went back and used the wizard.  Bye-bye modifications.


              If putting the COMPUTERNAME in manually works and the machine completes all it's passes and joins the domain, I would use Jayson's recommendations to verify if the unattend.xml is making it to C: and if %computername% is being published (it won't be if unattend.xml isn't making it to C:.  If this is the case, we may need to look at what Ghost is doing to the drive and if ther OSD script looks OK.  Can you ZIP up your OSD  .INI file and post it?

              • 4. Re: Cannot join Windows 7 Client to a domain using OSD

                Thanks Jayson for your assistance. I shall try this too once I have tested the manual execution of the LANDesk unattend.xml as per Silvercoupe's suggestion. Am currenlty, re-downloading the image on the reference machine. Will post back soon


                With regards to OSD Scripts being overwritten unexpectedly, LANDesk have just released a Patch for this (OSD-5317190.2)... http://community.landesk.com/support/docs/DOC-22422. We have been experiencing this as well. I haven't yet installed it on our core yet.

                • 5. Re: Cannot join Windows 7 Client to a domain using OSD

                  Hi Silvecoupe,


                  Editing the %COMPUTERNAME% in the unattend.xml with the actual hostname seems to work fine. It also added it to the correct OU in AD. I would have thought that if the machine is not in LANDesk DB it should then assign a default hostname i.e LD$MAC.


                  I have attached the OSD .ini. Looks like after the imaged is laid, post tasks seem to remove the volume, volume letters etc and then re-assign them. It could be that at this time the unattend.xml is injected in the wrong partition i.e the first partition which is the 100MB hidden partition - in our case we don't assign it a drive letter and the second partition is C:. I think i've seen this drive letter changes happening after the image has be laid and post PE tasks run in DOS window. I'll try and take a snapshot. Will now give a try to Jayson's suggestion. Let me know if you find anything obvious from the .ini file. Thanks

                  • 6. Re: Cannot join Windows 7 Client to a domain using OSD

                    It wouldn't have assigned a LD$MAC because LD wasn't in the loop.  You were doing all this offline basically.  If/when this works for you in PE it would have assigned a LD$MAC default computername.


                    Sounds like the XML is OK, so it's down to what Ghost/LD/PE is doing to the drive and if the unattend is downloading properly.  TOKREPL should work fine to inject the Computername, so long as it can find the file.


                    Your OSD script looks pretty different from my typical scripts.  That's probably because of Ghost vs Imagew, but I'm not sure.  For instance, you have a line item that's doing a straight FORMAT c: command.  Did you put that in or did LD put that there?  If you bang your head against the wall too long, try using ImageW v2 to capture the image and re-deploy.  It may clear up any of the drive creation issues you're having.  If Imagew v2 works, then it's definitely an issue between Ghost and some of the LD tools like FixWindows.  I don't use Ghost so I couldn't tell you if all the commands look OK, but I've been using Imagew and now v2 for years and they work great.  Switching your image capture/deploy tool, at least for testing, may save you soem headaches.


                    You'll know more after doing what Jayson recommended.  Good luck and lemme know.

                    • 7. Re: Cannot join Windows 7 Client to a domain using OSD

                      Having followed Jayson's suggestion I can now sort of see where the issue may be. When the volume gets wiped and partitions get re-assigned drive letters the hidden partition is give the C: letter and the actual drive where the OS is installed is D: drive. During this time the unattend.xml gets injected to the hidden partition since at the time it has the C: drive letter assignment. I think once the rest of the script runs, might be fixwindows etc, it seems to re-assign the drive letters again to give the 'OS installed' drive the C: drive letter and removes it from the hidden partition. Hope all this makes sense.


                      The line FORMAT c: is put by LANDesk when the script is generated


                      You might be right, this looks like more to do with Ghost and how LANDesk carries out the post task after image has been laid. I haven't used LANDesk version of imaging before. Would you know where the tools is in LDMS 9.0 SP2. Is it pretty straight forward as ghost?

                      • 8. Re: Cannot join Windows 7 Client to a domain using OSD

                        When using the LANDesk imaging tools, LD automatically determines where the SYSTEM partition is and the OS partition is when in WinPE, and you're exactly right that the SYSTEM partition shows up as C:.  The trick is, is the OS partition being correctly labeled as C: prior to the unattend.xml file download.  So far that's not the case.


                        Imagew v2 is what you'll wanna use.  It's exceptionally easy, and I'll give you one additional config that I use to create a single TBI file (image file).  The one thing to remember is that Imagew v2 is a sector-based imaging program as opposed to file-based (Ghost).  This means you can't easily "mount" it somewhere and add/remove files and folders from your reference image.  I've never had a reason to do this in my environment, and if I did I would account for it during OSD with custom line items.


                        Imagew v2 is located at \\CORENAME\LDMAIN\OSD\IMAGE V2.  Create a new capture script in the console and select Imagewv2 as the tool.  When you click "save" the pop-up comes up where you can view the actual command line.  Remove the /MAX:2GB (sorry if this isn't exact but you'll see it) command option.  This will save the image file as one file instead of spanning across multiple files.  Helpful if you need to stage the image on other servers.


                        When you create the deploy script, disable editing and have a look.  You should see that the script from using Ghost will be a little different.  LANDesk will want to create a new Unattend.XML, but you can use your existing one as a template.  Lemme know if this works for you and your drives are created/saved properly.

                        • 9. Re: Cannot join Windows 7 Client to a domain using OSD

                          I shall try ImageW V2 out. The reason for us having to use ghost is due the fact we encrypt the whole HDD after the machine goes on the Network. The encryption software writes to, if am right, to sector zero. Not sure how sector based imaging will work in this scenario. I guess there is no harm in testing this out, but am pretty sure that is the reason why we are stuck to ghost

                          • 10. Re: Cannot join Windows 7 Client to a domain using OSD

                            Looking at the OSD script you uploaded, it seems to me that the unattend.xml should be landing on C: drive if all the previous commands were successful. The script runs sequentially and the command to inject the unattend file is at REMEXEC38. This occurs after all the FixWindows and DISKPART commands which happen in REMEXEC27 through REMEX37.


                            There is some pretty good information in another forum thread - under the Provisioning section. It's a document posted by Mach6, a LANDesk support employee, and it has good information on how LDMS assigns drive letters and why all this jiggery-pokery is required when imaging Windows 7 machines. Even though you are doing Imaging rather than Provisioning, I'd suggest you check it out at http://community.landesk.com/support/docs/DOC-9639 and see if it helps with your troubleshooting.



                            • 11. Re: Cannot join Windows 7 Client to a domain using OSD
                              Jared Barneck SupportEmployee

                              Don't we have a setting in the wizard when creating an OSD script that allows you to select the partition of the C drive?  So if you have a hidden partition as partition 1 and so you need it to be 2, that should be selectable.

                              • 12. Re: Cannot join Windows 7 Client to a domain using OSD

                                Yup, but the question remains: why isn't it being done automatically?  Using Imagewv2 I leave the OS Partition set to 1 when building the deploy script and Win7 deploys fine.


                                Hirani, when you built the OSD script, did you select Partition 2 or leave it as the default Partition 1?  Your script has:


                                REMEXEC37=ldrun x:\cba8\FixWindows.exe 2


                                I don't see that 2 in my scripts.  Could be the problem?

                                • 13. Re: Cannot join Windows 7 Client to a domain using OSD

                                  Hi Rhyous,


                                  Yep there seems to be an option in OSD to select a partition where the sysprep fill will be injected. Not sure how well it works as it does not seem to make any difference. I left it as default before, which is 1 and then changed it to 2. If you look at the attached ini file i posted earlier, line 14 has got Partition=2

                                  • 14. Re: Cannot join Windows 7 Client to a domain using OSD

                                    Hi Silvercoupe,


                                    In the OSD wizard I selected partition 2 since the first partition is hidden default 100MB. I ahev also tried leaving it as default which is 1 and made no difference