Using Diskpart

Page 1 of 2 12 LastLast

  1. Posts : 22,814
    W 7 64-bit Ultimate
       #1

    Using Diskpart


    Hello everyone.



    What I would like is to do is a "secure erase" (write zeroes) to a partition of a HDD before a clean install of Windows 7. If I were to boot to a Command Prompt at Startup would the series of commands in the snip below secure erase (zero) the partition; then I could clean install Windows 7 to that same partition.

    Does a full format do a secure erase to the partition? I don't really want to use a 3rd party prog. to do it if Diskpart will.

    I hope y'all understand what I'm asking.

    Using Diskpart-format2.jpg
      My Computer


  2. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Ted,

    You can use the Clean All command to "secure erase" a hard drive to completely wipe it clean. :)

    Hope this helps,
    Shawn
      My Computer


  3. Posts : 22,814
    W 7 64-bit Ultimate
    Thread Starter
       #3

    Hello Brink.

    Thanks for the reply.


    I've been experimenting with that and a "clean" and a "clean all" command remove the partition structure from the HDD and make it "unallocated" space and I don't want that to happen, I want to do a secure erase to a partition on a HDD with data on other partitions on the HDD and not lose that data.
      My Computer


  4. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #4

    While the "format" command is not as a "secure erase" as using the "Clean All" command, if you "format" and install Windows on top of it, it should pretty much wipe out any traces of data that was on the HDD.


    Quick Format - only rewrites the boot record of the media and makes the whole space available for writing data. Althought physically, previous data is still present, only marked as free space.

    Full Format - formats everything as well as test (dskchk) each sector for Read/Write problems. Sectors with problems are marked as bad. Since it tests every sector, depending on the hard drive size and computer speed may take many minutes or hours to do.
      My Computer


  5. Posts : 22,814
    W 7 64-bit Ultimate
    Thread Starter
       #5

    So any data on the partition would be pretty much un-recoverable after a full format and a clean install?



    Thank you Shawn. :)
      My Computer


  6. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #6

    I'm sure that the government will still have a way to recover some data from it if push came to shove, but it would be practically unrecoverable for your average joe.

    If you truly need it wiped cleaned, then it's either the "Clean All" command, or a 3rd party disk scrubbing program with several passes that would need to be used to do so.
      My Computer


  7. Posts : 22,814
    W 7 64-bit Ultimate
    Thread Starter
       #7

    I realized after I posted that that I was making it sound as though I have "stuff" I want hidden, I don't, I just want a clean slate when I do clean installs from now on.


    Thank you very much Shawn. :)

    I also want to say "thank you" to Jonathan_King for his help with this also.
      My Computer


  8. Posts : 1,403
    Win 7 Ultimate 32bit
       #8

    You don't have to be a criminal or a spy to want a truly clean drive

    There is a little known command built into all modern drives firmware.....

    CMRR - Secure Erase

    HDDerase.exe is a DOS-based utility that securely erases "sanitizes" all data
    on ATA hard disk drives in Intel architecture computers (PCs). It offers the
    option to run the drive internal secure erase command, security erase unit,
    based on the ATA specification by the T13 technical committee.
    This does not work on USB or SCSI drives.

    It has been my understanding over the years of researching that the following refers to Bad Sectors as well..

    Q: What is the difference between secure erase and enhanced secure erase?

    A: Secure erase overwrites all user data areas with binary zeroes. Enhanced
    secure erase writes predetermined data patterns (set by the manufacturer) to
    all user data areas, including sectors that are no longer in use due to
    reallocation. ***NOTE: the enhanced secure erase option is not supported by
    all ATA drives.
    No other software or method will also erase data on bad sectors.

    So even if you erase a drive of data. Any data that was written to a sector that has
    been marked bad can be recovered using exotic lab techniques for data recovery.

    There are many devices now that are certified and can claim full certification for
    things like HIPAA and other very sensitives data erasure needs that only use the
    Internal Wipe Command to completely erase all data from a drive that could be
    re-used in any capacity.
    Which makes the Internal Wipe Command very favorable for anyone who is about to trash,
    or resell a system that they may not want sensitive data to be recovered from.

    Keep in mind that this is a full disk erasure.
      My Computer


  9. Posts : 12,012
    Windows 7 Home Premium SP1, 64-bit
       #9

    Tepid:

    Sounds interesting. Have you actually used this app? I have downloaded it, but gone no further.

    It appears that the EXE file is actually called hdderase.exe rather than Secure Erase?

    I guess you have to burn it to a bootable CDR and then boot from it.

    Any issues and do you have an estimate of how long this takes to run on a 1 TB drive scheduled for disposal?

    Barefoot Kid:

    Here are the commands I use with Diskpart, after hitting Shift F10 during setup:

    list disk (to show the ID number of the hard disk to partition, normally Disk 0)

    select disk 0 (change 0 to another number if applicable)

    clean

    create partition primary size=80000 (create a partition with 80 GB space; to use the entire disk as one partition, omit the “size=value” parameter switch; use a similar command to create more partitions if needed or create in Windows 7 after installation)

    select partition 1

    active

    format fs=ntfs quick

    exit
      My Computer


  10. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #10

    Hello Ignatzatsonic,

    The data on the HDD is not written over using the clean or format quick command. It is only marked as being deleted and can be written over when new data is written/saved to the HDD next. You would have to use the clean all command for a secure erase to have all the data written over with 0's on the HDD instead though.

    Disk - Clean and Clean All with Diskpart Command
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:14.
Find Us