Removing read only flag from Windows Diskpart Partition tool

I was trying to investigate a failed disk from a RAID array using a USB hard drive dock and Windows 7. The problem was Windows was reporting that the disk was read-only, so it wouldn’t repartition the hard disk.

I opened up diskpart tool in windows (Run As Administrator) and tried to run the clean command, but again it complained that the hard drive was in read-only mode.

Finally, I found the way to remove the read-only flag, so I could wipe the drive, and scan it for bad sectors.

DISKPART> list disk
DISKPART> select disk 2
DISKPART> list part
DISKPART> select part 2
DISKPART> attrib part clear readonly

I suggest big corporations, and important public services stop using insecure operating systems

On April 21, 2010, beginning at approximately 14:00 UTC, millions of computers worldwide running Windows XP Service Pack 3 were affected by an erroneous virus definition file update by McAfee, resulting in the removal of a Windows system file (svchost.exe) on those machines, causing machines to lose network access and, in some cases, enter a reboot loop. Mcafee rectified this by removing and replacing the faulty DAT file, version 5958, with an emergency DAT file, version 5959 and has posted a fix for the affected machines in their consumer knowledge base. The University of Michigan’s medical school reported that 8,000 of its 25,000 computers crashed. Police in Lexington, Ky., resorted to hand-writing reports and turned off their patrol car terminals as a precaution. Some jails canceled visitation, and Rhode Island hospitals turned away non-trauma patients at emergency rooms and postponed some elective surgeries. Australian supermarket behemoth Coles reported that 10 percent (1,100) of its point-of-sales terminals were affected and was forced to shut down stores in both western and southern parts of the country.