Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to destroy a filesystem [closed]

Tags:

filesystems

We have some USB storage devices were the filesystem is corrupted (RAW). We don't really know the exact reason, so I would like to simulate the problem. Are there any tools or methods to destroy the filesystem. Or better yet, are there any guidelines on how NOT to destroy the filesystem.

thanks!

like image 387
user1740364 Avatar asked Oct 17 '12 08:10

user1740364


1 Answers

There are scenarios in which shred may not work with all the file systems. One alternative apart from shred is to dd the whole partition itself.

Assuming your device is /dev/sdb or something like that , you can dd the whole partition using the following command ,

dd if=/dev/zero of=/dev/sdb 

This should overwrite all the contents of partitions including the data structures(super blocks etc) of the previous file system with zero , effectively killing the file system for you.

like image 58
BIBS Avatar answered Oct 05 '22 19:10

BIBS