Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have linux mint 10 and windows 7 installed on the same hd. First partition is linux, then swap, then the windows system partition and finally an NTFS partition for commonly used data i would like to share between systems. I work almost exlusively on linux, sometimes booting to windows.

The problem is that mint seems to corrupt the NTFS partitions almost each time - sometimes it's only the data partition widows wants to have checked, sometimes it's the system partition, although i never write to the win system partition from linux.

I have experienced data loss on the data partition after starting windows several times already. The win installation altogether was broken twice - unable to start and had to be reinstalled. And its not years I am talking about but just a few weeks.

I have set up and used dual boot systems before, but only with ubuntu, and never had any problems with data corruption.

What might be the problem and what can be done about it? Any additional info I could provide?

Thank you

share|improve this question
    
If you mount the filesystems as read-only does the corruption still occur? If not I'd then use a FAT32 filesystem to transer data back to Windows as FAT32 support is much more mature in Linux than NTFS. –  Mokubai Mar 22 '11 at 9:41
    
@Mokubai. Thank you Haven't yet tried to mount them read-only. The gnome integration just mounts both win partitions by default. I'll have to look up how to do that. Is there a way to prevent linux from mounting the windows system partition at all? –  kostja Mar 22 '11 at 10:53

2 Answers 2

up vote 4 down vote accepted

The safest thing to do is probably to have the NTFS partitions mounted as read-only and use either a USB memory stick or FAT32 formatted partition to tranfer data, this should prevent any corruption occuring.

The file that determines what filesystems get mounted at boot time is /etc/fstab and it lists the filesystem device (partition) name, the point in the filesystem it gets mounted at (i.e. "/mnt/Windows") and various options that can be passed to the filesystem driver.

There is a program called PySDM that can edit the file for you, and apparently you can get it for Linux Mint at this page.

Using the image below as an example you'll need to look through the partition list until you find the partitions that relate to your Windows install (by checking the mount points) and where you see the options field below you'll probably have something like user,noexec and you'll want to keep whatever options are already there but add ro (for readonly) to the list of options, for example: user,ro,noexec

After a reboot you should hopefully be able to read but not write your NTFS partitions and therefore they should also be protected against corruption. As mentioned a USB memory stick or partition formatted to FAT32 should be safe for files needed by both systems. Dropbox is also a possibility for keeping files in sync between the systems.

PySDM

A bit of info on why you might be getting the corruption:

Windows and Linux running on one system is a mixed bag of issues where it comes to working with data in both operating systems. Microsoft has no desire, and no real reasons, to provide the open source community with details of the full inner workings of the NTFS filesystem. This tends to mean that Linux implementations can be somewhat incomplete or lacking features, though they do tend to quickly catch up with changes.

With each successive upgrade to Windows Microsoft has upgraded the filesystem and Linux has been left in a race to try and catch up and support features for people who want to be able to use both systems at once. So while Linux may be able to safely read and write Windows XP NTFS partitions it may not be as reliable with Windows 7 NTFS partitions yet. It is also possible for different Linux flavours to have different versions of the NTFS drivers which could be why Ubuntu was fine, but Mint is not, though if you were using XP with Ubuntu then that could be why they were happy.

I've used Linux in the past and whenever I've compiled the kernel where the NTFS options are you actually had to consciously enable NTFS Write support as it was marked experimental and potentially dangerous (as you have found out).

FAT32 is a filesystem which is mature, well defined, and hasn't changed for many years so Linux support is very good.

It is entirely possible that after an update in the future you would be able to read and write NTFS partitions without any fear of this happening, but Microsoft are prone to whimsy and could easily re-break support in future.

share|improve this answer
    
This is as great as an answer can get. Thank you so much. –  kostja Mar 22 '11 at 13:13
    
@kostja You are very welcome. Did PySDM work to make the filesystem readonly? –  Mokubai Mar 22 '11 at 13:44
    
Yes, worked like a charm. I am unable to mount the system partition and writing to the data partition is disabled. Have restarted a couple of times to check - no corruption yet :) –  kostja Mar 22 '11 at 16:54

Do you have hybrid sleep enabled (see Win7 Power options in control panel)? It seems that NTFS-3G in Mint, if booted when Win7 is in hybrid sleep, can corrupt the NTFS filesystem - however, it's always a bad idea to hibernate Windows then boot Linux, so it's not completely Mint's fault. See this posting

There are also some other reports of NTFS corruption in Mint.

share|improve this answer
    
Thank you, I never tried to reboot the system while it was hibernating though. The corruption could be reproduced with regular shutdown/restart cycle. –  kostja Oct 17 '11 at 16:50

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.