LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mounted read-write Fat32 partition suddenly becomes read-only?? (https://www.linuxquestions.org/questions/linux-general-1/mounted-read-write-fat32-partition-suddenly-becomes-read-only-166190/)

hohead 04-04-2004 05:19 PM

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! ;)

fancypiper 04-04-2004 05:36 PM

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. :rolleyes:

hohead 04-04-2004 05:54 PM

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. :rolleyes:
Doesn't linux have any good scandisk utilities? :confused:

Thanks for your help! :)

fancypiper 04-04-2004 06:02 PM

I haven't seen any linux utilities mentioned for Microsoft's file systems. You could always check on Freshmeat and Sourceforge.

Livewire_T 05-05-2004 01:59 PM

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.

fancypiper 05-05-2004 04:29 PM

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!

KKS 02-03-2007 08:22 PM

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 :newbie: at Slackware. :D

fancypiper 02-03-2007 08:53 PM

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

subwaycookie 04-05-2007 12:17 PM

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


All times are GMT -5. The time now is 01:18 PM.