Hack 46 Create or Delete NTFS Partitions from the Recovery Console
Create and delete NTFS partitions using the
DISKPART from the Recovery Console.
Windows versions from NT to Windows
Server 2003 know nothing about FDISK but provide their own
partitioning tool, DISKPART, which is run from the
Windows Recovery Console. DISKPART is a
command-line utility used to add/create or delete NTFS partitions
with some very simple commands.
Boot using your recovery diskettes or setup CD and select the
Recovery Console option. Alternatively, you can boot with a DOS
diskette that provides CD-ROM support and type:
\i386\winnt32.exe /cmdcons
At the command prompt, issue the DISKPART command followed by the
appropriate command.
The following command line adds a 2,048 MB partition:
diskpart /add \Device\HardDisk0 2048
Type exit to leave the Recovery Console and
restart the system.
The command line for DISKPART supports only the
/add and /delete commands:
/add
Adds a new partition. Supports the optional parameter
size, which specifies the partition size in
megabytes.
/delete device_name | drive_name | partition
Deletes a partition. device_name specifies the
device on which to create or delete a partition. Use the
MAP command from the Recovery Console command line
to get a list of device names (for example,
\Device\HardDisk0). drive_name
specifies the partition you want to delete by drive letter (for
example, D:). partition
specifies the partition you want to delete by name (for example,
\Device\HardDisk0\Partition1).