jump to navigation

HOW-TO enable read/write in FAT partition after error (or, an openSUSE Forum review) July 25, 2008

Posted by Nigel Ajay Kumar (NAyK) in How-To, Linux, OpenSUSE, Recommendation, Reviews, Working with Linux.
Tags: , , , ,
trackback

This post has two purposes. One to tell how to fix an error that can occur while using dual boot between Windows and Linux (openSUSE). Also, to give a brief review of the openSUSE forum.

Basically, a few weeks ago, I was suddenly unable to write/delete any file from my Windows FAT share in openSUSE. I use Windows XP Home and openSUSE 11, and was having a generally good time with openSUSE, until this problem occurred. I still work extensively in Windows, and so file-sharing between Linux and Windows is crucial. (ps. on the whole, I don’t try to mess with the NTFS partition unless I have to, so I have set up a FAT partition in Windows to better facilitate file sharing from Linux to Windows)

Anyway, for a while I was able to write to my Windows FAT partition, then suddenly, out of the blue, I could only “read” the FAT partition, but not write to it. This affected even my usb flash drives (though this problem mysteriously went away). I desperately tried everything, looking in the internet, enabling NTFS-3G, tried changing permissions etc… but nothing worked. For a while I used my office server to transfer files, but it was getting irritating.

So I did something I never do, I went to the openSUSE forum to send out an s.o.s. help request post.

Just to show how noobish I really am, I just couldn’t figure out how to enter a NEW post… there was only a <replypost> button but to put a <newpost> I struggled in vain. Ultimately after a long time of frustration I suddenly found a button the sections column for <newpost>. In a sense, while I did feel foolish, I still felt that it should be easier to find where to submit a new post, perhaps also in the side-bar. But that’s just me.

Anyway, thinking mine was a hardware query, I posted my first request for help there entitled Cant write on FAT and NTFS (FAT write stopped working)

I realised that the openSUSE forum was quite active, meaning there were many posts requesting help. But when I started browsing for the new queries of other users, I realised that it was quite easy for my post to just disappear from the latest problem. And I think that’s what happened. for a few days there was no response to my query.

I decided to change my category and write a new post in the applications category of the forum. The new post was entitled: Please help: Can’t write/delete FAT (even with SuperUser)

Interestingly, I found almost immediately responses in my “please help” query (perhaps it does help to have a catchy headline?)… and I must state that the help came from none other some senior members and the global moderator (Swerdna). Wow, that’s big!

Anyway, I was quite impressed by such high-level interest in my small request… and we went about trying to fix the problem… as forums do best… through dialogue. And ultimately… a certain DoctorJohn was helpful in intuiting that there could be a problem in my Windows Partition that stopped me from writing to the partition.

I know it all seems obvious now… but when I was going through the turmoil… it was far from a pleasant obvious experience.

Anyway… for the final solution this is what I did… and here’s the HOW-TO part of the post:
1. I made a backup of my vfat partition.

2. Then in openSUSE I did:

umount /windows/E

2b. which was followed by

fsck.vfat /dev/sda5
(as root using “su”)

3. There seemed to be an error in bootsector of the partition and asked whether I wanted to copy from the original to the backup or back to the original. I tried both, but I wasn’t able to fix anything “no files changed” message came up, saying that there was some error in certain files (it thankfully named the files).

4. I therefore went to Windows and deleted those files. And scheduled a boot-time scandisk.

5. Upon completion of the Windows scandisk I reverted to openSUSE and tried to delete a file from my FAT drive…

6. and yes… IT WORKED!!!

Better still, I went to the NTFS partition through ROOT (ie FileManager Super User) and found that I could even write/delete to/from NTFS files.

Back to my review of the openSUSE forum, incidentally just yesterday I found two replies to my query in the hardware section, again, one of the helps was from a senior member. I found that while the openSUSE forum help may not be immediate, it did seem excellent when the help did arrive.

As for structure, it was a little irritating that the forum has a time-out… and does not remember sessions (ie. you have to keep logging in… but it seems to be a Novell related issue… so no need to bother about that).

Also, the forum is primarily “need help” oriented… at least where I went… and I wonder how the people helping have the time to help everyone… especially since the people helping me were pretty senior people (one of them confessed to help me while typing on his cell-phone!)

Anyway, I must admit that considering this was my first help request in a forum, I was more than satisfied by the result. I did need to be patient (a virtue I don’t always have), but for serious issues I know I’ll head faster to the openSUSE forum in the future.

(ps. it must be said on the record that the problem was actually IN windows and not in openSUSE linux. In fact, I wouldn’t have been aware of the problem unless I was using linux for the FAT partition)

Comments»

1. Anonymous - August 5, 2008

fsck.vfat /dev/sda5
(as root using “su”)

could you explain this a little more? I assume sda5 is your FAT drive?

I’ve got a 450GB ‘windows formatted’ drive that I can view and access fine using openSUSE, however I’m unable to write onto the drive which is extremely annoying as it’s my media drive.

I mostly use my Windows PC to copy over files to my PlayStation 3 because it’s generally easier to use Windows Media Player’s ‘share’ function.

though “http://en.opensuse.org/SDB:Samba_file_sharing_in_openSUSE_-_breaking_through_the_window” is extremely helpful also.

2. NAyK - August 5, 2008

To Anonymous: What is your 450GB windows formatted drive formatted as? NTFS or FAT?

If NTFS… then it can be written using ROOT permissions.

3. Bocskai Csaba - August 11, 2008

hello, all!
i had some issues with writing to FAT32. at the end i have discovered the solution.
in my case, in /etc/fstab there should be no “auto” entry for the FAT32 partition. if there is, the system will mount it as user “root”, and then you won’t have write permission, although you have “rw” in there, too.
this is how my fstab file looks like at the FAT32 line:
/dev/sda8 /home/bocskai/transport vfat rw,user,noauto,async 0 0
(I use Debian Etch)

4. Bishal - December 3, 2008

You have said that you made a backup of your vfat partition. how to do that? could you please tell?

Your blog is really great and really the content on your blog are hard to find anywhere else. Would you mind exchanging links with my blog? Actually I am just a beginner and my blog is nothing as compared to yours. But if we exchanged links, that would be a great help to me. So please consider.
My blog is:http://bishaladhikary.com.np
my email: bishal1259@gmail.com
thank you.


Leave a comment