1

I have a hard drive previously used with a Linux system, with an ext4 filesystem. I would like now to zero out the hard drive from a Windows system.

I understand I can do this using the FORMAT command, passing in /p:0 (or another number for multiple passes); as the documentation for /p says:

/P:<count> -- Zero every sector on the volume. After that, the volume will be overwritten count times using a different random number each time. If count is zero, no additional overwrites are made after zeroing every sector.

However, the hard drive doesn't have an assigned drive letter, because Windows doesn't natively support ext4.

How can I refer to the drive in the FORMAT command when it doesn't have a drive letter?

I can get the object ID using MOUNTVOL or Powershell Get-Volume, but I can't pass that object ID into FORMAT. The following command:

FORMAT \\?\Volume{8ab24395-0965-40fc-8cc8-bb7536c9e1dd}\ /fs:ntfs /p:1

returns:

The given volume name does not have a mount point or drive letter.

I am running Windows 10 (non-Insiders), and I do not have WSL installed.

1

1 Answer 1

1

FORMAT acts ONLY on filesystems that have a drive letter. You can't really do a full disk wipe with it. You can only wipe partitions, but for a single-partition disk it more or less amounts to the same thing.

So go into the Windows Disk Administrator.
Find the partition (or if the disk is completely empty, make a new partition covering the whole disk) and give it a (quick) format with NTFS or any other Windows-supported filesystem and assign it a drive letter.
After that you can do FORMAT /p: as desired.

Or (on the command line) you can use DISKPART to create the partition and assign the drive letter.
However the CLEAN ALL command in DISKPART has the same effect as a 1-pass 0-byte overwrite and it acts on the WHOLE DISK. Don't use it if you only want to wipe a single partition/filesystem!
But since you seem to want a disk-level 1-pass overwrite, this would be the quickest way to do it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .