最後更新: 2016-06-03
version:
testdisk -v
TestDisk 6.13, Data Recovery Utility, November 2011
testdisk <device>
Example:
testdisk /dev/loop0
testdisk /dev/md0 to repair a filesystem on top of a Linux RAID device.
testdisk /dev/sdb
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org TestDisk is free software, and comes with ABSOLUTELY NO WARRANTY. Select a media (use Arrow keys, then press Enter): >Disk /dev/sdb - 500 GB / 465 GiB - ST500DM0 02-1BD142 >[Proceed ] [ Quit ] Note: Disk capacity must be correctly detected for a successful recovery. If a disk listed above has incorrect size, check HD jumper settings, BIOS detection, and install the latest OS patches and disk drivers.
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org Disk /dev/sdb - 500 GB / 465 GiB - ST500DM0 02-1BD142 Please select the partition table type, press Enter when done. >[Intel ] Intel/PC partition [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...) [Humax ] Humax partition table [Mac ] Apple partition map [None ] Non partitioned media [Sun ] Sun Solaris partition [XBox ] XBox partition [Return ] Return to disk selection Note: Do NOT select 'None' for media with only a single partition. It's very rare for a drive to be 'Non-partitioned'.
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63 >[ Analyse ] Analyse current partition structure and search for lost partitions [ Advanced ] Filesystem Utils [ Geometry ] Change disk geometry [ Options ] Modify options [ MBR Code ] Write TestDisk MBR code to first sector [ Delete ] Delete all data in the partition table [ Quit ] Return to disk selection Note: Correct disk geometry is required for a successful recovery. 'Analyse' process may give some warnings if it thinks the logical geometry is mismatched.
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63 Current partition structure: Partition Start End Size in sectors 1 P Linux 0 32 33 60801 80 15 976771072 No partition is bootable *=Primary bootable P=Primary L=Logical E=Extended D=Deleted >[Quick Search] [ Backup ] Try to locate partition
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63 Partition Start End Size in sectors >* Linux 0 32 33 60801 80 15 976771072 Structure: Ok. Use Up/Down Arrow keys to select partition. Use Left/Right Arrow keys to CHANGE partition characteristics: *=Primary bootable P=Primary L=Logical E=Extended D=Deleted Keys A: add partition, L: load backup, T: change type, Enter: to continue btrfs Backup superblock, 500 GB / 465 GiB
- 左右制選擇 recover
- press P to list your files
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63 Partition Start End Size in sectors 1 * Linux 0 32 33 60801 80 15 976771072 [ Quit ] >[Deeper Search] [ Write ] Try to find more partitions
A partition is still missing: Deeper Search:
TestDisk 6.13, Data Recovery Utility, November 2011 Christophe GRENIER <[email protected]> http://www.cgsecurity.org Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63 Analyse cylinder 27/60801: 00% Linux 0 32 33 60801 80 15 976771072 Stop
不 reboot 去認新 partition
partprobe /dev/sdd