The partition captured needs to be smaller than the smallest partition you will deploy to. This is true if you are using LANDesk's ImageW tool, because it is sector based. File based imaging tools such as ghost or imagex don't contain partition information and don't need to be shrunk.
The easiest way to shrink a partition in LANDesk 9.0 is to open a command prompt from within WinPE and run
shrink <value given by querymax command above>
Note: This command is not available in the version of diskpart that ships on WinPE in 8.8.
You can also use gparted livecd or other utilities.
Thank you for the quick answer.
Just tried diskpart under WniPE and worked fine, except it would only let me shrink the partition down by about half. This is still exceptable so once again thanks for the help.
Cheers - Paul
Glad to hear it worked!
The diskpart shrink command doesn't move any data. That means if you've got any sectors used fairly far into the disk it will not allow it to go any smaller than that. You could try to defrag the device or something along those lines, but I don't think it's worth the effort, because like you said 1/2 size works for you, so there's not really any benefit to shrinking smaller.
Have you read this article.
It basically says to defrag and then run sdelete right before you capture. However, if you are going to shrink the drive, then I would do it in this order;
boot to winpe and shrink the drive
I wonder if there is a way to script shrinking the drive, so that a capture script using ImageW would also capture using hte smallest partition size possible.
in imagew.exe you can specify which partition to capture by you using the switches like /d:0@1 or /d:0@0x01. That particular switch would capture only the first partition on the first drive.
You can list out your partitions like this - imagew /L /d:0 > filename.txt
as for the diskpart, you could just do diskpart /s %path%\shrink.txt
and in your shrink.txt
select disk 0
select volume x (x being the volume you want to shrink)
shrink (shrink will still shrink, it won't be the maximum value as querymax but it usually is not that much off)
maybe that could be way, havn't tested any of this out though..just going with a thought
I don't know why this is, but every time I try to just run shrink without specifying a size to shrink by it attempts to run, and then fails. According to diskpart's documentation (or just typing help shrink) it should be the same as finding out the max and trying to shrink by it. I haven't had any luck with that.
If anyone tries it and gets it to work can you post that on here so I can hopefully learn what I'm doing wrong?
I just did it and works well on mine
I did the following:
SELECT DISK 0
SELECT VOLUME C
Successfully shrunk 19 GB
I think I was doing
select disk 0
select part 1
I'll try doing it to the volume. If you are selecting a volume do you need to select disk 0? Couldn't that be skipped?
Yes you should be able to bypass that, selecting disk 0 has been a habit forming thing for me, so i just automatically type it in whenever i launch diskpart