0

I used the "shred" command on Linux to wipe a specific partition on my HDD (just a once-over with zeroes; no extra passes of random data).

The command I used:

shred -uvz -n 0 /dev/sda

But once it completed the shredding, the disk appeared to have transformed into one homogeneous raw partition that can't be mounted. The Ubuntu disk utility reads "Contents Unknown" when the device is selected.

I also gave the HDD a look using dskmgmt on Windows to get some additional perspective. It gives the following message:

"You must initialize a disk before Logical Disk Manager can access it."

Any idea about what happened?

This was a big shred, by the way. I shredded 2.6 TB of a 3.6 TB HDD.

Is my HDD toast, or the data on my HDD toast?

I do have a backup of just about everything on the HDD on a SSD, so the situation is not dire. But if I could save the disk contents somehow, that would be really nice. I understand that there is recovery software but I wanted to reach out to the community for some advice: perhaps there is a simpler fix, or perhaps I could get a recommendation of recovery softawre to use?

Thanks for the help.

PS There were multiple partitions on the HDD (e.g. sda1, sda 4). So I did not inadvertently shred the whole thing. Also, as it was shredding, I could see in the terminal that the total size to be shredded was the expected size -- only 2.6 of the 3.6 TB.


Hmmm... okay. Before I shredded the thing, I was thinking the same thing: "isn't sda the whole device?" But when I was looking at the partitions on the Disk Utility one was labeled sda0 another sda1 etc. and then the partition I wanted to shred was simply labeled sda. I wonder why that would be the case. Perhaps because it was simply unformatted space on the drive and not a partition proper? (I can't remember whether or not I formatted the space prior to shredding.)

Kusalananda
  • 333,661
  • 8
    You talk about partitions, but you ran shred [..] /dev/sda - and that is not a partition, it's the entire device. A partition would be /dev/sda0 – Panki Jun 06 '22 at 19:01
  • 1
    Meaning you shredded at least the MBR/GPT of the drive (tells your computer which partitions are on the drive) – Panki Jun 06 '22 at 19:06
  • 2
    The question is from one unregistered account; your not-an-answer (that is going to be deleted) is from another unregistered account. Please see I accidentally created two accounts; how do I merge them? Register fully, then merge. Then you will be able to [edit] the question and add information to it, instead of writing an "answer" that doesn't answer the question. This is how it works. This site is not a discussion forum, we strictly enforce the "answers should be answers" rule. – Kamil Maciorowski Jun 07 '22 at 04:58
  • I moved the OP's self-answer into question mostly verbatim. – Kusalananda Jun 07 '22 at 06:13
  • I don't know the Ubuntu disk utility, but disks/partitions are named by the kernel, so it should show those names. And sda is the whole drive, and I doubt you had a sda0, partitions are typically numbered from 1. I hope you have a backup of the data you didn't mean to shred because there are no tools on Linux (or any other OS) that can bring them back. – Henrik supports the community Jun 07 '22 at 06:26
  • 1
    "But when I was looking at the partitions on the Disk Utility one was labeled sda0 another sda1 etc. and then the partition I wanted to shred was simply labeled sda. I wonder why that would be the case." – I don't know the utility, but if by "labeled" you mean these were the labels then they could be almost anything, because labels are arbitrary strings you can set (see here or here). Now the question may be: why would anyone set such misleading labels? Misleading or not, labels are not device names. – Kamil Maciorowski Jun 07 '22 at 18:59

1 Answers1

2

You did shred the entire drive. You say your partitions are e.g. sda1, sda4.

Well you did not shred sda1 or sda4. You shredded sda, which is the whole drive.

user253751
  • 2,266