Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Windows 7 and Ubuntu 12.04 as dual-boot and on the same 500GB HDD.

I have partitioned the drive into NTFS file system from Windows before I installed Edubuntu 12.04 in the remaining free space.

Now, there is a drive(G:) accessible through Windows and has few folders.

  • I boot into Edubuntu and create a folder "LinTor" and download movies and few software from torrentz. Before I download, it showed 49GB free out of 62GB. After all the downloads it showed 31GB free out of 62GB.

  • Then I boot into Windows and I couldn't find this "LinTor" folder. I wondered that might be happening as I hibernate Edubuntu (using sudo pm-hibernate) and then boot into Windows. I then create another folder in the same drive(G:) with the name "001" to check if this was accessible from Edubuntu.

  • Now I reboot into Edubuntu to find that "LinTor" folder has disappeared and "001" folder wasn't showing up either. Surprisingly, the drive size still shows 31GB free out of 62GB but when I check it from Windows, it shows 49GB free of 62GB.

There is one thing I would like to mention. When I was trying to unmount the NTFS drive(G:) from Edubuntu before booting into Windows, it prompted me with this message:

Do you want to empty the trash before you unmount the drive? Once the trash is emptied the data is permanently deleted and cannot be recovered.

Please help me understand what could be the problem and how do I recover the missing folder?

share|improve this question
    
Check your trash...what do you see?..empty? –  Prasad RD Sep 19 '12 at 13:51

3 Answers 3

Before you reformat the drive there is a lot you can do to recover your data or attempt a repair. One option is to install testdisk from a Terminal with

sudo apt-get install testdisk

With no other disk attached (including USB media) run it by typing

sudo testdisk

From the first screen choose the option to create a new log. From the next screen you should see just one disk - press enter to proceed. On the next screen, press enter to select an Intel partition table type. Choose analyze on the next screen. You may be asked it you want Testdisk to check for Windows created partitions - select yes if so.

At the next screen you should see a list of partitions - how many depends on how you installed Linux. You can choose each one in turn by highlighting the appropriate one and pressing "P" to list the files and from there you will get the option to press "C" to copy files and or directories. They will go, by default, to the directory you were in when you started Testdisk. Make sure you have enough space before you start (run du -h in another Terminal tab if you can't remember).

At this point you will have a copy of your data without changing anything on your disk - Testdisk can read partitons which Windows cannot see and Linux hasn't got mounted. If you start running anything that attempts to repair the partition table (for example) you risk losing access to the data. A Format is your data's tombstone for sure.

share|improve this answer

I would try reformatting your drive Ubuntu can read NTFS no problem. Boot to windows and move all date from G to C drives then go to my computer and right click G drive and format as NTFS and move the data back to G. Now boot ubuntu an open home folder and click your drive in the left hand dialog.

If it is not there install NTFS config and set it up for Read and Wright and auto mount.

sudo apt-get install ntfs-config

Reboot and open the home folder again and choose your drive.

Hope this helps

share|improve this answer

If you have a ntfs partition you use in dual boot from both Linux and Windows ALWAYS shut down the one system if you want to boot the other. If you don't do so the partition will not be properly unmounted. If you use hibernate, a system remembers it's state and the usage flags for the partition are being held (I have to admit I'm not that much into the technical details here, maybe someone else can provide a more technical correct answer). As a consequence the other system (Windows) cannot access that partition properly. Even if you reboot and wake the previous system (Ubuntu) from hibernate Windows might have tried to access the partition in the meantime, so it's state changed. If you shutdown when changing systems you'll prevent those errors in the future.

I have no idea how to recover the lost files though. Sorry!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.