Image capturing – Disk Preparation using diskpart

For those who know about WinPE (for those who don’t, I’ll publish an article soon) and want to know how to automate everything. Here’s a quick script that can be used to quickly get the partition structure right.

You will need to place the following in a text file. This creates 3 partitions with ~100GB, ~30GB and remainder and formats them using ntfs/quick.

The script will also change the drive letter assigned to the CD/DVD-ROM from the default D:.

select volume 0
assign letter n
select disk 0
clean
create partition primary size=100000
select partition 1
format fs=ntfs quick
assign letter=c
active
create partition primary size=30000
select partition 2
format fs=ntfs quick
assign letter=d
create partition primary
select partition 3
format fs=ntfs quick
assign letter=e
exit

Chuck this in a txt file somewhere (network/USB/CDROM) and call dispart ->

diskpart /s filename.txt

Have fun!!!

- Shehan

Hiiiii!!!! My First Blog

Hi all,

My very first blog!!!

Here I’m going to write “Blogs” of what I’m up to and things that keeps happening around me that “may be” interesting.

I’ll also try to put handy hints on IT!!! yes… Networking, systems – MS and linux, virtual technologies (primarily VMWare and a bit of citrix and other stuff), SANS and anything I can remember at the moment.

Hope you enjoy!!!

 

Shehan