Justas Posted September 14, 2007 Share Posted September 14, 2007 Hello all, is there a way to have the file check the max size of the HDD and create a partition to that size? At the moment I am using different floppies for different HDD sizes, and it would be nice to make one floppy for all HDD sizes. However if I make it to a max size it will give an error that it cannot partition to that size and fail. That leaves me with a couple options. One I make the partition to 20GB and resize it every install. Or two I partition each drive manually. I would rather have it auto partition to save some time since I make several machines at one time. Thanks for any advice. Link to comment Share on other sites More sharing options...
Br4tt3 Posted September 17, 2007 Share Posted September 17, 2007 Hi,And the answer is WinPE 2.0 and diskpart.exe scripts..... u can add tons of logic, or create a nice .hta GUI and use .vbs for the logic behind it. Anyway, start of with WinPE instead of floppies, .vbs instead of batch and it will solve it for u. This forum contains loads and loads of examples when using diskpart /s scripts..... search and u will find!Good luck to u... Link to comment Share on other sites More sharing options...
IcemanND Posted September 17, 2007 Share Posted September 17, 2007 What are you using to partition the hard drive? Most utilities will create a partition to the full size of the drive without having to do anything. Link to comment Share on other sites More sharing options...
Justas Posted September 17, 2007 Author Share Posted September 17, 2007 I am still using PE tools form original Vista release lol. Probably my problem to start with. The way it described took over 2 hours to complete and distribute 1 image with its "auto" partition. So I have been using different answer files for different HDD sizes and doing fresh installs to save time. And I don't use any other partition tools. I want to know how to get PE tools answer file to do it for me so I don't have to go back and redo the partition.Thanks for he advice, the forum digging begins lol Link to comment Share on other sites More sharing options...
Br4tt3 Posted September 18, 2007 Share Posted September 18, 2007 (edited) Hi again,So to sum things up: As I understand it, ur problem is that u have to use specific unattend files (indicating diffrent sizes of the drives) for diffrent images? I would imagine that the problem is that u are using a sector based imaging application (like ghost..) and NOT the imagex.exe cli for .wim based images? Remember that .wim is file based images and not sector based, meaning, the size of the drives of the gold machine is not replicated within the image! I might have misunderstod u but for more info on this:1. Download the WAIK - free of charge for Vista and WinPE 2.0 and open the .chm files that comes with it.2. Search for "DiskConfiguration" and it will show u:<DiskConfiguration> <WillShowUI>OnError</WillShowUI> <Disk> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> <CreatePartitions> <CreatePartition><!-- Create primary partition, 20 GB --> <Order>1</Order> <Type>Primary</Type> <Size>20000</Size> </CreatePartition><!-- Create extended partition and fill the rest of the hard disk --> <CreatePartition> <Order>2</Order> <Type>Extended</Type> <Extend>true</Extend> </CreatePartition><!-- Create logical partition within the extended partition, 6 GB --> <CreatePartition> <Order>3</Order> <Type>Logical</Type> <Size>6000</Size> </CreatePartition> </CreatePartitions> </Disk></DiskConfiguration>3. For extensive help on the diskpart cli, type diskpart and hit search.I highly recommend that u use file based imaging instead of sector based if that is what u are doing... it is more smooth and still, if u are using imagex.exe, it is free of charge...I didnt understand where the following:"...way it described took over 2 hours to complete and distribute 1 image with its "auto" partition"In case it took 2 hours to perform the diskpart script for example, it would be a matter of a bad disk controller driver or even a faulty disk controller....For some of our development workstations, we use WMI to query for the machine model type, and depending on the result, we present a specific answer file for that installation. U can for example use BDD to help u acchieve this... Edited September 18, 2007 by Br4tt3 Link to comment Share on other sites More sharing options...
Justas Posted September 18, 2007 Author Share Posted September 18, 2007 At the moment I am doing FRESH installs with different answer files for different HDD sizes. And I currently don't have time to play with Vista, it will have to wait for awhile, but when I was using Vista when it first came out I tried doing the Network share of the image and having ImageX image each HDD (Which you could specify the HDD size). However this process took nearly 2 hours because it would format the HDD before it would image it. I am not aware of any switches I could use to turn that format off, or change it to a quick format. But when I get some time to mess with Vista I will read through it again. And at the moment customers do not want more then 1 disk. So I cannot use an extended partition to fill the drive . At least I still have all my old batches made up somewhere so I don't have to start completely from scratch lol... Link to comment Share on other sites More sharing options...
IcemanND Posted September 18, 2007 Share Posted September 18, 2007 if you use the format command within diskpart it has a /quick switch to quick format the drive. If you are creating just a single partition on the drive you do not need to specify a size for the Primary partition it will by default create a partition the size of the available disk space if no size switch is supplied. Link to comment Share on other sites More sharing options...
Justas Posted September 18, 2007 Author Share Posted September 18, 2007 The answer file wont let me leave size empty Link to comment Share on other sites More sharing options...
IcemanND Posted September 18, 2007 Share Posted September 18, 2007 version of diskpart maybe? Here is the script I use, creates a primary partition the full size of the drive and formats ntfs.select disk 0cleancreate partition primaryselect partition 1format fs=ntfs label="system" quickassign letter =cactiveexit Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now