1

I am running Linux Ubuntu 16.04 LTS (kernel: 4.4.0-38 generic), and I am unable to modify any content on my USB stick. What happens is that I receive an error message, telling me it's a "Read-only file system". I tried to change the permissions through Properties -> Permissions, but it doesn't allow me to: still the same error message.

I've already looked for information from the other threads on the forum, and especially the advice given by @user284234 / @antivirtel took me one step further. However, this is the point where I need a bit different kind of help.

So, I was adviced to run the following commands in Terminal:

sudo su
df -Th
dosfsck /dev/sda1

And yes, /dev/sda1 is my USB stick; checked and confirmed! Anyway, this is where I get confused. After the very third command, I am asked five sequential questions. First:

fsck.fat 3.0.28 (2015-05-16)
0x41: Dirty bit is set. Fs was not properly unmounted and some data
may be corrupt.
1) Remove dirty bit
2) No action

Second:

There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action

Third:

FSINFO sector has bad magic number(s):
  Offset 0: 0x00000000 != expected 0x41615252
  Offset 484: 0x00000000 != expected 0x61417272
  Offset 510: 0x0000 != expected 0xaa55
1) Correct
2) Don't correct (FSINFO invalid then)

Fourth:

FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT

So far, I chose to do nothing on every question (well, Use first FAT on the question number four). After that in the fifth phase, the terminal produces 48 lines similar to this:

Cluster 1542915 out of range (134217728 > 1962495). Setting to EOF.

Right after the previous messages, it also enlists twelve specific files on my USB stick. I've given two examples below to cover the both cases given by the terminal: lines 1-2 refer to a folder name, lines 3-

/example folder/example sub-folder one/
  Contains a free cluster (45643). Assuming EOF.
/example folder/example sub-folder two/presentation.ppt
  File size is 1488896 bytes, cluster chain length is 229376 bytes.
  Truncating file to 229376 bytes.

After going through all the files (1 folder and 11 files), am I finally asked the following (including my answer):

Reclaimed 957 unused clusters (3919872 bytes).
Perform changes ? (y/n) n
/dev/sda1: 323 files, 42936/1962494 clusters

I hope this helps to understand my problem. The thing is that I really need those files on my USB stick, and I am afraid to take any actions that might accidentally harm them / destroy them.

Thanks a lot for your help in advance guys! There's no way I am going back to Windows although I am a newbie!

  • 2 quick questions, 1st Are you able to read/write any other USB drive? 2nd Have you checked the aforementioned USB in Windows as well? If for 1st case other USB works then probably your pen drive has gone bad, else we can investigate. In 2nd case if it doesnt work in Windows or Mac then too the Pen Drive is the culprit. – Nisheet Sep 23 '16 at 9:35
  • @Nisheet Thanks for your answer! My apologies I am only capable to answer your question number two at this point, since I haven't got any other USB sticks in my house at this moment. Weird, isn't it? :-) Anyway, I am now replying from my old Windows laptop (with Windows 10 though), but the USB stick worked just fine. I will report to you later if some other USB sticks work with my Linux. Cheers! – Jayaguru-Shishya Sep 23 '16 at 14:56
  • @Nisheet At this point, how do you think I should proceed? Thousands thanks for your help again! – Jayaguru-Shishya Sep 24 '16 at 10:09
  • Looks like it found some issues "FSINFO sector has bad magic number(s)", did you select corrective action? – Nisheet Sep 27 '16 at 5:52
  • 1
    @Nisheet I went ahead and took all the corrective actions. Guess what. It solved my problem! :-) USB back in business and the important files saved! Thanks Linux, thanks Nisheet! Hohohoho – Jayaguru-Shishya Sep 27 '16 at 12:28
1

Problem solved: I took all the corrective actions suggested by the terminal after running the following list of commands:

sudo su
df -Th
dosfsck /dev/sda1

It's rather a curious thing, though. When I try to re-plug the USB stick — even though I'm still able to modify content on the drive — when I run dosfsck /dev/sda1 again, it still gives some errors and even suggests deleting whole folders:

root@XXXXs:/home/XXXXs# dosfsck /dev/sda1
fsck.fat 3.0.28 (2015-05-16)
0x41: Dirty bit is set. Fs was not properly unmounted and some data 
may be corrupt.
1) Remove dirty bit
2) No action
? 1
Orphaned long file name part "Example I"
1: Delete.
2: Leave it.
? 2
Orphaned long file name part "Example II"
1: Delete.
2: Leave it.
? 2
/Desktop (Linux)/Personal/Example III
 Start does point to root directory. Deleting dir. 
Orphaned long file name part "Example IV"
1: Delete.
2: Leave it.
? 2
Perform changes ? (y/n) y
/dev/sda1: 1011 files, 149304/1962494 clusters

Fortunately, I can just say "no" to the proposals. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.