Open Bofrostmann07 opened 2 years ago
Hey Romario! Thank you for reporting this. This looks interesting.
Judging by the log, there's something wrong with writing (or reading) the last block(s) of the partition. Doesn't look like an alignment issue considering the block size. Perhaps the size of the partition is detected incorrectly. I will try to investigate this but it's going to be tricky without reproducing the issue.
A couple of questions:
wmic partition get name,index,startingoffset,bootable,size,type,blocksize
Hey Kosta,
we can reproduce the issue, no problem. The disk is still mounted to the system. It´s a NTFS partition with 4k block size. I´ve checked the disk via CrystalDiskInfo. Seems to be good.
WMIC:
wmic partition get name,index,startingoffset,bootable,size,type,blocksize
BlockSize Bootable Index Name Size StartingOffset Type
512 FALSE 0 Datenträgernr. 1, Partitionsnr. 0 2000263577600 135266304 GPT: Basic Data
Do you have some debug commands i can use to get you more information?
Maybe it has something to do with this little extra partition, i can only see when running:
PhysicalDrive1 has a small Partition1 with 128MB.
I can´t see this partition with WMIC or the DiskManager
Thanks a lot for the extra details Romario!
What I see:
There's no extra debugging options for Lethe at the moment. Maybe I should add some.
I would definitely like to see what's actually there at that block. If you have time and would like to help even more, perhaps you could check that block yourself with something like HxD? That would be sectors from 3906764792 to 3906764800. If the data doesn't look random then that would already mean that there's something interesting going on, probably related to GPT.
Also, out of curiosity: since it's the only partition with data on the drive, why did you decide to wipe only that particular partition instead of the whole physical drive? I wonder if there's some extra use case I didn't think about.
A small update: I was able to repro the issue locally and figured out the reason. The last sector of a partition is basically reserved as a boot sector and is not available for writes. How to properly find and exclude it is what I'm going to work on next. But, the good news is that there're no privacy concerns as far as I can see. And if it's important to hide the fact that there was ever an NTFS partition - wiping the whole physical drive should deal with that.
Thank you very much Kosta. I think reproducing is not necessary anymore?
Also, out of curiosity: since it's the only partition with data on the drive, why did you decide to wipe only that particular partition instead of the whole physical drive? I wonder if there's some extra use case I didn't think about.
No special reason, I just didn´t know it better.
Yes, there's no need for additional confirmation right now 👍🏻 I managed to reproduce this issue even with a much smaller partition so it's easy to investigate/test from my end. I will let you know once I have the fix ready.
Hey Kosta,
i´ve used your nice tool to wipa a 1,8TB HDD Seagate on Windows 10 v20H2 (Biuld 19042.1586). The disk got filled randomly twice, but verification failed.
C:\WINDOWS\system32>cmd /K D:/downloads/lethe.exe wipe --blocksize=4k \Device\Harddisk1\Partition2
Wiping:
Are you sure? (type 'yes' to confirm): yes
Stage 1/2: Performing Random Fill ✔ Completed in 14 hours
Stage 2/2: Performing Random Fill ✔ Completed in 9 hours
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! Retrying previous stage at 2000263573504 in 3 seconds.
Stage 2/2: Performing Random Fill ✔ Completed in 0 seconds
Stage 2/2: Verifying Random Fill ❌ FAILED! Verification failed! ❌ Unexpected error: Verification failed!
C:\WINDOWS\system32> C:\WINDOWS\system32>