Corrupted filesystem FAT16 on USB stick. It mounts read-only.
Linux - GeneralThis 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
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.
I can read almost all the files inside it, but I cannot write and I cannot format it again. I tried to run fsck and it reports the following
Code:
# fsck -a /dev/sdb1
fsck from util-linux-ng 2.17.2
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
open: Read-only file system
I also tried to write down /dev/zero using dd, but nothing. I tried even from a Windows 7 machine, but I cannot format it from its native disk managment utility (the format option is greyed out). What can stop me from throwing it in the trash?
I'm assuming you've tried to wipe the partition table, make it something totally different; like ext2 and then create a new file system for it? What does fdisk get you?
# fdisk /dev/sdb
You will not be able to write the partition table.
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): w
Unable to write /dev/sdb
fdisk -l reports the following:
Code:
Disk /dev/sdb: 2001 MB, 2001076224 bytes
62 heads, 62 sectors/track, 1016 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x79f3dc19
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1016 1952721 6 FAT16
2Gig thumbstick? You're not trying to save any data? I say chuck it! Or slice it up with a power tool just to vent.
I saved what could be saved. I just wanted to avoid buying a new one, if by chance it can be restored. I'm going to throw it in the basket at this point!
If it's really important to you, there's always grab the source for fdisk and remove the checks which dis-allow writing of the partition table.
I took a look and the version I found did not have that particular error verbiage in it, fdisk.c.
Another option is to boot to single user mode in command line so that when you plug in that thumbstick, it never gets attempted to be mounted, but I'm guessing that you've already done that. My thinking there is that it won't have tried to do anything with it and the system might consider it to be a fresh disk which once you do fdisk and just say re-partition. I think you're already past that though.
Another option is to boot to single user mode in command line so that when you plug in that thumbstick, it never gets attempted to be mounted, but I'm guessing that you've already done that. My thinking there is that it won't have tried to do anything with it and the system might consider it to be a fresh disk which once you do fdisk and just say re-partition. I think you're already past that though.
Yes, I tried. It doesn't mount but fdisk behaves as in runlevel 5:
Code:
Unable to write /dev/sdb
Now I will try to compile fdisk with that checking removed, just for the sake of curiosity.
Edit: I've just tried to compile fdisk, but I cannot find the part of code containing the error message. I give up now! Thank you for the support.
You gotta be kidding me! They put a bleeping SD Micro inside their USB flash drive? I've never torn one apart, but really didn't expect to see THAT. Laughing, but ... it works, eh?
Distribution: Mepis and Fedora, also Mandrake and SuSE PC-BSD Mint Solaris 11 express
Posts: 385
Rep:
Try running as root and mount it then. Click on the drive's properties and change its permissions to read/write using either a terminal or one of the many graphical tools. Be sure to make these changes applicable to all files and subfolders in all directories.
If you can still read what's on there, you should be able to copy and paste all data to another hard drive or file system. Then use it normally. Running as root makes this process easier, one reason to not disable the root's account gui. Just use a really strong password and take it offline whenever possible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.