derniwi Posted January 21, 2010 Posted January 21, 2010 Hi,I'm distributing the Windows 7 using MDT 2010. My problem is the partitioning of the hard disk.The default entry in the task will kill all partitions and create the small BDEdrive and one big partition.On our notebooks we have allready a second partition for the user documents, so I don't like to get all partitions destroyed. I modified the task so it will only repartition if the existing partitions doesn't match using a WMI filter. But then the OS partition won't be formatted. The second problem is we have some notebooks with a diagnostic partition.At least, all the automatics I could plan won't be as safe as it could be. The best way for me would be running the Windows 7 partition wizard which will be called if Windows is installed from the DVD. But I can't find anything on the DVD which looks like this wizard, I also extracted the boot.wim, also I can't find anything there.What else could I do? An other partitioning tool might be a solution, but it should also create the BDEDrive automatically.In the second step it would be nice if the partitioning would be able to return the partiton number for setup, so the Windows image would be distributed to this partition. It would also be ok to create some distribution tasks and select the right one using WMI.Best regards,Nils.
MrJinje Posted January 21, 2010 Posted January 21, 2010 (edited) The best way for me would be running the Windows 7 partition wizard which will be called if Windows is installed from the DVD.Did you try removing the snip of code that prevents the partition GUI from showing. I am assuming were talking about the same installation as your other thread. Change this <WillShowUI>OnError</WillShowUI> to this during the windowsPE pass.<OSImage><WillShowUI>Always</WillShowUI>What else could I do? An other partitioning tool might be a solution, but it should also create the BDEDrive automatically.Otherwise, it wouldn't be too hard to wrap a batch or VBS script around diskpart (which is available in boot.wim), and have it first check for existing partitions, before it decides if it needs to create any partitions. http://support.microsoft.com/kb/300415 Edited January 21, 2010 by MrJinje
derniwi Posted January 21, 2010 Author Posted January 21, 2010 Yes, it is the same installation.And I'm not looking for a wrapping script, just the GUI partitioning tool from the Win 7 DVD.I'll tried your suggestion, but at this point some files (drivers) are already copied to the hard disk. So this won't work.A wrapping script like ZTIDiskpart.wsf might be possible, but this is not really the solution I'm looking for.
derniwi Posted January 27, 2010 Author Posted January 27, 2010 Hi,ok, I do the following trick now (MDT 2010, installation task):1) set a new variable MYREPARTITION=true.2) set the variable MYREPARTITION=false if all of the following WMI requests are true: SELECT * FROM Win32_DiskPartition WHERE DiskIndex=0 AND Index=0 AND Size>83886080 AND Size<125829120 SELECT * FROM Win32_DiskPartition WHERE DiskIndex=0 AND Index=1 AND Size>30064771072 AND Size<34359738368 The first checks if the BDE boot partition exists, which should have 100MB, the check is if the size is between 80MB and 120MB. The second select checks for the system partition, whichs size should be between 28GB and 32GB.3) Repartition and format the hard disk using a textfile, if MYREPARTITION is true.4) Only format the hard disk using a textfile, if MYREPARTITION is false.I use this four steps because there is no if - then - else possibility.The repartition and format text file contains:SELECT DISK 0CLEANCREATE PARTITION PRIMARY SIZE=100SELECT PARTITION 1FORMAT FS=NTFS LABEL="Boot" QUICKATTRIBUTES VOLUME SET NODEFAULTDRIVELETTERACTIVECREATE PARTITION PRIMARY SIZE=30720SELECT PARTITION 2FORMAT FS=NTFS LABEL="System" QUICKASSIGN LETTER=CCREATE PARTITION PRIMARYSELECT PARTITION 3FORMAT FS=NTFS LABEL="TrueCrypted" QUICKATTRIBUTES VOLUME SET NODEFAULTDRIVELETTEREXITAnd the format only text file looks this:SELECT DISK 0SELECT PARTITION 1FORMAT FS=NTFS LABEL="Boot" QUICKACTIVESELECT PARTITION 2FORMAT FS=NTFS LABEL="System" QUICKASSIGN LETTER=CEXITMaybe this might help someone else.I know that this is not the solution I was looking for, but after this the laptops should be setup identically. And it is possible to use more of this constructs for separate setups of desktop pcs and notebooks.Regards, Nils.
derniwi Posted January 28, 2010 Author Posted January 28, 2010 Hi,ok, the partitioning seems to work, but now I can't capture and image anymore.If I PXE boot and select "Run the Deployment Wizard to install a new Operating System", the select my testing task (and answer the other questions) and select "Capture an image of this reference computer", Windows 7 installs, sysprep is called and reboot the computer to Windows PE. But then I get the first question of the PXE Win P boot ... and the system won't be captured.Does the MDT internal disk partitioning (ZTIDiskpart.wsf) something else? I tried to find out what happend, but found nothing yet. If I disable my partitioning and enable the default, everything is fine.I also tried to partition without the BitLocker partition, but this also won't work.Any ideas?
derniwi Posted February 2, 2010 Author Posted February 2, 2010 I didn't find a really good solution. But this works for me:I created two tasks, one for the Win 7 and common application installation (reference setup), and another for the final deployment. In the first I use the biuld in partitioning so the capture will work. The second one will use diskpart and text files depending on the variable state.So the reference setup will always wipe the hard disk, the deployment will only repartition once. If a re-installation is necessary the data on the notebooks (drive D:) should be kept. Since the data has to be backed up it would not be a big problem if the partition is destroyed, but it is a big waste of time if 50GB or more has to be copied from the network to a local encrypted drive.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now