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: cannot remove `Monthly': Read-only file system
or even
Code:
rm: cannot remove `Monthly/\ (list of files)': Read-only file system
OK, is it read write?
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:
[ 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>
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?
Bookmarks