重新安装 Linux 机器后,我无意中wipefs -a
在安装程序 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
由于wipefs
输出包含偏移量和已删除字节的内容,因此似乎可以恢复/dev/sdy
。您将如何做?
首先,在再次触摸受影响区域之前,请先复制该区域
/dev/sdy
:然后,恢复原始数据:
(如果需要可以
sudo
在前面添加dd
)。0x200 紧跟在 0x1FE 处的两个字节之后,因此可以一次性写入十个字节。