<style type="text/css">
    /* Add Social Bookmars Plugin By Aditya Subawa @ www.adityawebs.com */
    ul.aditya-social { list-style:none; margin:15px auto;display:inline-block; }
    ul.aditya-social li { display:inline; float:left; background-repeat:no-repeat; }
    ul.aditya-social li a { display:block; width:48px; height:48px; padding-right:10px; position:relative; text-decoration:none; }
    ul.aditya-social li a strong { font-weight:normal; position:absolute; left:20px; top:-1px; color:#fff; padding:3px; z-index:9999; text-shadow:1px 1px 0 rgba(0, 0, 0, 0.75); background-color:rgba(0, 0, 0, 0.7); -moz-border-radius:3px; -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); -webkit-border-radius:3px; -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); border-radius:3px; box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);}
    ul.aditya-social li.aditya-facebook { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/facebook.png"); }
    ul.aditya-social li.aditya-twitter { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/twitter.png"); }
    ul.aditya-social li.aditya-stumbleupon { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/stumbleupon.png"); }
    ul.aditya-social li.aditya-digg { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/digg.png"); }
    ul.aditya-social li.aditya-delicious { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/delicious.png"); }
    ul.aditya-social li.aditya-yahoo { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/yahoo.png"); }
    ul.aditya-social li.aditya-reddit { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/reddit.png"); }
    ul.aditya-social li.aditya-technorati { background-image:url("/wp-content/plugins/wp-add-socialbookmarks/images/technorati.png"); }
    #aditya-cssanime:hover li { opacity:0.2; }
    #aditya-cssanime li { -webkit-transition-property: opacity; -webkit-transition-duration: 500ms;-moz-transition-property: opacity; -moz-transition-duration: 500ms; }
    #aditya-cssanime li a strong { opacity:0; -webkit-transition-property: opacity, top; -webkit-transition-duration: 300ms; -moz-transition-property: opacity, top; -moz-transition-duration: 300ms; }
    #aditya-cssanime li:hover { opacity:1; }
    #aditya-cssanime li:hover a strong { opacity:1; top:-10px; }
    /* Add Social Bookmarks Plugins By Aditya Subawa @ www.adityawebs.com */
    </style>

{"id":2287,"date":"2016-07-25T09:32:32","date_gmt":"2016-07-25T09:32:32","guid":{"rendered":"http:\/\/johncanning.net\/wp\/?p=2287"},"modified":"2016-07-25T14:01:21","modified_gmt":"2016-07-25T14:01:21","slug":"recover-an-accidentally-wiped-hard-drive","status":"publish","type":"post","link":"http:\/\/johncanning.net\/wp\/?p=2287","title":{"rendered":"Recover an accidentally wiped hard drive"},"content":{"rendered":"<p>About 48 hours ago I would have been mystified how anyone could wipe their entire harddrive. On Saturday I attempted to upgrade my installation of Linux Mint from 17.3 to 18. The upgrade path failed so I opted for the recommended path of doing a clean install.<\/p>\n<p>This need not be a big deal. My set up was quite simple:<\/p>\n<p>1. A Solid State Drive (100GB) on which I keep Mint and the software running on Mint.<br \/>\n2. A 2TB hard disk where I keep everything else. (I set up Mint to write Documents, Pictures, Videos etc. to this drive.<br \/>\n(3. I also have a 3TB My Clould to which I save pictures, so I didn\u2019t loose everything)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-2285\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t2.png\" alt=\"t2\" width=\"1\" height=\"1\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-2285\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t2.png\" alt=\"t2\" width=\"1\" height=\"1\" \/><br \/>\nFor some reason when installing Mint I chose the option to wipe the 2TB hard drive clean instead of the 100GD SSD.<\/p>\n<p>Fortunately, I had recently read Linux Format\u2019s Round up of rescue distros (Issue 209, April 2016) so I was mildly aware there might be an opportunity to get my data back. I opted to install testdisk.<\/p>\n<p>I\u2019ll cut out some of the things I tried to do, but this is the short version<\/p>\n<p>Open the Linux Terminal (CTRL+ ALT+ T)<\/p>\n<p><code> sudo apt install testdisk<\/code><\/p>\n<p>I then ran a utility inside testdisk called photorec typing into the terminal<\/p>\n<p><code>photorec<\/code><\/p>\n<p>See instructions at: <a href=\"http:\/\/www.cgsecurity.org\/wiki\/PhotoRec_Step_By_Step\">http:\/\/www.cgsecurity.org\/wiki\/PhotoRec_Step_By_Step<\/a><\/p>\n<p>After selecting to recover the 2TB disk and choosing a location to save the recovered files then following is in process:<\/p>\n<p>Terminal view (I\u2019m hoping it will not take 24 hours to complete. It said 72 hours about an hour ago!)<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2290 aligncenter\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t5-300x190.png\" alt=\"t5\" width=\"531\" height=\"336\" srcset=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t5-300x190.png 300w, http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t5.png 664w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/p>\n<p>The program saved the recovered files into these folders.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-2292 aligncenter\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t7-300x215.png\" alt=\"t7\" width=\"500\" height=\"359\" srcset=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t7-300x215.png 300w, http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t7-768x550.png 768w, http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t7.png 805w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>The obvious issue here is that the recovered files don\u2019t appear with their original file names and the folder structure is not maintained. However, there are some more important issues here:<\/p>\n<ol>\n<li>This has been surprising easy to do. On one hand that is a good thing as it means I\u2019ve got my files back. On the other hand, the ease with which I recovered files demonstrates how insecure the process of wiping a hard drive is. Once anyone gets hold of the hard drive it is amazingly easy to recover anything that was on there.<\/li>\n<li>This process retrieves everything including files I had already deleted and pictures from websites I had visited. For example some of the folders contain pictures of the people I follow on twitter, I did not download these.<\/li>\n<li>When I say retrieves everything I mean everything. Most of the files retrieved are things like web buttons.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-2291 aligncenter\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t6-300x215.png\" alt=\"t6\" width=\"467\" height=\"335\" srcset=\"http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t6-300x215.png 300w, http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t6-768x549.png 768w, http:\/\/johncanning.net\/wp\/wp-content\/uploads\/2016\/07\/t6.png 797w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/>Anyway the main lessons here are as follows.<\/p>\n<ol>\n<li>Check very carefully before you delete.<\/li>\n<li>It is easierto recover files than I thought:<br \/>\na) This is a good thing if you made a mistake.<br \/>\nb) This is a bad thing it you actually wanted to securely wipe a drive. If you want to wipe a drive so no one else can<a href=\"https:\/\/www.linux.com\/learn\/wiping-your-disk-drive-clean\"> read it, some research is needed <\/a>. Deleting your files and reformatting is not enough.<\/li>\n<\/ol>\n<p>Photorec: <a href=\"http:\/\/www.cgsecurity.org\/wiki\/PhotoRec_Step_By_Step\">Step by step (also works with Windows) <\/a><\/p>\n<p>Using <a href=\"http:\/\/www.cgsecurity.org\/wiki\/After_Using_PhotoRec\">python coding <\/a>to sort out the files afterwards (not tried yet!)<\/p>\n\n\n<ul class=\"aditya-social\" id=\"aditya-cssanime\">\n<li class=\"aditya-twitter\"><a href=\"http:\/\/twitter.com\/share?url=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287&amp;url=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287\" target=\"_blank\" rel=\"nofollow\" title=\"Twitter\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/twitter.png\" alt=\"Twitter\" title=\"Twitter\" \/><\/a><\/li>\n<li class=\"aditya-delicious\"><a href=\"http:\/\/del.icio.us\/post?url=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287&amp;title=Recover+an+accidentally+wiped+hard+drive\" target=\"_blank\" rel=\"nofollow\" title=\"del.icio.us\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/delicious.png\" alt=\"del.icio.us\" title=\"del.icio.us\" \/><\/a><\/li>\n<li class=\"aditya-digg\"><a href=\"http:\/\/digg.com\/submit?phase=2&amp;url=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287&amp;title=Recover+an+accidentally+wiped+hard+drive\" target=\"_blank\" rel=\"nofollow\" title=\"Digg\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/digg.png\" alt=\"Digg\" title=\"Digg\" \/><\/a><\/li>\n<li class=\"aditya-facebook\"><a href=\"http:\/\/facebook.com\/sharer.php?u=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287&amp;t=Recover+an+accidentally+wiped+hard+drive\" target=\"_blank\" rel=\"nofollow\" title=\"Facebook\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/facebook.png\" alt=\"Facebook\" title=\"Facebook\" \/><\/a><\/li>\n<li class=\"aditya-technorati\"><a href=\"http:\/\/technorati.com\/faves?add=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287\" target=\"_blank\" rel=\"nofollow\" title=\"Technorati\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/technorati.png\" alt=\"Technorati\" title=\"Technorati\" \/><\/a><\/li>\n<li class=\"aditya-reddit\"><a href=\"http:\/\/reddit.com\/submit?url=Recover+an+accidentally+wiped+hard+drive&amp;u=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287\" target=\"_blank\" rel=\"nofollow\" title=\"Reddit\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/reddit.png\" alt=\"Reddit\" title=\"Reddit\" \/><\/a><\/li>\n<li class=\"aditya-yahoo\"><a href=\"http:\/\/buzz.yahoo.com\/submit?submitUrl=Recover+an+accidentally+wiped+hard+drive&amp;u=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287\" target=\"_blank\" rel=\"nofollow\" title=\"Yahoo Buzz\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/yahoo.png\" alt=\"Yahoo Buzz\" title=\"Yahoo Buzz\" \/><\/a><\/li>\n<li class=\"aditya-stumbleupon\"><a href=\"http:\/\/stumbleupon.com\/submit?url=http%3A%2F%2Fjohncanning.net%2Fwp%2F%3Fp%3D2287&amp;title=Recover+an+accidentally+wiped+hard+drive&amp;newcomment=Recover+an+accidentally+wiped+hard+drive\" target=\"_blank\" rel=\"nofollow\" title=\"StumbleUpon\"><img decoding=\"async\" src=\"http:\/\/johncanning.net\/wp\/wp-content\/plugins\/wp-add-social-bookmarks\/images\/stumbleupon.png\" alt=\"StumbleUpon\" title=\"StumbleUpon\" \/><\/a><\/li>\n<\/ul>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>About 48 hours ago I would have been mystified how anyone could wipe their entire harddrive. On Saturday I attempted to upgrade my installation of Linux Mint from 17.3 to 18. The upgrade path failed so I opted for the recommended path of doing a clean install. This need not be a big deal. My &hellip; <a href=\"http:\/\/johncanning.net\/wp\/?p=2287\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Recover an accidentally wiped hard drive<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[180,198,242,241],"tags":[],"class_list":["post-2287","post","type-post","status-publish","format-standard","hentry","category-linux","category-mint","category-photorec","category-testdisk"],"_links":{"self":[{"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2287"}],"version-history":[{"count":5,"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2287\/revisions"}],"predecessor-version":[{"id":2296,"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2287\/revisions\/2296"}],"wp:attachment":[{"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2287"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/johncanning.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}