0

I work extensively on both Windows 7 and Ubuntu and use a USB pen drive to transfer data, Python files, etc. between these OSs. Recently my USB pen drive has been giving me 'read-only' errors such as

Error while creating directory Untitled Folder.

There was an error creating directory in /media/TSB USB DRV

Error creating directory: Read-only file system

I've browsed through some related pages like this and this. The problem was fixed by copying everything from USB to Windows PC, reformatting USB then putting everything back on to the USB.

My question is: Is there a way to avoid this problem in the future? I know that whenever I stick the USB into a Windows PC, I have the option of checking for errors, so is this procedure sufficient?

Medulla Oblongata
  • 373
  • 1
  • 3
  • 13

1 Answers1

1

If you are using NTFS on the drive, the open source NTFS utility is not capable of handling all the errors that the Windows utility can handle. In such cases, you have to check the disk from Windows. However, if you are going to format anyway, you can do that from Ubuntu, since Ubuntu does mount it as a read-only system, allowing you to backup content from it, while preventing further damage.

muru
  • 197,895
  • 55
  • 485
  • 740
  • Cheers. Does Ubuntu provide any good 'error checking'-type tools for this kind of situation? – Medulla Oblongata Jul 09 '14 at 00:35
  • @MedullaOblongata there's ntfsck and ntfsfix (see http://askubuntu.com/questions/112150/how-to-correctly-fix-a-dirty-ntfs-partition-without-using-chkdsk) but unfotunately, for some you errors you have to use Windows' chkdsk/equivalent. There's no other option. – muru Jul 09 '14 at 00:43
  • chkdsk and Wine, then. – Medulla Oblongata Jul 09 '14 at 00:46
  • @MedullaOblongata that looks like an unlikely combination: http://forum.winehq.org/viewtopic.php?p=71853 – muru Jul 09 '14 at 00:59