Advertisement
peetaur

testdisk howto

Jun 17th, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.73 KB | None | 0 0
  1.  
  2. How to use testdisk
  3.  
  4.  
  5.  
  6.  
  7. =========================================
  8.  
  9. peter:~ # testdisk /dev/sda2
  10.  
  11.  
  12. =========================================
  13.  
  14.  
  15. TestDisk 6.13, Data Recovery Utility, November 2011
  16. Christophe GRENIER <grenier@cgsecurity.org>
  17. http://www.cgsecurity.org
  18.  
  19. TestDisk is free software, and
  20. comes with ABSOLUTELY NO WARRANTY.
  21.  
  22. Select a media (use Arrow keys, then press Enter):
  23. >Disk /dev/sda2 - 524 MB / 500 MiB - Hitachi HDS5C3030ALA630
  24.  
  25.  
  26. >[Proceed ] [ Quit ]
  27.  
  28. Note: Disk capacity must be correctly detected for a successful recovery.
  29. If a disk listed above has incorrect size, check HD jumper settings, BIOS
  30. detection, and install the latest OS patches and disk drivers.
  31.  
  32. => hit enter
  33. =========================================
  34.  
  35. TestDisk 6.13, Data Recovery Utility, November 2011
  36. Christophe GRENIER <grenier@cgsecurity.org>
  37. http://www.cgsecurity.org
  38.  
  39.  
  40. Disk /dev/sda2 - 524 MB / 500 MiB - Hitachi HDS5C3030ALA630
  41.  
  42. Please select the partition table type, press Enter when done.
  43. [Intel ] Intel/PC partition
  44. [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)
  45. [Humax ] Humax partition table
  46. [Mac ] Apple partition map
  47. >[None ] Non partitioned media
  48. [Sun ] Sun Solaris partition
  49. [XBox ] XBox partition
  50. [Return ] Return to disk selection
  51.  
  52.  
  53. Note: Do NOT select 'None' for media with only a single partition. It's very
  54. rare for a drive to be 'Non-partitioned'.
  55.  
  56.  
  57. => hit enter (I picked a partition, sda2, and it is not a partitioned partition, so it's None)
  58. =========================================
  59.  
  60. TestDisk 6.13, Data Recovery Utility, November 2011
  61. Christophe GRENIER <grenier@cgsecurity.org>
  62. http://www.cgsecurity.org
  63.  
  64.  
  65. Disk /dev/sda2 - 524 MB / 500 MiB - CHS 63 255 63
  66.  
  67. [ Analyse ] Analyse current partition structure and search for lost partitions
  68. >[ Advanced ] Filesystem Utils
  69. [ Geometry ] Change disk geometry
  70. [ Options ] Modify options
  71. [ Quit ] Return to disk selection
  72.  
  73. Note: Correct disk geometry is required for a successful recovery. 'Analyse'
  74. process may give some warnings if it thinks the logical geometry is mismatched.
  75.  
  76. => hit enter (since it's a filesystem, not a disk, so no need to scan for geometry, partitions, etc.)
  77. =========================================
  78.  
  79. TestDisk 6.13, Data Recovery Utility, November 2011
  80. Christophe GRENIER <grenier@cgsecurity.org>
  81. http://www.cgsecurity.org
  82.  
  83. Disk /dev/sda2 - 524 MB / 500 MiB - CHS 63 255 63
  84.  
  85. Partition Start End Size in sectors
  86. > P ext4 0 0 1 63 188 61 1024000 [suseboot]
  87.  
  88. [ Type ] >[Superblock] [ List ] [Image Creation] [ Quit ]
  89. Locate ext2/ext3/ext4 backup superblock
  90.  
  91. => This is the stupid screen where "Superblock" is default. Why the hell do I care about the superblock? It's meaningless to me
  92. Hit the right arrow to select "List"
  93.  
  94.  
  95. =========================================
  96.  
  97. TestDisk 6.13, Data Recovery Utility, November 2011
  98. Christophe GRENIER <grenier@cgsecurity.org>
  99. http://www.cgsecurity.org
  100.  
  101. Disk /dev/sda2 - 524 MB / 500 MiB - CHS 63 255 63
  102.  
  103. Partition Start End Size in sectors
  104. > P ext4 0 0 1 63 188 61 1024000 [suseboot]
  105.  
  106. [ Type ] [Superblock] >[ List ] [Image Creation] [ Quit ]
  107. List and copy files
  108.  
  109. => notice the ">" moved to [ List ]
  110. hit enter
  111. =========================================
  112.  
  113. TestDisk 6.13, Data Recovery Utility, November 2011
  114. Christophe GRENIER <grenier@cgsecurity.org>
  115. http://www.cgsecurity.org
  116. P ext4 0 0 1 63 188 61 1024000 [suseboot]
  117. Directory /
  118.  
  119. >drwxr-xr-x 0 0 5120 17-Jun-2014 09:45 .
  120. drwxr-xr-x 0 0 5120 17-Jun-2014 09:45 ..
  121. ?--------- 0 0 0 grub
  122. lrwxrwxrwx 0 0 33 11-Jun-2014 10:09 sysctl.conf-3.7.10-1.1-desktop
  123. -rw-r--r-- 0 0 620544 27-Mar-2014 10:11 message
  124. -rw-r--r-- 0 0 746580 12-May-2014 17:28 vmlinux-3.7.10-1.1-desktop.gz
  125. -rw-r--r-- 0 0 0 17-Jun-2014 09:45 config-3.7.10-1.1-desktop
  126. -rw-r--r-- 0 0 176760 28-Jan-2013 07:36 memtest.bin
  127. -rw-r--r-- 0 0 2681728 4-Feb-2014 00:08 boot.readme
  128. -rw-r--r-- 0 0 0 17-Jun-2014 09:45 symvers-3.7.10-1.1-desktop.gz
  129.  
  130. [...]
  131. Next
  132. Use Right to change directory, h to hide deleted files
  133. q to quit, : to select the current file, a to select all files
  134. C to copy the selected files, c to copy the current file
  135.  
  136. => hover on a directory, hit enter to go inside
  137. or hover on a file, hit c to copy it somewhere
  138.  
  139. =========================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement