LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-04-2004, 06:19 PM   #1
hohead
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
Question Mounted read-write Fat32 partition suddenly becomes read-only??


Ok, first of all, I've been using linux for a couple of months now with a couple different distros, and I have never had any problems with mounting any of my FAT32 partitions.
I recently decided to try out the new Mandrake 10 Community release, and about a week after I started using Mandrake 10, this is when the problems started happening. Hopefully someone can help me get this figured out.

This is what's happening:
I have a partition that I am trying to mount in linux. This is no problem, and it mounts just fine with this in my fstab:
Quote:
/dev/hda6 /mnt/Slappy vfat user,exec,umask=000,rw 0 0
Note: I've also tried MANY MANY other fstab entries. Nothing seems to change my problem...
So the partition mounts just fine. And I can read/write to it without any problems at all.
I usually use this partition as my "Download" partition, so I open up Azureus (A BitTorrent client) and I start downloading. Then about after 5 mins of downloading, the downloads will stop and I will get an error in Azureus saying:
Quote:
Read-only file system
Hrmm.. that's strange. All of a sudden linux thinks this partition is read-only? When minutes before I had just tested it by making a directory and writing a new file to the partition using Konqueror.

Now I open up Konqueror again and try to make a new folder to the partition again and I get :
Quote:
Error - Konqueror. Could not make folder /mnt/Slappy/New Folder
And when i try to copy a file over to the partition I get:
Quote:
Information - Konqueror. Could not write to /mnt/Slappy/Blahblah
I also tried doing these things as root in BASH, and it gives me the error:
Quote:
cp: cannot create regular file `/mnt/Slappy/01. Hells Bells.mp3': Read-only file system
Same thing happens with mkdir.

So somehow, for some reason, the partition is changing itself from being read/write for all to becomming read-only.
Sorry for making this post so long, and again, I have tried many many different techniques to try and mount the partition as. None of them worked.

Thanks to whoever can help me on this!
 
Old 04-04-2004, 06:36 PM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
If you check /var/log/messages, I will bet that you find out that you need to boot into Windows and run scandisk. You probably have something screwed up in that filesystem.

I had some filenames that Windows couldn't figure out and had to rename to understand. Windows filesystems aren't the best filesystems in the world IMHO.
 
Old 04-04-2004, 06:54 PM   #3
hohead
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Well I'll be a monkey's uncle!
I checked it out and there are a BUNCH of errors like these:
Quote:
Apr 4 18:31:07 localhost kernel: clusters badly computed (587 != 531)
Apr 4 18:31:07 localhost kernel: FAT: Filesystem panic (dev hda6)
Apr 4 18:31:07 localhost kernel: clusters badly computed (588 != 532)
Apr 4 18:31:08 localhost kernel: FAT: Filesystem panic (dev hda6)
Apr 4 18:31:08 localhost kernel: clusters badly computed (589 != 533)
Apr 4 18:31:09 localhost kernel: FAT: Filesystem panic (dev hda6)
Apr 4 18:31:09 localhost kernel: clusters badly computed (590 != 534)
I think I'll boot into Windows and use some Norton's Utilities to fix these.
Doesn't linux have any good scandisk utilities?

Thanks for your help!
 
Old 04-04-2004, 07:02 PM   #4
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
I haven't seen any linux utilities mentioned for Microsoft's file systems. You could always check on Freshmeat and Sourceforge.
 
Old 05-05-2004, 02:59 PM   #5
Livewire_T
LQ Newbie
 
Registered: May 2004
Posts: 7

Rep: Reputation: 0
I had the same problem but scandisk didn't fix it.
Here's what I did:
Log in as root
unmount the FAT filesystem -- umount /mnt/dos or wherever it's located.
/sbin/fsck.vfat -a /dev/hda5 or whichever device it is

This did a better job of fixing the bad clusters than scandisk.
You should get an output something like this:
Contains a free cluster (1). Assuming EOF.
Free cluster summary wrong (224825 vs. really 224826)
Auto-correcting.
Performing changes.
/dev/hda5: 786 files, 1693062/1917888 clusters

Then just remount the filesystem read-write and you're good to go.
 
Old 05-05-2004, 05:29 PM   #6
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
Just when you think you know a little bit about Linux, you find out it fixes MS fllesystems better too!.

Time to give a donation to the kernel team to encourage some neat NTFS stuff too!
 
Old 02-03-2007, 09:22 PM   #7
KKS
LQ Newbie
 
Registered: Feb 2007
Location: México
Distribution: Slackware 11
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by Livewire_T
I had the same problem but scandisk didn't fix it.
Here's what I did:
Log in as root
unmount the FAT filesystem -- umount /mnt/dos or wherever it's located.
/sbin/fsck.vfat -a /dev/hda5 or whichever device it is

This did a better job of fixing the bad clusters than scandisk.
You should get an output something like this:
Contains a free cluster (1). Assuming EOF.
Free cluster summary wrong (224825 vs. really 224826)
Auto-correcting.
Performing changes.
/dev/hda5: 786 files, 1693062/1917888 clusters

Then just remount the filesystem read-write and you're good to go.
I've got the same problem with a FAT partition. I can't even give write permissions to it as root.
I tried what you said, but the fsck command doesn't have a vfat support (I don't know how it's called).
I tried a whereis and this is what I got:
# whereis fsck
fsck: /sbin/fsck /sbin/fsck.cramfs /sbin/fsck.umsdos /sbin/fsck.reiserfs /sbin/fsck.jfs /sbin/fsck.xfs /sbin/fsck.ext2 /sbin/fsck.ext3 /sbin/fsck.hpfs /sbin/fsck.minix /sbin/fsck.msdos /usr/man/man8/fsck.8.gz /usr/share/man/man8/fsck.8.gz

It's got support for lots of *nix file systems, but not for MS's (except for msdos).

Can anyone help me out with this?

I'm a real at Slackware.
 
Old 02-03-2007, 09:53 PM   #8
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
I think you have to compile your own kernel in slackware, don't you?

If so, you have to either compile support for the Microsoft file systems you want as either modules or build them into the kernel.

If you can get pre-built packages, try this command to see what kernel you are running and then download the kernel module that fits the kernel

uname -rm

Then install and load the module

depmod -ae

Last edited by fancypiper; 02-06-2007 at 07:56 AM.
 
Old 04-05-2007, 01:17 PM   #9
subwaycookie
LQ Newbie
 
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
I've got a similar problem...
I'm using Xubuntu 6.10 (Edgy Eft)

First everything was alright with my USB-Stick. then it could only be mounted in ro-mode.

the fstab entry looks like this:

Code:
/dev/sda1       /media/sda1     vfat,ntfs   rw,user,noauto     0       0
then I started dmesg, which returned following:

Code:
[ 8003.038329]     fat_get_cluster: invalid cluster chain (i_pos 0)
[ 8003.038558] FAT: Filesystem panic (dev sda1)
[ 8003.038615]     fat_get_cluster: invalid cluster chain (i_pos 0)
[ 8003.262257] FAT: Filesystem panic (dev sda1)
[ 8003.262331]     fat_get_cluster: invalid cluster chain (i_pos 0)
[ 8003.262560] FAT: Filesystem panic (dev sda1)
[ 8003.262616]     fat_get_cluster: invalid cluster chain (i_pos 0)
[ 8004.038150] FAT: Filesystem panic (dev sda1)
[ 8004.038222]     fat_get_cluster: invalid cluster chain (i_pos 0)
[ 8004.038450] FAT: Filesystem panic (dev sda1)
[ 8004.038506]     fat_get_cluster: invalid cluster chain (i_pos 0)
well...many more entries that look like this.

so I used:
Code:
fsck -a /dev/sda1
it returned:
Code:
fsck 1.39 (29-May-2006)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/GaimPortable
  Contains a free cluster (2821). Assuming EOF.
Root directory is full.
now I don't know what to do...there is still a lot of space left on the device(651,3 MB), and how do I fix the problem?

Ahh...now it works: i had to use:
Code:
fsck -r /dev/sda1

Last edited by subwaycookie; 04-05-2007 at 01:34 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
read/write to fat32 doesn't work anymore jnev Linux - General 10 09-11-2005 10:23 PM
fat32 partition, ordinary users read/write quietbyday Linux - General 1 08-02-2005 12:31 AM
Allowing read/write on mounted captive-ntfs partition divsky Linux - General 6 04-15-2004 11:52 AM
read/write remote access to fat32 via samba totococo Linux - General 2 11-06-2003 04:00 AM
Fs mounted in Read Only , Read Write Mode benjaminrtz Linux - General 2 07-31-2002 03:52 AM


All times are GMT -5. The time now is 05:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration