Skip to main content
added 530 characters in body
Source Link
ilkkachu
  • 147.9k
  • 16
  • 268
  • 441

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them.

That, plus the fact that GPT stores a backup copy of the partition table at the end of drive, which would not be overwritten here, and the first filesystem might also be usable, as some filesystems have backup copies of the main data structures.

That's an equally bad solution for any drive, as discussed in the comments to the answer you linked to.

(Of course it's even less useful for SSDs, which might not even actually overwrite or erase the old data of those blocks, so they might be recoverable with proper tools/software. But that's not a major matter compared to having most of the interesting data still readable by normal means.)

If you're happy with just wiping the partition table and filesystem, it might be better to e.g. just create a new empty partition table with a regular partitioning tool, and to make sure to wipe all the filesystems from all partitions perhaps also by creating new ones on top. (The caveats with SSDs would still apply, but at least recovery would require know-how on debug-style access to the drive.)

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them.

That, plus the fact that GPT stores a backup copy of the partition table at the end of drive, which would not be overwritten here, and the first filesystem might also be usable, as some filesystems have backup copies of the main data structures.

That's an equally bad solution for any drive, as discussed in the comments to the answer you linked to.

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them.

That, plus the fact that GPT stores a backup copy of the partition table at the end of drive, which would not be overwritten here, and the first filesystem might also be usable, as some filesystems have backup copies of the main data structures.

That's an equally bad solution for any drive, as discussed in the comments to the answer you linked to.

(Of course it's even less useful for SSDs, which might not even actually overwrite or erase the old data of those blocks, so they might be recoverable with proper tools/software. But that's not a major matter compared to having most of the interesting data still readable by normal means.)

If you're happy with just wiping the partition table and filesystem, it might be better to e.g. just create a new empty partition table with a regular partitioning tool, and to make sure to wipe all the filesystems from all partitions perhaps also by creating new ones on top. (The caveats with SSDs would still apply, but at least recovery would require know-how on debug-style access to the drive.)

added 79 characters in body
Source Link
ilkkachu
  • 147.9k
  • 16
  • 268
  • 441

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them. Even

That, plus the fact that GPT stores a backup copy of the partition table at the end of drive, which would not be overwritten here, and the first filesystem might also be usable, as some filesystems have backup copies of the main data structures.

It's probablyThat's an equally bad solution for any drive.

If you were to remove that count=2 argument, it would (logically) rewrite all ofas discussed in the drive, but then you'd notice that readingcomments to the /dev/urandom is rather slow for this taskanswer you linked to.

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them. Even the first filesystem might be usable, as some filesystems have backup copies of the main data structures.

It's probably equally bad for any drive.

If you were to remove that count=2 argument, it would (logically) rewrite all of the drive, but then you'd notice that reading /dev/urandom is rather slow for this task.

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them.

That, plus the fact that GPT stores a backup copy of the partition table at the end of drive, which would not be overwritten here, and the first filesystem might also be usable, as some filesystems have backup copies of the main data structures.

That's an equally bad solution for any drive, as discussed in the comments to the answer you linked to.

Source Link
ilkkachu
  • 147.9k
  • 16
  • 268
  • 441

Edit: would this work for a SSD just like for a HDD?

dd if=/dev/urandom of=/dev/sdc bs=1M count=2

Sure, that works by writing over the first 2 MB of the drive, which probably includes the partition table and the start of the first partition, which often starts at 1 MB.

Most of your files and the intact filesystems of any other partitions would still be there, readable by a normal computer and a normal operating system, it's only a question of having a software to find them. Even the first filesystem might be usable, as some filesystems have backup copies of the main data structures.

It's probably equally bad for any drive.

If you were to remove that count=2 argument, it would (logically) rewrite all of the drive, but then you'd notice that reading /dev/urandom is rather slow for this task.