I have done a fuck up again (mkfs.fat on an ext4 partition)

2»

Comments

  • @yoursunny said:

    @comi said:
    In theory if you can create new partition table exactly the same as it was before you can recover every partition one by one.

    More specificaly same number of partitions in the same order of the exact same size.

    So the lesson is that we should email ourselves the partition table, so that we can recover data even if some files are not yet in the backup.

    You can still manually analyze raw data to recover the partition but it's a pain and hard to put into instructions.
    Something like detect the first block group of ext4, record the offset of it's beginnig, extract number of block groups and blocksize from superblock backup, detect the last block group, record the offset of it's end, dd the whole thing out and fsck it. I am not sure this exact actions will help, because on-disk raw data can be very weird and defy what you think it should look like.

    Thanked by (1)MaxKVM
Sign In or Register to comment.