makePartitions.bat


After Operating System setup, the remaining disk space should be partitioned and formatted. On recent, NT-based systems (Windows 2003 Server, Windows XP) this can be scripted with the diskpart command that can take input from a text file. The diskpart command does not format, so format statements need to be added separately.

A discussion on why we have chosen these partitions is included in the page about file management and file access permissions.

	REM CREATE PARTITIONS described in newPartitions.txt
	diskpart /s newPartitions.txt

	REM FORMATTING AND LABELING THE PARTITIONS
	echo Y|format d: /fs:ntfs /V:applications
	echo Y|format e: /fs:ntfs /V:distribution
	echo Y|format f: /fs:ntfs /V:data

The following text file describes which partitions to create. First, the CD-ROM station gets assigned a higher drive letter (G:) so that the hard disk partitions can get consecutive drive letters. Then 2 partitions are created with a given size, and a 3th partition with the remaining space. We indicate that those partitions are primary partitions, but it is equally possible to create extended partitions and logical volumes. See Microsoft Technet : Diskpart Command-line Options.

	select volume 0
	assign letter g
	select disk 0DiskPart Command-Line Optionshttp://technet.microsoft.com/en-us/library/cc766465%28v=ws.10%29.aspx
	create partition primary size=2548
	assign letter d
	create partition primary size=2548
	assign letter e
	create partition primary
	assign letter f

Koen Noens
june 7, 2005