Cleaning a Disk Using DiskPart in PXE Boot
Purpose
This procedure fully erases a disk using DiskPart from a PXE boot environment. It is typically used when re-imaging fails or when a disk needs to be completely cleaned and prepared for new use.
⚠️ Warning: This process permanently deletes all data and the operating system from the disk. Do not perform this on the active boot drive unless you intend to wipe it completely.
Reasons to Perform This Procedure
-
Imaging is failing with a device preparation error.
-
Re-imaging attempts are not resolving the issue.
-
You need to fully erase the disk, including the operating system.
Prerequisites
-
Device BIOS password (if configured).
-
Confirmation that all important data on the device has been backed up or is no longer needed.
-
PXE boot capability enabled on the device.
Step-by-Step Instructions
Part 1: Wiping the Disk
-
Enter BIOS
-
Authenticate
-
Select PXE Boot (IPv4)
-
Choose “Disk Cleanup”
-
Open DiskPart
-
List Available Disks
-
Select the Target Disk
-
Clean the Disk
-
Exit DiskPart
-
Type exit
to close DiskPart.
-
At this point, the disk is clean and should allow imaging without issue.
Part 2: Re-Creating a Partition (If Needed)
If the device still cannot be imaged, create a new partition manually.
-
Repeat steps 1–7 from Part 1.
-
Create a Primary Partition
create partition primary
-
Select the Volume
select volume 0
-
Assign a Drive Letter
assign letter=C
-
Format with NTFS
format fs=NTFS
(Formatting may take several minutes depending on disk size.)
-
Exit DiskPart
The device should now have a clean, formatted disk that is ready for re-imaging.