FAT32 partition is read-only; tried everything I could find
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
FAT32 partition is read-only; tried everything I could find
I can't make my FAT32 partition on /dev/hdb6 writeable. I have tried many solutions from many online forums, including this one, but none has worked so far.
/dev/hdb6 mounts to /mnt/FAT32. Debian is on /dev/hdb1, so I think the drive works fine. The drive is readable and writeable by Windows XP, on /dev/hda.
I have changed the /dev/hdb6 line of /etc/fstab many times and none of them worked.
I logged in to Gnome as root user to see if I could do anything about it, to no avail. When I right-click on any directory or file under /mnt/FAT32 and choose Properties... and go to the Permissions tab, it says root has read, write, and execute privileges but others have read and execute privileges. Dragging and dropping a file to /mnt/FAT32 is impossible because it gives me an error saying "The destination disk is read-only." Doing mkdir or any other write command also returns an error message that the disk is read-only.
I can open all the files under /mnt/FAT32 just fine. I think I've written to my USB flash drive mounted at /mnt/flash before. Maybe.
Thanks for any insight. I hope it isn't a physical problem of some kind.
I prefer changing the ownership in the mount command (or fstab file) using the uid= and gid= options.
Yes, I tried adding uid=1,gid=1 to the fstab line, but that doesn't work. User 1 is the root user, so it seems like that should be right. I guess I could try it in the mount command. What is the syntax of that?
Quote:
/dev/hdb6 /mnt/FAT3 vfat rw,noauto,user 0 0
Yeah, I've had rw or not, user or users, umask or not, probably some other things. Different combinations. I just tried it again exactly like you wrote it, but it's still read-only. I even had it auto-mount upon startup just to see if that changed anything, but no.
Quote:
Check out this thread! Maybe it will help and let us know.
I looked at the contents of /var/log/messages, and there were several errors like this that make me think there's a physical problem with the drive (I don't know why that would make it read-only, though):
Code:
Nov 5 09:44:14 localhost kernel: hdb: dma_intr: status=0x51 { DriveReady SeekCo mplete Error }
Nov 5 09:44:14 localhost kernel: hdb: dma_intr: error=0x40 { UncorrectableError }, LBAsect=16601855, sector=32
Nov 5 09:44:14 localhost kernel: end_request: I/O error, dev 03:46 (hdb), secto r 32
Nov 5 09:44:14 localhost kernel: bread in fat_access failed
Nov 5 09:44:14 localhost kernel: Directory 1: bad FAT
Nov 5 09:44:15 localhost kernel: hdb: dma_intr: status=0x51 { DriveReady SeekCo mplete Error }
Nov 5 09:44:15 localhost kernel: hdb: dma_intr: error=0x40 { UncorrectableError }, LBAsect=16601855, sector=32
Nov 5 09:44:15 localhost kernel: end_request: I/O error, dev 03:46 (hdb), secto r 32
Nov 5 09:44:15 localhost kernel: bread in fat_access failed
Nov 5 09:44:15 localhost kernel: Filesystem panic (dev 03:46).
Nov 5 09:44:15 localhost kernel: FAT error
Nov 5 09:44:15 localhost kernel: File system has been set read-only
Maybe I'll try the fschk utility mentioned in the thread FredGSandord recommended, which I've already looked at. I was hesitant to use it because I thought it could damage or erase all of the data in a partition.
The difference between user and users is this: user means only
the user that mounted the drive may unmount it; users means any
user may unmount it, whether that user mounted it or not. Since
these Windows partitions can only be mounted by root, it does
not matter which one you select.
You see that I can write to that drive as a normal user.
Code:
mingdao@silas:/Shared$ pico facts
mingdao@silas:/Shared$ ls -lh facts
-rwxrwxrwx 1 root root 29 2006-11-06 04:01 facts*
mingdao@silas:/Shared$ cat facts
Let's get down to the facts.
If that doesn't work for you, your distro is busted.
Last edited by Bruce Hill; 11-05-2006 at 02:20 PM.
When I use the uid= and gid= options, I use my username. It will take either an integer UID/GID or the username/group name respectively.
For example:
/dev/hdb2 /mnt/shared vfat defaults,uid=brucehill,gid=users,fmask=0111,dmask=0000 0 0
I prefer using a separate fmask/dmask instead of umask to enable clearing the "x" bit for files. The "x" bit for directories is needed however.
Your device implies that this is a permanent drive and not a usb drive or SD card, so I didn't use the noauto option. This will mount the drive when you boot up. Using uid= and gid= options allow you to have exclusive permissions ( while in linux ) on the partition if that is what you want. ( ex: uid=brucehill,fmask=0177,dmask=0077 ).
At the risk of sounding stupid (I do it all to often LOL)
have you tried setting the selinux policy to permissive mode? I'm just a noob but I had loads of bother just seeing my ntfs drive and on my searches came across your thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.