Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-15-2011, 02:47 AM
|
#1
|
|
LQ Newbie
Registered: May 2010
Location: Bangalore
Distribution: Ubuntu
Posts: 22
Rep:
|
Windows chkdsk deletes files written by Ubuntu on an NTFS partition
I'm getting a weird problem. I have dual boot Windows Vista and Ubuntu(11.04) on my computer. While using Ubuntu I mount the NTFS partition(read & write) as most of my data like songs are present in it. Whenever I save some new files in this partition through Ubuntu, and boot into windows, windows says the file system is corrupted and runs chkdsk. Then it deletes whatever new files that I had saved in the NTFS partition. Am I doing something wrong here?
|
|
|
|
11-15-2011, 02:57 AM
|
#2
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Are you shutting down properly?
Which filesystem do you use for the ntfs filesystem? ntfs-3g? Check /etc/fstab.
How do you mount the ntfs filesystem? If you had been letting it automount under /media, try using an entry in /etc/fstab instead. Use the ntfs-3g filetype, and mount it elsewere such as under /mnt/. At least for a test.
Look in your kernel logs for any error messages after writing a file. Also check for messages when the filesystem was mounted.
As a last resort, you could create a fat32 partition that you use to save files you want available to both OSes. Writing to the windows System partition may not be the safest thing to do, given the complaints Windows is giving.
|
|
|
|
11-17-2011, 10:46 PM
|
#3
|
|
LQ Newbie
Registered: May 2010
Location: Bangalore
Distribution: Ubuntu
Posts: 22
Original Poster
Rep:
|
Quote:
Originally Posted by jschiwal
Are you shutting down properly?
|
Most of the times I hibernate both windows/Ubuntu. Only occasionally I shut them down. Is it a problem?
Quote:
Originally Posted by jschiwal
Which filesystem do you use for the ntfs filesystem? ntfs-3g? Check /etc/fstab.
|
I use ntfs as type for the entry in /etc/fstab
Quote:
Originally Posted by jschiwal
How do you mount the ntfs filesystem? If you had been letting it automount under /media, try using an entry in /etc/fstab instead. Use the ntfs-3g filetype, and mount it elsewere such as under /mnt/. At least for a test.
|
I believe having an entry in /etc/fstab would automatically mount the drive on boot. Isn't it? I have /home/<user>/windows as my mount point.
Quote:
Originally Posted by jschiwal
Look in your kernel logs for any error messages after writing a file. Also check for messages when the filesystem was mounted.
|
I looked into the /var/log/kern.log file. I don't see any logs when writing a file or mounting the filesytem
Quote:
Originally Posted by jschiwal
As a last resort, you could create a fat32 partition that you use to save files you want available to both OSes. Writing to the windows System partition may not be the safest thing to do, given the complaints Windows is giving.
|
The partition I'm trying to use is not a windows system partition(C:\) but just an NTFS partition(D:\).
|
|
|
|
11-18-2011, 09:53 AM
|
#4
|
|
Member
Registered: Aug 2009
Distribution: CentOS
Posts: 692
|
Quote:
Originally Posted by chekhov_neo
Most of the times I hibernate both windows/Ubuntu. Only occasionally I shut them down. Is it a problem?
|
When an OS wakes up from hibernation, it expects to find its mounted file systems in the same state in which it left them. Any change is likely to cause problems. And, that's going to happen in both directions. An awakened Windows won't like what Ubuntu did to its file system while Windows was in hibernation, and an awakened Ubuntu will have an inconsistent view of that NTFS file system if Windows made any changes while Ubuntu was in hibernation (assuming that Ubuntu had the NTFS file system mounted when it went into hibernation).
|
|
|
|
11-18-2011, 11:03 AM
|
#5
|
|
Member
Registered: Aug 2011
Posts: 626
Rep:
|
I had also lost data while keeping windows in hibernating state with folders of my data partition open. However, I have not had a problem if I close down the folders before subjecting windows to hibernation. Then even if I go to ubuntu and work on files in those folders, I do not lose data on coming back to windows (I am shutting ubuntu down and not hibernating it). I suspect that windows unmount partitions which are not open in windows explorer. From ubuntu also, it may be safer to unmount data partitions before hibernating it and going to windows.
Last edited by rng; 11-18-2011 at 11:05 AM.
|
|
|
|
11-18-2011, 04:36 PM
|
#6
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,223
|
Quote:
Originally Posted by chekhov_neo
I use ntfs as type for the entry in /etc/fstab
|
That might imply the in-kernel NTFS driver. Which is not what you want for write access. Let's see the output of "df -hT"
|
|
|
|
11-23-2011, 09:38 PM
|
#7
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
If you shut down cleanly from both Linux & Windows, do you still have the problem? If it's possible to boot up to one after hibernating the other, that might cause a problem. Some of the updates to the filesystem may be cached, and not written to disk. If the problem persists after shutting down both, the problem isn't with hibernating.
I'd recommend mounting with the ntfs-3g filesytem. If you do both, cleanly shutdown, and use ntfs-3g, do you still have the problem?
Please post your /etc/fstab entry for the NTFS filesystem. Seeing what the mount options are may help as well.
---
Note, reading the README file for ntfs-3g, it emphasizes placing the /etc/fstab entry at the END of the file. I don't know why this is recommended, or if there is a difference in this recommendation for the ntfs filesystem. Ntfs-3g uses fuse. The fuse kernel module needs to be loaded.
Last edited by jschiwal; 11-23-2011 at 09:52 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:09 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|