LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-23-2004, 05:56 AM   #1
db391
Member
 
Registered: Jun 2004
Location: Britain
Distribution: Slackware
Posts: 186

Rep: Reputation: 31
write protect freezes my usb stick


hi

i have a little problem with my usb memory stick

it is an 'easy disk usb2.0' with 128mb on it,

when i mount the stick (write enabled or protected)
it mounts it read-write (btw i do use the 'sync' potion)

when i set the stick to write-protected and write to it the usb stick crashes (no ctrl-z or ctrl-c, no cancel buttons in gnome etc) and i have to rmmod usb-storage to get it to work again.

it otherwise works 100% fine on write enabled.

a) is it a kernel bug (kernel 2.6.7-ck4-grsec)
b) is it a bug when tryin to recongnise the scsi 'writeprotect' command
c) or is it buggy firmware on the stick!
 
Old 09-23-2004, 09:05 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Are you unmounting the stick between it being write-enabled and setting it to write-protected?
As memory serves, it checks to see if it's write-protecte d when it's originally mounted.

Also, take a look in /proc/partitions and see if it's marked as “ro” (read-only); if not, I'm not surprised that writing to it causes the module to lock up.
 
Old 09-25-2004, 04:17 AM   #3
db391
Member
 
Registered: Jun 2004
Location: Britain
Distribution: Slackware
Posts: 186

Original Poster
Rep: Reputation: 31
i write files synchronously to the stick (no pending writes) but if the stick is writeprotected when i start to write it or umount hangs.
 
Old 09-25-2004, 04:43 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
I could be wrong, but it sounds to me like the stick is not being unmounted when it is unplugged. Thus, when you plug it back in, nothing can check if it's now read-only or not.

Does it work if you unmount the device with umount, then unplug it, then switch it to read-only, then plug it back in, all in that order?
 
  


Reply



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 Stick on Debian-Etch 2.4, write is disabled SlackerLX Linux - Hardware 12 10-08-2005 01:41 AM
USB Stick reads but won't write jaws_tas Linux - Hardware 3 09-23-2005 12:36 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
Can't WRITE to USB stick, Mount OK NO WRITE! ClericPreston Linux - Newbie 4 12-04-2004 10:43 AM
USB problems: Memorex USB stick 256MB and PSX to USB adapter by Radio Shack Knuckles T15 Linux - Hardware 1 05-19-2004 06:58 PM

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

All times are GMT -5. The time now is 10:20 PM.

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
Open Source Consulting | Domain Registration