Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: USB stick write-protected

  1. #1
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default USB stick write-protected

    I have a USB stick that appears to be write-protected. "fdisk -l" does not recognize it. But when I plug it in the device notifier mounts it, and I can read the files on it. If I additionally mount it manually it tells me it's mounted write only. Yast won't format it, neither will XP. Also "dd" will not write to it.

    Any suggestions?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,775

    Default Re: USB stick write-protected

    That is a bit contradictory. Please insert it mount it as you said using the device notifier and post
    Code:
    mount
    and
    Code:
    fdisk -l
    And, as you have two versions of openSUSE mentioned in your signature, that of course narrows it a bit down, but we still do not know which one you are talking about (my personal opinion: I hate it when people put those things in their signature).
    Henk van Velden

  3. #3
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default Re: USB stick write-protected

    Quote Originally Posted by hcvv View Post
    That is a bit contradictory. Please insert it mount it as you said using the device notifier and post
    Code:
    mount
    and
    Code:
    fdisk -l
    And, as you have two versions of openSUSE mentioned in your signature, that of course narrows it a bit down, but we still do not know which one you are talking about (my personal opinion: I hate it when people put those things in their signature).
    Thank you for the speedy response.

    Using openSUSE 13.1 64bit KDE Version 4.11.5

    HTML Code:
    :~> mount
    devtmpfs on /dev type devtmpfs (rw,relatime,size=954860k,nr_inodes=238715,mode=755)
    tmpfs on /dev/shm type tmpfs (rw,relatime)
    tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
    devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
    /dev/sda2 on / type ext4 (rw,relatime,data=ordered)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
    cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
    cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=38,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
    mqueue on /dev/mqueue type mqueue (rw,relatime)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
    tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
    tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
    /dev/sda4 on /home/ion/DATA type ext4 (rw,relatime,data=ordered)
    rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    gvfsd-fuse on /var/run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    /dev/sdb1 on /run/media/ion/KEY 1 type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
    /dev/sdb1 on /var/run/media/ion/KEY 1 type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro)
    HTML Code:
    # fdisk -l
    
    Disk /dev/sda: 320.1 GB, 320072933376 bytes, 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x000d150e
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048    58593279    29295616   83  Linux
    /dev/sda2        58593280   117186559    29296640   83  Linux
    /dev/sda3       117186560   121092095     1952768   82  Linux swap / Solaris
    /dev/sda4       121092096   625141759   252024832   83  Linux
    
    Disk /dev/sdb: 7962 MB, 7962886144 bytes, 15552512 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0xc3072e18
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          24    15552511     7776244    b  W95 FAT32

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,775

    Default Re: USB stick write-protected

    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          24    15552511     7776244    b  W95 FAT32
    So it is shown by fdisk -l (contrary to what you say).

    Code:
    /dev/sdb1 on /var/run/media/ion/KEY 1 type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro)
    and it is mounted (by the desktop mechanism).

    And it seems to be mounted read-only because there where errors.

    Did you look what dmesg says after you inserted it?

    BTW, please use normal CODE tags (the # button) as long as you do not want to show HTML code here.
    Henk van Velden

  5. #5
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default Re: USB stick write-protected

    Quote Originally Posted by hcvv View Post
    That is a bit contradictory.
    Yes I agree. But several times when I plugged the stick in and did not mount with device notifier, "fdisk -l" did not list it at all. Also when I tried to mount it by "mount /dev/sdb1 /mnt/hd" it reported that /dev/sdb1 did not exist. Until I opened it with the file browser from device notifier (i.e. it got mounted). Then "fdisk -l" did show it. Now that is no longer the case. So perhaps there is a hardware inconsistency. The USB socket was my first suspicion, but it works with any other USB device. Still the inability to write to it continues.

  6. #6
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default Re: USB stick write-protected

    Quote Originally Posted by hcvv View Post

    And it seems to be mounted read-only because there where errors..
    That is correct.

    dmesg reports...

    Code:
    [ 7134.468036] usb 1-5: new high-speed USB device number 11 using ehci-pci
    [ 7134.583802] usb 1-5: New USB device found, idVendor=090c, idProduct=1000
    [ 7134.583810] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 7134.583816] usb 1-5: Product: USB DISK
    [ 7134.583821] usb 1-5: Manufacturer: SMI Corporation
    [ 7134.583826] usb 1-5: SerialNumber: HA08010000002269
    [ 7134.587827] usb-storage 1-5:1.0: USB Mass Storage device detected
    [ 7134.588992] scsi13 : usb-storage 1-5:1.0
    [ 7135.766979] scsi 13:0:0:0: Direct-Access     SMI      USB DISK         1100 PQ: 0 ANSI: 4
    [ 7135.767173] scsi 13:0:0:0: alua: supports implicit and explicit TPGS
    [ 7135.769189] scsi 13:0:0:0: alua: No target port descriptors found
    [ 7135.769202] scsi 13:0:0:0: alua: not attached
    [ 7135.769641] sd 13:0:0:0: Attached scsi generic sg2 type 0
    [ 7135.773587] sd 13:0:0:0: [sdb] 15552512 512-byte logical blocks: (7.96 GB/7.41 GiB)
    [ 7135.775076] sd 13:0:0:0: [sdb] Write Protect is on
    [ 7135.775088] sd 13:0:0:0: [sdb] Mode Sense: 43 00 80 00
    [ 7135.776093] sd 13:0:0:0: [sdb] No Caching mode page found
    [ 7135.776101] sd 13:0:0:0: [sdb] Assuming drive cache: write through
    [ 7135.776111] sd 13:0:0:0: [sdb] Attached SCSI removable disk
    [ 7135.796886] sd 13:0:0:0: [sdb] No Caching mode page found
    [ 7135.796898] sd 13:0:0:0: [sdb] Assuming drive cache: write through
    [ 7135.801078] sd 13:0:0:0: [sdb] No Caching mode page found
    [ 7135.801089] sd 13:0:0:0: [sdb] Assuming drive cache: write through
    [ 7135.801976]  sdb: sdb1
    There is no write-protect switch on the device, and it was written to before.

  7. #7
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default Re: USB stick write-protected

    Some further output from fdisk.

    Code:
    # fdisk /dev/sdb
    Welcome to fdisk (util-linux 2.23.2).
    
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    
    Command (m for help): p
    
    Disk /dev/sdb: 7962 MB, 7962886144 bytes, 15552512 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0xc3072e18
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          24    15552511     7776244    b  W95 FAT32
    
    Command (m for help): d
    Selected partition 1
    Partition 1 is deleted
    
    Command (m for help): w
    fdisk: cannot write disk label: Bad file descriptor

  8. #8
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default Re: USB stick write-protected

    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          24    15552511     7776244    b  W95 FAT32
    Isn't byte 24 an odd location for the start of a block?

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,775

    Default Re: USB stick write-protected

    Something lousy here. You can not even write a partition table.

    I know almost nothing about Windows, but there being a VAT file system on it, did you use it on Windows before this problem? Then it could be that it is not properly closed by Windows (e.g. when you remove it without telling Windows). According to what I remember from other threads then connecting it to a Windows system and removing it save might hlp.
    Henk van Velden

  10. #10
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,659

    Default Re: USB stick write-protected

    Quote Originally Posted by hcvv View Post
    Something lousy here.
    Yes I like this comment!

    I know almost nothing about Windows, but there being a VAT file system on it, did you use it on Windows before this problem? Then it could be that it is not properly closed by Windows (e.g. when you remove it without telling Windows). According to what I remember from other threads then connecting it to a Windows system and removing it save might hlp.
    I'm not a Windows user either, but that's one of the first things I tried. Didn't help. Thanks for the suggestions anyway. I think I'll consider it a dead stick.

Page 1 of 2 12 LastLast

Posting Permissions

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