{"id":543,"date":"2008-08-05T02:27:36","date_gmt":"2008-08-05T06:27:36","guid":{"rendered":"http:\/\/www.psychocats.net\/ubuntucat\/?p=543"},"modified":"2009-07-14T02:43:48","modified_gmt":"2009-07-14T06:43:48","slug":"recoverdeletedfiles","status":"publish","type":"post","link":"https:\/\/www.psychocats.net\/ubuntucat\/recoverdeletedfiles\/","title":{"rendered":"Recovering deleted files with a Ubuntu CD"},"content":{"rendered":"<p><b>Continued from<\/b> <a href=\"http:\/\/www.psychocats.net\/ubuntucat\/recovering-windows-files-with-a-ubuntu-cd-ii-getting-your-files\/\">Recovering Windows files with a Ubuntu CD II: getting your files<\/a><\/p>\n<p> <b>Introduction<\/b><br \/> Usually when you delete a file from your computer, the file is still there&mdash;its space, however, is marked as available for use. Even if you reformat your hard drive and reinstall Windows (I had a friend who did this by accident, and I used Ubuntu to save her data), most of your data is probably still there. <\/p>\n<p> Assuming you were able to boot the Ubuntu CD <i>and<\/i> it properly detected your internet connection, you can use a program called <a href=\"http:\/\/www.cgsecurity.org\/wiki\/PhotoRec\">Photorec<\/a> to recover your personal files. <\/p>\n<p> If Ubuntu does not automatically detect your internet connection, and you have access to the internet on another computer, you can download the appropriate two installer files from <a href=\"http:\/\/packages.ubuntu.com\/hardy\/i386\/testdisk\/download\">here<\/a> and <a href=\"http:\/\/packages.ubuntu.com\/hardy\/i386\/libntfs10\/download\">here<\/a>. Find a way (by USB key or iPod) to transfer them to the computer running the Ubuntu live session, and double-click <i>libntfs10<\/i> to install it, and then double-click <i>testdisk<\/i> to install it. <\/p>\n<p> This may be a bit confusing&mdash;the program we want to use is called <i>photorec<\/i>, but the program we want to install that allows us to use Photorec is called <i>testdisk<\/i>. Also, the program is called Photorec, but it recovers many types of files, not just photos. <\/p>\n<p> <b>Installing <i>testdisk<\/i> to use Photorec<\/b><br \/> First, we&#8217;re going to install the program we need in order to use Photorec. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery04.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb04.png\" width=\"316\" height=\"239\" border=\"0\"><\/a><br \/> Click on <i>System<\/i> > <i>Administration<\/i> > <i>Synaptic Package Manager<\/i>. This will open a software management program that will fetch and install software for us. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb05.png\" width=\"290\" height=\"227\" border=\"0\"><\/a><br \/> Click on <i>Settings<\/i> > <i>Repositories<\/i>. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery06.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb06.png\" width=\"278\" height=\"229\" border=\"0\"><\/a><br \/> Make sure all the checkboxes are checked (or ticked), except the CD-ROM source at the bottom. Then click <i>Close<\/i>. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery07.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb07.png\" width=\"238\" height=\"190\" border=\"0\"><\/a><br \/> Click <i>Close<\/i> again. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery08.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb08.png\" width=\"258\" height=\"200\" border=\"0\"><\/a><br \/> At the top-left corner of the Synaptic window, click <i>Reload<\/i> and wait for the new software package information to download. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery09.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb09.png\" width=\"215\" height=\"194\" border=\"0\"><\/a><br \/> Now that we&#8217;ve told the software manager to find all the software that&#8217;s available for installation, let&#8217;s install it. Click <i>Search<\/i> in the Synaptic window, in the search box type <i>testdisk<\/i>, and then click <i>Search<\/i> in the dialogue window. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery10.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb10.png\" width=\"235\" height=\"194\" border=\"0\"><\/a><br \/> <i>testdisk<\/i> should appear in the results. Right-click it and select <i>Mark for installation<\/i>.  <\/p>\n<p>  <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery11.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb11.png\" width=\"260\" height=\"220\" border=\"0\"><\/a><br \/> In the Synaptic window, click <i>Apply<\/i>, and then confirm you want to apply changes by clicking <i>Apply<\/i> in the dialogue window as well. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery12.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb12.png\" width=\"250\" height=\"205\" border=\"0\"><\/a><br \/> Wait for the software to download and install. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery13.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb13.png\" width=\"224\" height=\"161\" border=\"0\"><\/a><br \/> Click <i>Close<\/i> <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery14.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb14.png\" width=\"167\" height=\"112\" border=\"0\"><\/a><br \/> Quit the software manager. <\/p>\n<p> <b>Prepare backup location<\/b><br \/> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery21.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb21.png\" width=\"92\" height=\"164\" border=\"0\"><\/a><br \/> You can use an external hard drive or even internal second hard drive for backup. <\/p>\n<p> For an internal second hard drive, you can access it the same way you accessed the internal first hard drive (the one you&#8217;re trying to recover data from). <\/p>\n<p> If the backup location is an external hard drive, you should be able to plug it in and have it automatically appear on the desktop as an icon. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery22.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb22.png\" width=\"184\" height=\"179\" border=\"0\"><\/a><br \/> Go to <i>Applications<\/i> > <i>Accessories<\/i> > <i>Terminal<\/i> <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery23.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb23.png\" width=\"317\" height=\"192\" border=\"0\"><\/a><br \/>  Type <\/p>\n<div class=\"terminal\">df -h<\/div>\n<p> in the command prompt window that appears. This will show you the path to the backup location. In this example, the backup location I&#8217;m using is 2.8 GB large, so I must make a note that it is available at \/media\/disk-2.  <\/p>\n<p> In Windows, new drives &#8220;mount&#8221; (or become available for use) as new letters (D:, E:, F:, G:, etc.). In Ubuntu, new drives mount as folders inside an all-encompassing directory. The top-level directory is slash (<i>\/<\/i>). Inside that directory is subdirectory called <i>\/media<\/i>, which has inside of it another subdirectory called <i>disk-2<\/i>. That&#8217;s where I want to send the recovered files to. <\/p>\n<p> <b>Recovering files with Photorec<\/b><br \/> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery24.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb24.png\" width=\"325\" height=\"218\" border=\"0\"><\/a><br \/> Before you run Photorec, maximize the command terminal window. To run it, you need to run the command <\/p>\n<div class=\"terminal\">sudo photorec<\/div>\n<p> Don&#8217;t try to run the command <i>photorec<\/i> without <i>sudo<\/i>, as I tried to do earlier in the screenshot.  <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb25.png\" width=\"322\" height=\"240\" border=\"0\"><\/a><br \/> Photorec is a terminal program, so your mouse won&#8217;t work in it. You can navigate its menus with your arrow keys and then select your choices with the Enter key. <\/p>\n<p> The media you are selecting is the drive you want to recover files from. Then click Enter to proceed to the next step.<\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery26.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb26.png\" width=\"275\" height=\"192\" border=\"0\"><\/a><br \/> Select the appropriate partition type. If in doubt, select <i>Intel<\/i>. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery27.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb27.png\" width=\"278\" height=\"190\" border=\"0\"><\/a><br \/> Select to search the whole disk. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery28.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb28.png\" width=\"274\" height=\"102\" border=\"0\"><\/a><br \/> Since this tutorial is aimed specifically at recovering Windows files, you&#8217;ll most likely choose <i>Other<\/i> for filesystem type. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery29.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb29.png\" width=\"258\" height=\"133\" border=\"0\"><\/a><br \/> This is where things get a little tricky. Photorec will assume you want to back up to a folder in Ubuntu&#8217;s \/home\/ubuntu directory, but you probably want to back up to an external drive (in this example, it&#8217;s \/media\/disk-2). <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery30.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb30.png\" width=\"265\" height=\"131\" border=\"0\"><\/a><br \/> To go up a directory, go to the double-dot and press the right arrow key. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery31.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb31.png\" width=\"262\" height=\"95\" border=\"0\"><\/a><br \/> Do the same to go up yet another directory. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery32.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb32.png\" width=\"259\" height=\"170\" border=\"0\"><\/a><br \/> Select <i>media<\/i> and hit Enter. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery33.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb33.png\" width=\"254\" height=\"103\" border=\"0\"><\/a><br \/> Select the drive you want the recovered files to be saved to. In this case, it&#8217;s \/media\/disk-2.  <\/p>\n<p><a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery34.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb34.png\" width=\"271\" height=\"115\" border=\"0\"><\/a><br \/> Once you&#8217;ve selected the backup drive, type <\/p>\n<div class=\"terminal\">Y<\/div>\n<p> for <i>Yes<\/i>. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery35.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb35.png\" width=\"284\" height=\"181\" border=\"0\"><\/a><br \/> Wait for Photorec to scan for files. Depending on the size of your drive, this could take a really long time. The drive I scanned for this example is only 8.7 GB and took about 15 minutes to scan. If you have a 160 GB drive, well, you do the math. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery36.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb36.png\" width=\"275\" height=\"176\" border=\"0\"><\/a><br \/> When it&#8217;s done, you can select <i>Quit<\/i>.  <\/p>\n<p><a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery37.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb37.png\" width=\"251\" height=\"181\" border=\"0\"><\/a><br \/> Select <i>Quit<\/i> again. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery38.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb38.png\" width=\"253\" height=\"185\" border=\"0\"><\/a><br \/> Yes, select <i>Quit<\/i> a third time. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery39.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb39.png\" width=\"318\" height=\"241\" border=\"0\"><\/a><br \/> To exit the command terminal, type <\/p>\n<div class=\"terminal\">exit<\/div>\n<p> <b>Checking the recovered files<\/b><br \/> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery40.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb40.png\" width=\"322\" height=\"221\" border=\"0\"><\/a><br \/> If you look at the backup drive, you should see a bunch of folders full of recovered files. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery41.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb41.png\" width=\"323\" height=\"220\" border=\"0\"><\/a><br \/> Every folder will have a mix of different file types. Some files will be music files. Others will be Word documents. There will be pictures and text files. All sorts of stuff you may not even care about. The labels will be random, so even though you have your files back, it&#8217;ll be up to you to reorganize them and rename them appropriately. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery42.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb42.png\" width=\"268\" height=\"119\" border=\"0\"><\/a><br \/> To get out of the live CD, go to <i>System<\/i> > <i>Quit<\/i>. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery43.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb43.png\" width=\"281\" height=\"204\" border=\"0\"><\/a><br \/> Select the appropriate option, probably <i>Restart<\/i>. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery44.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb44.png\" width=\"218\" height=\"173\" border=\"0\"><\/a><br \/> Wait for the live session to fully end, and then press <i>Enter<\/i> to reboot after the CD ejects. <\/p>\n<p> <a href=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecovery45.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.psychocats.net\/wpimages\/windowsfilerecoverythumb45.png\" width=\"354\" height=\"242\" border=\"0\"><\/a><br \/> After you reboot into Windows, you should be able to access the recovered files.<\/p>\n<p> Congratulations! You just saved yourself hundreds of dollars, learned something new, dabbled in Linux (Ubuntu specifically), and didn&#8217;t give up access to your computer for days or weeks. <\/p>\n<p> You should, of course, <i>always<\/i> back up your files, but it&#8217;s also good to know there are free and easy ways to recover your data otherwise. <\/p>\n<p> If you need any help with this process, please feel free to post a support thread in the Absolute Beginner subforum of <a href=\"http:\/\/www.ubuntuforums.org\">the Ubuntu Forums<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continued from Recovering Windows files with a Ubuntu CD II: getting your files Introduction Usually when you delete a file from your computer, the file is still there&mdash;its space, however, is marked as available for use. Even if you reformat your hard drive and reinstall Windows (I had a friend who did this by accident,&hellip; <a class=\"more-link\" href=\"https:\/\/www.psychocats.net\/ubuntucat\/recoverdeletedfiles\/\">Continue reading <span class=\"screen-reader-text\">Recovering deleted files with a Ubuntu CD<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,12,21,24],"tags":[374,911,191,919,921],"class_list":["post-543","post","type-post","status-publish","format-standard","hentry","category-computers","category-linux","category-ubuntu","category-windows","tag-data-recovery","tag-linux","tag-linux-not-ready","tag-ubuntu","tag-windows","entry"],"_links":{"self":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":27,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":1479,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/543\/revisions\/1479"}],"wp:attachment":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}