LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-08-2009, 02:35 PM   #1
exenon
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 1
Unhappy USB flash disk somehow gets read-only


I am using Ubuntu(gnome enviroment) and have all updates.
when I plug my flash-disk on it gets mounted and everything is normal

but after I try to write or change sometng on it I have "this is a read-only disk" message?

anyone with any solution?

at least can you tell me how to make this read-only flash disk read-write again?
 
Old 01-08-2009, 02:39 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,695

Rep: Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242
Quote:
Originally Posted by exenon View Post
I am using Ubuntu(gnome enviroment) and have all updates.
when I plug my flash-disk on it gets mounted and everything is normal

but after I try to write or change sometng on it I have "this is a read-only disk" message?

anyone with any solution?

at least can you tell me how to make this read-only flash disk read-write again?
Well, what format is the flash-disk in? If it's in NTFS format, it probably gets mounted using NTFS which is read-only. You can remount it as NTFS-3G, and it should go read-write. The MAN page on mount can tell you more, but that's just a guess.

I'm sure there's a way to change the default mount action to be 3g if that turns out to be the cause.
 
Old 01-08-2009, 02:46 PM   #3
exenon
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 1
well it is FAT and yes If ı re-mount it it goes read-write but that doesnot solves the problem that why it goes with no reason read-only

also I just reailized that it goes read-only every time I view the properties of the disk drive
 
Old 01-08-2009, 03:21 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,695

Rep: Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242
Quote:
Originally Posted by exenon View Post
well it is FAT and yes If ı re-mount it it goes read-write but that doesnot solves the problem that why it goes with no reason read-only

also I just reailized that it goes read-only every time I view the properties of the disk drive
Hmm...have never seen it go read-only when viewing properties before. FAT would certainly mount read-write just fine......
 
Old 01-08-2009, 03:28 PM   #5
rm_dash_rf_star
Member
 
Registered: Nov 2007
Location: Seattle, WA
Distribution: LFS
Posts: 36

Rep: Reputation: 16
I've encountered this before. I believe that it is a design decision, that some distro. providers implement.

What I did with Knoppix, was to `right click' on the drive image on the desktop, and select something to the effect of `make read/write'

If this does not work, just mount the hardware yourself:

sudo umount <directory on which device is mounted> (example: sudo umount /media/lexar-firefly)

Type `mount' with no parameters to determine which directory the USB-drive is mounted on.

Then re-mount it with the permissions that you desire:

mount /dev/sda1 <directory of your choise> -o rw (could be a different SCSI device node like sdc1)

Also---If you know which filesystem that is on the drive (like msdos or vfat) you can mount it with that info so that mount will not have to figure it out:

mount -vt vfat /dev/sda1 /media/lexar-firefly

One good resource on your system is dmesg(8) (man 8 dmesg)

This gives you all output from the kernel.

dmesg |grep sda
will tell you what device udev assigned to the /dev/sda device node.

-rm_dash_rf_star
 
Old 01-09-2009, 05:39 AM   #6
exenon
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 1
thak you for all for trying to help me but I have finally solved the problem and try to explain for in case that somebody may encounter such a problem:

my flash has FAT32 file system which doesnot support long filenames
after I write some files on it having long names from my ntfs disks there occured some bad I/O sectors on my flash.

every time the operating sys. tries to reach these sector it is being detected as bad and The OS makes the flash disk read-only to avoid further errors on the flash

this is a OS feature just for to ensure the stability of OS and integrity of the flash

solution of this is apply fsck -a to the flash
 
Old 01-09-2009, 08:08 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,695

Rep: Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242Reputation: 6242
Quote:
Originally Posted by exenon View Post
thak you for all for trying to help me but I have finally solved the problem and try to explain for in case that somebody may encounter such a problem:

my flash has FAT32 file system which doesnot support long filenames
after I write some files on it having long names from my ntfs disks there occured some bad I/O sectors on my flash.

every time the operating sys. tries to reach these sector it is being detected as bad and The OS makes the flash disk read-only to avoid further errors on the flash

this is a OS feature just for to ensure the stability of OS and integrity of the flash

solution of this is apply fsck -a to the flash
Thanks for posting the solution, so others may benefit.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb flash drive always read-only flihp Linux - Hardware 2 11-12-2005 05:14 PM
USB flash disk help bakazer Solaris / OpenSolaris 1 06-24-2005 09:30 AM
USB Flash Disk zillah Fedora 3 05-22-2005 03:25 AM
Usb flash disk read-only problem Darthomir Linux - Hardware 6 04-03-2004 09:04 AM
Another USB-Flash-Drive Post- I read all the others so what now Al Bundy Linux - Hardware 4 04-24-2003 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration