Results 1 to 7 of 7

Thread: USB thumb-drive (fat32) read only

  1. #1
    Join Date
    May 2007
    Location
    Timor-Leste
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    USB thumb-drive (fat32) read only

    My FAT32 USB pen-drive has recently become read only (again), in Ubuntu, Ubuntu NBR and Xubuntu 10.04. The pen-drive mounts and files can be copied from it. Windows can still read/write to it. I have tried most of the usual tricks (see below) less doing yet another reformat, which I want to avoid.

    One clue may be a number of files tucked away in a sub-folder. They have names like “÷«~┘)·⌐.╘Nº” and “b└g⌠m-i½.╬╦╦” and were modified in 1901 or 1947!!! They are listed as executable programs in their properties (“Allow executing as a program file") and their file size is over 10 Gb, which is funny given that the pen-drive is only 2 Gb!!! I assume they are viruses and will try and clean them in Windows.

    If I cd to the relevant directory and try to remove the offending folder:
    Code:
    $ rm Monthly
    Code:
    rm: cannot remove `Monthly': Read-only file system
    or even
    Code:
    $ rm -rf Monthly
    Code:
    rm: cannot remove `Monthly/\  (list of files)': Read-only file system
    OK, is it read write?
    Code:
    $ mount
    Code:
    /dev/sdf1 on /media/My2GBusb type vfat  (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)
    Looks like it but lets chown:
    Code:
    $ sudo chown john:john -R /media/My2GBusb
    Code:
    chown: changing ownership of `/media/My2GBusb': Read-only file system
    So it’s read only and I can’t change it. Details on the pen-drive are shown below.

    Code:
    $ dmesg
    Code:
    [ 1631.942438] FAT: Filesystem error (dev sdf1) [ 1631.942455] invalid access to FAT (entry 0x0bab04ad)
    Code:
    $ sudo parted /dev/sdf print
    Code:
    Model: Verbatim STORE N GO (scsi) 
    Disk /dev/sdf: 2003MB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Number  Start   End     Size    Type     File system  Flags
    1      4129kB  2003MB  1999MB  primary  fat32
    Code:
    $ sudo fsck /dev/sdf$
    Code:
    fsck from util-linux-ng 2.17.2
    e2fsck 1.41.11 (14-Mar-2010)
    fsck.ext2: No medium found while trying to open /dev/sdf
    The superblock could not be read or does not describe a correct ext2 filesystem.  If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device&gt;
    Code:
    $ sudo dosfsck -a -v /dev/sdf
    Code:
    dosfsck 3.0.7 (24 Dec 2009)
    dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN
    Logical sector size (7950 bytes) is not a multiple of the physical sector size.
    So a couple of errors in there, but I haven't been able to fix them. Any suggestions?

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: USB thumb-drive (fat32) read only

    Quote Originally Posted by ahalin View Post
    ........
    Code:
    $ sudo dosfsck -a -v /dev/sdf
    Code:
    dosfsck 3.0.7 (24 Dec 2009)
    dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN
    Logical sector size (7950 bytes) is not a multiple of the physical sector size.
    So a couple of errors in there, but I haven't been able to fix them. Any suggestions?
    Devices are not partitions:
    Code:
    sudo dosfsck -a -v /dev/sdf1
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  3. #3
    Join Date
    Oct 2007
    Location
    Japan
    Beans
    637
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: USB thumb-drive (fat32) read only

    none of the chown or fsck commands will work on it since it is a MS file system and fat32 has no security options anyway.

    can't you delete the offending directory's in Windows?

    you might be able to run
    Code:
    sudo rm -r -f Monthly
    Since it is only a 2GB thumb drive why not just copy off the 2GB of data and reformat it and copy it back? I can't imagine it would take longer to do that than to make your post. Maybe I am missing something though.
    "Don't Panic"

  4. #4
    Join Date
    Dec 2009
    Beans
    5

    Re: USB thumb-drive (fat32) read only

    I recently ran into a similar problem when I accidentally pulled out a VFAT-formatted USB drive w/o unmounting it. In my case, the issue was that the USB drive now had a corrupt FAT, and when the USB drive was inserted, the Nautilus file GUI was silently marking the drive as read-only to prevent further writes to the corrupt FAT.

    The fix:

    With the USB drive plugged in, unmount the USB drive (right-click on the drive icon on your desktop and select 'Unmount') and bring up the GPartEd partition editor (System->Administration->GPartEd). Under GPartEd, select the USB drive (typically, /dev/sdb) in the upper right-hand pull-down list. If you've chosen the right drive and it's unmounted, you can right-click on any of the partitions listed (typically, only one: /dev/sdb1) and select 'Check' to perform a filesystem check on the partition. Running a filesystem check should correct the FAT on the drive partition - just pull-out and reinsert the USB drive and it should be restored to read-write.

  5. #5
    Join Date
    Jun 2007
    Location
    San Diego
    Beans
    99
    Distro
    Ubuntu

    Re: USB thumb-drive (fat32) read only

    ok, I solved my problem. I hadn't found anything that worked with linux, but I ran the chkdsk utility via the windows command line to fix it and it succeeded (though it took *forever*). I don't like to admit that I was able to do something in windows that I couldn't on linux, but it's sort of because windows ****ed up it's own file system in the first place, so whatever.

  6. #6
    Join Date
    Apr 2006
    Location
    Johannesburg
    Beans
    2
    Distro
    Kubuntu

    Re: USB thumb-drive (fat32) read only

    This worked for me... thanks! In my case my daughter crawled under my desk and switched off while I was doing some writes to the file system. Just one note, you can unmount it straight out of GParted, so there's no need to first unmount and then launch GParted.

    Quote Originally Posted by gifford.scott View Post
    I recently ran into a similar problem when I accidentally pulled out a VFAT-formatted USB drive w/o unmounting it. In my case, the issue was that the USB drive now had a corrupt FAT, and when the USB drive was inserted, the Nautilus file GUI was silently marking the drive as read-only to prevent further writes to the corrupt FAT.

    The fix:

    With the USB drive plugged in, unmount the USB drive (right-click on the drive icon on your desktop and select 'Unmount') and bring up the GPartEd partition editor (System->Administration->GPartEd). Under GPartEd, select the USB drive (typically, /dev/sdb) in the upper right-hand pull-down list. If you've chosen the right drive and it's unmounted, you can right-click on any of the partitions listed (typically, only one: /dev/sdb1) and select 'Check' to perform a filesystem check on the partition. Running a filesystem check should correct the FAT on the drive partition - just pull-out and reinsert the USB drive and it should be restored to read-write.

  7. #7
    Join Date
    Oct 2007
    Location
    Jamaica
    Beans
    18
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: USB thumb-drive (fat32) read only

    Quote Originally Posted by dcstar View Post
    Devices are not partitions:
    Code:
    sudo dosfsck -a -v /dev/sdf1
    I had to run gparted to understand this message but it makes sense now. i was running the code with just "/dev/sdc" when i needed to include "/dev/sdc1"

    I finally got dosfsck to run!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •