Author Topic: wiping/formatting read-only usb stick  (Read 11227 times)

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #30 on: March 07, 2012, 07:59:25 PM »
Quote
According to your results the drive now has readonly turned off. Did you try to reformat the drive yet?

Yes, here are the results ( 2 ) again
[tony@localhost ~]$ su
Password:
[root@localhost ~]# umount /dev/sdb1
[root@localhost ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.42 (29-Nov-2011)
/dev/sdb1: Read-only file system while setting up superblock

[root@localhost ~]# mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.12 (29 Oct 2011)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system
[root@localhost ~]#

I would like to add some additional information
Please understand that I don't have a clue if it is related or important.
I just observed and report
Read again...I don't know what or why I am doing this.( This is my first time in Linux  ::) )

When I put in Gparted LiveCD ,I see 2 partitions.
First partition is actually just grayed out ( unallocated ) and the 2nd partition is the data.
First sector 0
last sector 8063
Total sectors 8064
Total size : 3 Mb

However, if I click on unallocated space, a window pops up and shows me that ( inside that unallocated 3Mb ) there are 2 parts.
First part ( inside that unallocated 3Mb ) is gray = nothing
Second part ( inside that unallocated 3 Mb ) there is a 2Mb partition.
a)..This 2 Mb partition ( inside unallocated 3 Mb ) can be reduced to 1 Mb IF you start from the rear, thus leaving 1Mb in front and 1 Mb at end.
This 1 MB can then be moved to left or to right
b)..However - This 2 Mb partition can not be moved to the left or re-sized unless you use a)..

BUT...whatever I do, and click "apply" ....it always bums out and returns to original, which is the equivalent of : NO...go home !
Message is usually straight....read only

If this is not related , please feel free to just scrap it.

Another thing I observed, which I don't know about is

a
When I copy a name , like DorisDay.mp3 from my hard drive or from my USB, and I copy that to a console ( terminal ) I get the following:
( please note that I will use ' @ ' as the cursor in following example )
DorisDay.mp3@  

When I copy a name from this bad usb-stick to a console ( terminal ) I get:
DorisDay.mp3 @
Please note the space between 3 and @
If I move the cursor one space to the left , the empty spave also moves to the left and wipes out the 3, as follows
DorisDay.mp @

I can not get rid of that empty space, so maybe it has a meaning. Dunno.

Why do I mention this....well.because I haven't a clue what I am seeing, and it's better to speak out as to withold ( any ) information.

Thanks
Xena

The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11589
  • ----IOFLU----
Re: wiping/formatting read-only usb stick
« Reply #31 on: March 07, 2012, 08:15:20 PM »
Xenaflux:

Don't mount /dev/sdb1. Again do;

[root@localhost ~]# hdparm -r0 /dev/sdb                 <Enter>

/dev/sdb:
 setting readonly to 0 (off)
readonly      =  0 (off)

...follow with;

[root@localhost ~]# dd if=/dev/zero of=/dev/sdb bs=4096            <Enter>

Wait until returned to prompt. Then

[root@localhost ~]# fdisk -l /dev/sdb               <Enter>

Post your results.
« Last Edit: March 07, 2012, 08:56:14 PM by Old-Polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11589
  • ----IOFLU----
Re: wiping/formatting read-only usb stick
« Reply #32 on: March 07, 2012, 08:55:46 PM »
Quote
[root@localhost ~]# dd if=/dev/zero of=/dev/sdb bs=4096
  ;)

Bad eyes, can't see what I'm typing.  ;D ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #33 on: March 07, 2012, 09:29:57 PM »
Quote
Don't mount /dev/sdb1
Insert stick..no mount..open terminal

Quote
Again do;

[root@localhost ~]# hdparm -r0 /dev/sdb                 <Enter>
[root@localhost ~]# hdparm -r0 /dev/sdb

/dev/sdb:
 setting readonly to 0 (off)
 readonly      =  0 (off)
[root@localhost ~]#


Quote
...follow with;

[root@localhost ~]# dd if=/dev/zero of=/dev/sdb bs=4096            <Enter>

[root@localhost ~]# dd if=/dev/zero of=/dev/sdb bs=4096
dd: opening `/dev/sdb': Read-only file system
[root@localhost ~]#


Quote
Wait until returned to prompt. Then

[root@localhost ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 2006 MB, 2006974464 bytes
16 heads, 32 sectors/track, 7656 cylinders, total 3919872 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 identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            8064     3919871     1955904    6  FAT16
[root@localhost ~]#

Quote
Post your results.

sorry for those long delays, but I have students walking in and out... as if this is a bar.



someone please ?
as of this is a bar
as if this is a bar
asof this is a bar






« Last Edit: March 07, 2012, 10:27:08 PM by Xenaflux »
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #34 on: March 07, 2012, 11:23:33 PM »
Quote
Posted by: marian
Insert Quote
Yesterday I solved a read only usb stick problem. I checked the stick with Gparted and it found some problems with 2 files and fixed them.

Thanks marian

I tried of course Gparted, but whatever you " want " to do , it always results with a " no "
That's the problem,
I use Gparted for donkey years already.

[ start humor ]
I taught OP how to use it many years ago
[/end humor ]

That's why i posted. Not because my brother in law with his $5 usb stick
When I can not do a dead-simple thing which I am supposed to do with my eyes closed, and gets done daily by hundreds of people without a problem, I get irritated. Actually, it wakes me up in the night, believe me or not.

So, here we are.
Thanks for posting
Xena
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #35 on: March 07, 2012, 11:32:29 PM »
@ Crow

Thanks for the links:
The first one I had already
The second one let me download another utility, which I will try as soon as OP starts banging his head against the wall  :o :o
The third one gave me access to a tutorial and a lot of further links, which will be downloaded and put in my " Winders...you know what's here " folder.

Thanks a lot
Great help

Xena
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #36 on: March 07, 2012, 11:44:28 PM »
@ Just18

Quote
There may be a hidden partition at the beginning of the drive which holds some control software that is causing the problem.

There is a 3Mb partition, which is named by GpartedLiveCD as " unallocated "

explanation is 6 posts up

Thanks
Xx
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11589
  • ----IOFLU----
Re: wiping/formatting read-only usb stick
« Reply #37 on: March 08, 2012, 02:34:37 AM »

The second one let me download another utility, which I will try as soon as OP starts banging his head against the wall   :o :o

I do not bang my head against any walls. I get down on hands and knees and bang head on floor... not so far to fall when head banging has done its job properly.  ;D ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: wiping/formatting read-only usb stick
« Reply #38 on: March 08, 2012, 02:59:41 AM »
Xenaflux,

Do you have a Windows boot partition or Windows installed in VBox?
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #39 on: March 08, 2012, 03:02:22 AM »
Quote
Do you have a Windows boot partition or Windows installed in VBox?

Yes, I have both. On my box upstairs.
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Phil

  • Hero Member
  • *****
  • Posts: 740
Re: wiping/formatting read-only usb stick
« Reply #40 on: March 08, 2012, 03:12:12 AM »
Clonezilla to test the hardware stick?

Do an image copy of the entire disk, a 2GB image even with files should be ok.

Restore the image to a similar sized but different stick ensuring exact dd copy.

See if that works.

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10665
  • MLUs Forever!
Re: wiping/formatting read-only usb stick
« Reply #41 on: March 08, 2012, 03:30:36 AM »
@ Just18

Quote
There may be a hidden partition at the beginning of the drive which holds some control software that is causing the problem.

There is a 3Mb partition, which is named by GpartedLiveCD as " unallocated "

explanation is 6 posts up

Thanks
Xx

This is where I would be concentrating my efforts ......  on the 3MB space before the sdb1 which apparently has a 2MB partition in it.
Try to get as much info about this partition as possible.
It may well be that it is a firmware partition built in to the device .... impossible to know without a lot more info.
    There must be some tool that will give info about it ........  although so far there is no sign of it in any of the output you have posted.
    Maybe running   testdisk   on the stick would show the partition .....  or maybe not ...... 

Have you come across any reference to this partition while searching on line?

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #42 on: March 08, 2012, 04:19:39 AM »
Quote
Clonezilla to test the hardware stick?

Do an image copy of the entire disk, a 2GB image even with files should be ok.

Restore the image to a similar sized but different stick ensuring exact dd copy.

See if that works.

And the aim of this exercise would be......?
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #43 on: March 08, 2012, 04:26:04 AM »
Quote
There must be some tool that will give info about it ........  although so far there is no sign of it in any of the output you have posted.
    Maybe running   testdisk   on the stick would show the partition .....  or maybe not ......

Have you come across any reference to this partition while searching on line?

testdisk.................I will see if I can do it now/this-evening.
Not sure , as the wife is mumbling something like..whashingmachinewatednogoout

........come across any reference........
No, not yet, but I haven't been looking for it specific either.
I posted about it without knowing exactly what I was talking about, hoping one of you guys would lnow  ;D
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Phil

  • Hero Member
  • *****
  • Posts: 740
Re: wiping/formatting read-only usb stick
« Reply #44 on: March 08, 2012, 05:43:20 AM »
Clonezilla aim?

If you copy the usb disk to another device, and it can be resolved on that, then it may be a hardware/fault issue on the first device.

Also there may be some internal jumper leads page 10,11,12:
http://www.apacer.com/en/support/downloads/AP-UMxxxxXXXXG-XXXX_SPEC_rev1.5.pdf