Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
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!
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.