Skip to content
Home » Windows » How to Resolve DiskPart has encountered an error: The media is write protected

How to Resolve DiskPart has encountered an error: The media is write protected

The media is write protected

Tried to create a partition on a disk, but it failed with an error "The media is write protected".

DISKPART> create part ext

DiskPart has encountered an error: The media is write protected.
See the System Event Log for more information.

To remove READONLY attribute, we can take the following steps.

DISKPART> attributes disk clear readonly

Disk attributes cleared successfully.

Optionally, if you'd like to remove all partitions and data on the disk, you can clean it completely.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

Now, we partition the disk again.

DISKPART> create part ext

DiskPart succeeded in creating the specified partition.

DISKPART> create part log

DiskPart succeeded in creating the specified partition.

It's done.

Leave a Reply

Your email address will not be published. Required fields are marked *