RabbieBurns Posted June 22, 2010 Posted June 22, 2010 I messed up the first 30 laptops of this batch that i did to day, in that I somehow had ghost use the whole drive rather than make a partition the size of the image. Rather than go round all 30, is there some way I can script a startup script that will repartition everyting after, say, 85gb into another drive?
srochford Posted June 22, 2010 Posted June 22, 2010 I'm assuming Windows 7 so run diskpart and type list volume this will show you the volumes on your machine (for Windows 7, vol 0 is probably the boot volume - about 100Mb in size - vol 1 is the rest of the disc and vol 2 is the DVD but check; the volume number really matters!) In a batch file use these commands: diskpart select volume 1 shrink desired=85000 where the volume you select is the one you found. 1
RabbieBurns Posted June 22, 2010 Author Posted June 22, 2010 Aye, windows 7.. Thanks, I will give it a try in the morning. I dont have any 100mb boot volume though.. (although interestingly a x64 install Im doing jsut now insisted on creating a 100mb partition..)
rh91uk Posted June 22, 2010 Posted June 22, 2010 Oh god I've done that before on 30 laptops and gone round with several copies of GPARTED Live!
sted Posted June 22, 2010 Posted June 22, 2010 Aye, windows 7.. Thanks, I will give it a try in the morning. I dont have any 100mb boot volume though.. (although interestingly a x64 install Im doing jsut now insisted on creating a 100mb partition..) isnt that 100mb partition win7 creates incase you ever decide to use bitlocker rather than a boot partition?
RabbieBurns Posted June 22, 2010 Author Posted June 22, 2010 isnt that 100mb partition win7 creates incase you ever decide to use bitlocker rather than a boot partition? no idea.. not a single one of my 400 32bit win7 machines have a 100mb partition. Is it a x64 thing?
sted Posted June 22, 2010 Posted June 22, 2010 no idea.. not a single one of my 400 32bit win7 machines have a 100mb partition. Is it a x64 thing? it does it on x64 ive not done a single x86 install and wont as far as im concered 32bit = xp 64=win7 the only use i have for win7 x86 is for the boot.wim files i use to make a custom winpe
srochford Posted June 22, 2010 Posted June 22, 2010 Oops! Just realised that what I typed earlier is garbage! Save this as a text file (eg resize.txt) select volume 1 shrink desired=85000 and then put diskpart /s resize.txt in the batch file - ie you create a script of the commands you want and then call that from diskpart with the /s switch. 1
RabbieBurns Posted June 23, 2010 Author Posted June 23, 2010 (edited) Awesome, that works well, cheers. Any way I can create a new simple volume ausing all the new space and then format it from the CLI as well? Edited June 23, 2010 by RabbieBurns
SYNACK Posted June 23, 2010 Posted June 23, 2010 Yeap, if you want multiple partitions then in your text file specify the following Select disk 0 clean Create partition primary size=100 Select partition 1 Active Format fs=ntfs quick assign letter=S Create partition primary Select partition 2 Format fs=ntfs quick assign letter=c Exit this will select the first har drive, wipe its partitions etc (clean) then make a 100mb partition, set it to active (marked as bootable), format it to NTFS then assign it a drive letter (s). Next it creates a patition using the rest of the space avalible (by not specifying the size), formats it to ntfs and assigns it the drive letter of C. You can script all sorts of drive configurations with diskpart and extend/shrink partitions too. 1
RabbieBurns Posted June 23, 2010 Author Posted June 23, 2010 Im not wanting to lose the existing windows installation. I cant be bothered ghosting them all again. So I want to shrink the 500gb drive to 1 80gb partition © and the rest just a (d) drive with the remaining free space. Using Srochford method above, and tweaking the numbers, Ive got now an 82gb C Drive, and just unassigned free space after it. I just want to assign that free space to D:
SYNACK Posted June 23, 2010 Posted June 23, 2010 In which case you can simply use something like (assuming one hard drive) diskpart select disk 0 Create partition primary list partition - to find the number of the new partition if you don't know it - select partition x Format fs=ntfs quick assign letter=k exit or just use the disk managment snapin inside the computer managment app, right click on the empty space on the drive and make a new partition from there. You could also have done the shrink operation from there too if you had wanted to as there is a GUI for it in Vista and above. 1
robyholmes Posted June 23, 2010 Posted June 23, 2010 As far as I know the 100MB is for bit-locker, didn't they have problems with bit-locker failing to load on Vista and there wasn't any way of recovering it. So they made the 100MB for bit-locker to live in so it can be repaired? GOOGLE! Ok, got a bit mixed up, its not to repair bit-locker, but contains boot and recovery files stored outside of bit-locker. So if you need to repair your installation it can boot in to recovery without needing bit-locker to unlock the C drive. By the sounds of it it will only effect you if you use bit-locker, and if you don't have the 100MB partition it will just mean the recovery and boot files are on the main partition. Correct me if I'm wrong on that.
Ric_ Posted June 23, 2010 Posted June 23, 2010 Wish I had spotted this earlier and saved you some grief.... The extra little partition you discuss is for the files required to boot Windows when Bitlocker is enabled. When you enable Bitlocker, your system drive is shrunk automagically (if required). It doesn't take long either! I found this out by accident after much grief with extra drive letters and faffing in SCCM!
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