Opposite of the `mkfs.ext4` command

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"

yair

Posted 2017-12-31T06:25:48.460

Reputation: 1

Question was closed 2018-01-12T02:16:57.060

@Damon There is no partition; note the sdb, not sdb1 or so. – Kamil Maciorowski – 2017-12-31T09:52:31.293

Answers

-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"

davidgo

Posted 2017-12-31T06:25:48.460

Reputation: 49 152