0

is it possible to reverse after make mkfs.ext4 ?

mkfs.ext4  -j -m 0 /dev/sdb -F

for example we create file system on new device - sdb ( no any data on sdb )

mkfs.ext4  -j -m 0 /dev/sdb -F

now we want to reverse back as was before the "mkfs"

1
  • @Damon There is no partition; note the sdb, not sdb1 or so. Commented Dec 31, 2017 at 9:52

1 Answer 1

-1

There is no way to reverse this. Depending on the previous state of the disk prior it would be possible to recreate the disk with something else. It may even be possible to recover data or even partitions using Testdisk and/or photorec or other tools depending on the previous filesystem/data - but its not possible to simply reverse the command to how the system was before.

If, as the second part of your system implies, all you are wanting to do is reset the disk so it looks like its brand new, you can simply delete the partitioning data with a command like "dd if=/dev/zero of=/dev/sdb bs=1024 count=1"

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