Results 1 to 7 of 7

Thread: Can't remove write protect from FLASH usb

  1. #1
    Join Date
    Nov 2008
    Location
    Australia
    Beans
    5

    Can't remove write protect from FLASH usb

    hi there
    i'm having problems with a usb device that was read-write but somehow has become read only. If I try to remove a file in the USB I get:
    Code:
    rm: cannot remove 'x.c': Read-only file system
    It doesn't have any external switch or anything like that and hasn't gone back to being writable at any time.

    I think that somehow it internally changed to read only. Is there any way to change it back? Or is it internal and nothing can be done?

    Here is the relevant output from dmesg:
    Code:
    [ 2902.781714] usb-storage: device found at 3
    [ 2902.781722] usb-storage: waiting for device to settle before scanning
    [ 2907.780229] usb-storage: device scan complete
    [ 2907.781086] scsi 6:0:0:0: Direct-Access     FLASH    Drive AU_USB20   8.07 PQ: 0 ANSI: 2
    [ 2907.810847] sd 6:0:0:0: [sdc] 4016128 512-byte hardware sectors (2056 MB)
    [ 2907.811701] sd 6:0:0:0: [sdc] Write Protect is on
    [ 2907.811708] sd 6:0:0:0: [sdc] Mode Sense: 03 00 80 00
    [ 2907.811711] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [ 2907.815530] sd 6:0:0:0: [sdc] 4016128 512-byte hardware sectors (2056 MB)
    [ 2907.816289] sd 6:0:0:0: [sdc] Write Protect is on
    [ 2907.816295] sd 6:0:0:0: [sdc] Mode Sense: 03 00 80 00
    [ 2907.816298] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [ 2907.816662]  sdc:
    [ 2907.992254] sd 6:0:0:0: [sdc] Attached SCSI removable disk
    [ 2907.992523] sd 6:0:0:0: Attached scsi generic sg3 type 0
    And this is its line in /etc/mtab:
    Code:
    /dev/sdc /media/disk vfat ro,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush 0 0
    I also tried writing similar things in fstab too to mount automatically with rw but this didn't work.

    I tried remounting it a few times
    Code:
    $ mount -o remount,rw /media/disk
    $ mount -w -t vfat -o remount,rw /dev/sdc /media/disk
    which gave this:
    Code:
    mount: block device /dev/sdc is write-protected, mounting read-only
    mount: block device /dev/sdc is write-protected but explicit '-w' flag given
    but still no change at all.
    Is this a problem I can fix? This happens on linux/mac/windows and I can't reformat it in windows.

    Does anyone think that they can help?

  2. #2
    Join Date
    Mar 2008
    Location
    Cloud 9
    Beans
    1,428
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Can't remove write protect from FLASH usb

    I had that problem once and never learned why. I fixed my problem by reformatting the drive with gparted. I copied all the information off of it easily enough before I did though. If you don't have gparted (it comes included with a live CD) you can download it from add/remove programs (Gnome Partition Editor) or from the terminal
    Code:
    sudo apt-get install gparted

  3. #3
    Join Date
    Nov 2008
    Location
    Australia
    Beans
    5

    Re: Can't remove write protect from FLASH usb

    hey pastalavista thanks for the reply.
    Unfortunately this still can't seem to make the USB device read-write:
    Code:
    sudo gparted /dev/sdc
    ...
    Unable to open /dev/sdc read-write (Read-only file system). /dev/sdc has been opened read-only.
    I'm wondering is it even possible to change the write permissions.
    chmod and chown on /media/disk don't work either.

    Does anyone have ANY idea of ANYTHING that might help?

  4. #4
    Join Date
    Jul 2008
    Beans
    276

    Re: Can't remove write protect from FLASH usb

    Have you tried unmounting the volume with "sudo umount /dev/sdc1" afterwards "sudo gparted /dev/sdc"?

  5. #5
    Join Date
    May 2011
    Beans
    2

    Re: Can't remove write protect from FLASH usb

    hi i have the same problem gparted is showing read only
    please help

  6. #6
    Join Date
    Mar 2010
    Location
    United Kingdom
    Beans
    277
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't remove write protect from FLASH usb

    Hi,

    I was having the same problem until i realised that the USB device was simply locked - i.e. the hold switch was turned to 'on'.

    Changed that and now i can manipulate the drive.
    Thinkpad x131e

  7. #7
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,635
    Distro
    Ubuntu

    Re: Can't remove write protect from FLASH usb

    Old thread.

    Closed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •