Sample Header Ad - 728x90

Restore deleted bytes after a `wipefs` on Linux

4 votes
1 answer
345 views
After re-installing a Linux machine, I inadvertently ran wipefs -a on the installer pendrive:
$ wipefs -a /dev/sd?
/dev/sda: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
/dev/sdb: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
...
/dev/sdw: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
/dev/sdx: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
/dev/sdy: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31
/dev/sdy: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdy: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdy: calling ioctl to re-read partition table: Success
As wipefs output contains the offset and the content of the deleted bytes, it seems possible to restore /dev/sdy. How would you do it?
Asked by Fravadona (1581 rep)
Jan 22, 2025, 09:27 AM
Last activity: Jan 22, 2025, 09:51 AM