usb - Why can't I delete all partitions on a flash drive in Windows 7?

28
2014-04
  • irrational John

    Recently I purchased an ADATA C802 8GB flash drive. Since the drive was new I decided to run some of the HD Tune Pro (v4.50) performance tests on it, mostly just for the heck of it.

    To avoid accidentally destroying data HD Tune refuses to write to a drive unless there are no partitions on the drive. If you do attempt to write to a drive with partitions, it posts the message "Writing is disabled. To enable writing please remove all partitions."

    As you would expect, the ADATA came formatted with a single primary FAT32 partition in the Master Boot Record. But a number of unexpected things happened when I attempted to delete that partition.

    1. The first thing I tried was to use the Windows 7 (64-bit) Disk Management tool (diskmgmt.msc) to delete the partition. It would not let me. The context menu choice to delete that volume was not available.

    2. Next I opened up a command prompt window with Admin authority and ran diskpart. Diskpart deleted the volume for me. However, when I attempted to run an HD Tune write test on the drive I still got the "Writing is disabled" message. Huh???

    3. So I fired up a utility I happen to own which allows viewing drives at the sector level and verified that the partition table in the Master Boot Record was empty. No partitions. Yet HD Tune still thought there were partitions on the drive?

    So why was I still getting the "Writing is disabled" message from HD Tune Pro? And why wouldn't the Windows 7 Disk Management tool let me change the partitions on this drive.

    After doing the above, I plugged the ADATA into my MacBook. I was then able to format it as either a GPT or MBR partitioned drive with no problems. I am not looking for suggestions on how to format this drive. I can do that.

    What I do not understand and was hoping I might get insight into is why this drive behaves so strangely under Windows 7? And BTW, what's up with HD Tune Pro?

    BTW, if I plug the drive I formatted on my MacBook back into my Windows 7 64-bit system I still run into road blocks with the Disk Management tool. For example, I cannot delete all the GPT partitions on the ADATA so I can convert it into an MBR drive. I followed Microsoft's instructions, the instructions just do not work with this ADATA flash drive.

    Anyone know what's up with this? It makes no sense to me. Has something changed in Windows 7 (Vista)??

  • Answers
  • Community

    There's no need to install any third-party programs, Windows already includes everything you need. Just open up command prompt and enter the following commands in sequence:

    DISKPART
    LIST DISK
    

    Select the disk that you want to correct. Example: I want to remove all partitions on Disk 1:

    SELECT DISK 1
    RECOVER
    

    If the RECOVER command doesn't work, try CLEAN.

    Disk 1 will be recovered as one complete disk.

    FORMAT <option>
    

    Where <options> represent what formatting method you'd prefer. Alternatively, use QUICK.

  • Tom Wijsman

    Try the software MiniTool Partition Wizard.

    I've used it before to create and delete partitions on flash media. It may work for you, and it's free.

    MiniTool Partition Wizard Home Edition is a free partition manager software designed by MiniTool Solution Ltd. Our partition manager supports 32/64 bit Windows Operating System including Windows XP, Vista and Windows 7. Home users can perform complicated partition operations by using this powerful yet free partition manager to manage their hard disk. MiniTool Partition Wizard Home Edition is designated for home user only.

    • Support Windows 2000/XP/Vista/windows 7 (32 bit & 64 bit) operating system.
    • Support RAID.
    • Extend system partition to maximize computer performance.
    • Manage the hard disk for substantial performance increase.
    • Create, Delete and Format partitions with simple steps.
    • Disk Copy to protect or transfer data.
    • Support disk and partition size larger than 2 TB.
    • Convert partition format from FAT to NTFS.
    • Partition Copy: Copy the entire content of one hard disk to another.
    • Copy Disk Wizard: Copy the entire hard disk to another without having to reinstall Windows.
    • Disk Map - Visually demonstrate your disk/partition configuration; preview the changes before applying.
    • Hide/unhide partition, set active partition, etc. - Change partition properties easily.
    • Explore FAT/NTFS partition.
    • Set partition as primary.
    • Set partition as logical.
    • Rebuild MBR.
    • Disk Surface Test.
    • Partition Surface Test.
    • Change Partition Serial Number.
    • Change Partition Type ID.
    • Hot Extend Partition without reboot. NEW!

    enter image description here

  • slhck

    I found a simple solution because I had the same problem with HDD Tune Pro.

    Just format the card or USB flash drive to NTFS, and then you can delete that NTFS partition using EASEUS Partition Manager without restarting, and voilà, I was able to test write speed with HDD Tune Pro.

  • Tom Wijsman

    If you can't find anyone who knows how to fix this problem on Super User, it would be worth contacting A-Data themselves at their Support Center.


  • Related Question

    linux - Partition table corrupted (USB flash drive)
  • Questioner

    It's an 8 GB Patriot thumb drive, which I've used extensively with lots of data. Today, it is detected, but all data is gone: (EDIT at least some data is still there, but the partition table is gone)


    EDIT @Sathya (thanks) here's the relevant output from sudo fdisk -l:

    Disk /dev/sdc: 8019 MB, 8019509248 bytes
    247 heads, 62 sectors/track, 1022 cylinders
    Units = cylinders of 15314 * 512 = 7840768 bytes
    
    Disk /dev/sdc doesn't contain a valid partition table
    

    It looks like it is /dev/sdc, with that 8 GB... and no partition table.

    I tried to mount /dev/sdc (and then dmesg | tail):

    /media> sudo mount /dev/sdc mytmp
    mount: wrong fs type, bad option, bad superblock on /dev/sdc,
           missing codepage or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    /media> dmesg | tail
    [   24.300000]  sdc: unknown partition table
    [   24.320000] sd 2:0:0:0: Attached scsi removable disk sdc
    [   24.370000] usb-storage: device scan complete
    [   26.870000] EXT2-fs error (device sdc): ext2_check_descriptors: Block bitmap for group 1 not in group (block 0)!
    [   26.870000] EXT2-fs: group descriptors corrupted!
    [   50.420000] unhashed dentry being revalidated: .DCOPserver_eeepc-brendanma__0
    [   50.430000] unhashed dentry being revalidated: .DCOPserver_eeepc-brendanma__0
    [   50.430000] unhashed dentry being revalidated: .DCOPserver_eeepc-brendanma__0
    [ 5565.470000] EXT2-fs error (device sdc): ext2_check_descriptors: Block bitmap for group 1 not in group (block 0)!
    [ 5565.470000] EXT2-fs: group descriptors corrupted!
    

    EDIT @Col: results from testdisk

    Disk /dev/sdc - 8013 MB / 7642 MiB - CHS 1022 247 62
    Current partition structure:
         Partition                  Start        End    Size in sectors
    
    Partition sector doesn't have the endmark 0xAA55
    

    After I hit [proceed], it says:

    Structure: Ok.
    
    
    Keys A: add partition, L: load backup, Enter: to continue
    

    The "Structure: Ok." seems reassuring... will "A: add partition" make my old data accessible (if it's still there), or will it make a new, fresh partition?

    Another option is "[ MBR Code ] Write TestDisk MBR code to first sector" - would it be better to do this?


    EDIT I found that at least some of my data is still on the flash drive, by using the below, and searching for English text in less (like " the "):

    cat /dev/sde | tr -cd '\11\12\40\1540-\176' | less
    

    (The drive changed from "/dev/sdb" to "/dev/sde" because I connected some extra drives today). I've learnt that "/dev/sde1" would be the first partition; and "/dev/sde" is the whole drive. Because unix treats these devices just like files, you can use all the ordinary unix file commands on them, like cat, and then process them like any other stream of data. The tr above removes non-printable characters ("\40" is space, which I wanted to preserve). In less, you can use "/" to search, similar to Vim.

    How can I get my data back (assuming it's still there)? If only the partition table is corrupted, is there a standard "partition recovery tool"? Is there a way to "repartition" without deleting everything?


  • Related Answers
  • Col

    It may be worth running testdisk over the device, it sounds like your partition table may have gone pop. Testdisk should be able to recover your data.

  • Seasoned Advice (cooking)

    ddrescue is the tool you need. I don't think you'll be able to salvage the partition table and access the data any other way, based on the output you've posted from testdisk etc.

    http://www.forensicswiki.org/wiki/Ddrescue

    ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors.

    The basic operation of ddrescue is fully automatic. That is, you don't have to wait for an error, stop the program, read the log, run it in reverse mode, etc.

    If you use the logfile feature of ddrescue, the data is rescued very efficiently, (only the needed blocks are read). Also you can interrupt the rescue at any time and resume it later at the same point.

    Ddrescue does not write zeros to the output when it finds bad sectors in the input, and does not truncate the output file if not asked to. So, every time you run it on the same output file, it tries to fill in the gaps without wiping out the data already rescued.

    If you have two or more damaged copies of a file, cdrom, etc, and run ddrescue on all of them, one at a time, with the same output file, you will probably obtain a complete and error-free file. This is because the probability of having damaged areas at the same places on different input files is very low. Using the logfile, only the needed blocks are read from the second and successive copies.