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

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
wiping/formatting read-only usb stick
« on: March 06, 2012, 08:19:34 PM »
After trying for much longer than I usually do, I am asking assistance for what seems an easy thing.

My "dear" brother in law has an Apacer usb stick - 2 Gb
This thing has 133 mp3 songs on it and he wants to erase it ( me too )
The files system is fat16 and the permission seems to be read only.
No way I get in, no way I could change permission ( because I am noob here )
Gparted keeps telling me " NO " , no matter what I do ( both from HD or LiveCD )
I tried CDs like systemrescue etc , but ...no

I am pretty sure it boils down to changing permissios, but ....that's where I got stuck

I have put it also in a windowsxp computer and tried what I still remember ( which seems to be little )

Normally I wouldn't even start on it as I know " these " people and where they hang out.
Probably it virus infected too.

But, it's my wife's brother. So, how can I tell him to buzz of.

So, I am sitting on my knees and begging for help

So, to recap: There is data on it -- it plays -- what I want is a clean usb again, formatted in fat16/32  -- right now I have no access/permission - can't format - can't delete - can't...anything.

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 )

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: wiping/formatting read-only usb stick
« Reply #1 on: March 06, 2012, 08:31:41 PM »
You should be able to reformat it in PCC > Local disks > Manage disk partitions. Click the Toggle to expert mode button in lower right corner. Click the tab for the device, then click on the partition. Use the Unmount button, then the Format button.
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 #2 on: March 06, 2012, 08:55:19 PM »
Quote
You should be able to reformat it in PCC > Local disks > Manage disk partitions. Click the Toggle to expert mode button in lower right corner. Click the tab for the device, then click on the partition. Use the Unmount button, then the Format button.

 ;D ;D ;D ;D ;D

Thanks djohnston , ( start grin ) I am dumb, but not that bad . first place I went ( close grin )

OK, when I go there and click on the usb ( which is here sdb ) I only see one big blue partition
Only the options 'View' and 'Unmount' are available
When toggle to expert mode, I get also 'options'  and  'label'
So, the devices tab is not available
In mount position or unmount position, same options.


Then I put in my Gparted liveCD
There I have 2 parts
very small one and partiton with the files
There I have more options, but none of them execute
I can " tell it " to do this and that but when I execute,it's always " no, you have no permission.

That's why I thought that the problem is with permissions.
I have been dabbling with' chown ' to no avail
I tried to understand ' chmod ' but seem to fail there

So....i posted

Any ideas ?, as I have none.

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 #3 on: March 06, 2012, 09:02:18 PM »
Just to make it clearer.

Even every thing I tried as ROOT tells me I have no access
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: wiping/formatting read-only usb stick
« Reply #4 on: March 06, 2012, 09:08:52 PM »
Does it automount or give you a mount dialog when you insert it? If so, after mounting it:

mount -l

Post the output of just the USB stick.


OK, when I go there and click on the usb ( which is here sdb ) I only see one big blue partition
Only the options 'View' and 'Unmount' are available
When toggle to expert mode, I get also 'options'  and  'label'
So, the devices tab is not available
In mount position or unmount position, same options.


I don't understand. If there is no devices tab in the upper left, how are you seeing "one big blue partition" for /dev/sdb?
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 #5 on: March 06, 2012, 09:21:55 PM »
.........I don't understand. If there is no devices tab in the upper left, how are you seeing "one big blue partition" for /dev/sdb?

Sorry...I think it's a/my communication problem
I thought you were referring to a tab which had to be together with the other options at the right side.
Yes, at the left is a choice as I said:
Quote
OK, when I go there and click on the usb ( which is here sdb )

Will try to use better English in future .

tony@localhost ~]$ mount -l
/dev/sda6 on / type ext4 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
/dev/sda13 on /mnt/data type ext4 (rw)
/dev/sda14 on /mnt/multi type ext4 (rw)
/dev/sda12 on /mnt/safe type ext4 (rw)
/dev/sda16 on /mnt/system type ext4 (rw)
/dev/sda15 on /mnt/virtual type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdb1 on /media/disk type vfat (ro,nosuid,nodev,uhelper=hal,uid=500,utf8,shortname=mixed,flush)
[tony@localhost ~]$
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: wiping/formatting read-only usb stick
« Reply #6 on: March 06, 2012, 09:42:12 PM »

/dev/sdb1 on /media/disk type vfat (ro,nosuid,nodev,uhelper=hal,uid=500,utf8,shortname=mixed,flush)


Should be : /dev/sdb1 on /media/disk type vfat (ro,nosuid,nodev,uhelper=hal,uid=500,utf8,shortname=mixed,flush)

su
umount /media/disk
mkfs.vfat /dev/sdb1
exit


If you get an error, you'll probably have to zero the stick. Let's see what happens.
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 #7 on: March 06, 2012, 11:10:16 PM »
sorry for delay. Had people walking in.

[tony@localhost ~]$ su
Password:
[root@localhost ~]# umount /media/disk
[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 ~]#


What is the meaning of : ' ...have to zero the stick '
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: wiping/formatting read-only usb stick
« Reply #8 on: March 07, 2012, 05:08:59 AM »
sorry for delay. Had people walking in.

[tony@localhost ~]$ su
Password:
[root@localhost ~]# umount /media/disk
[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 ~]#


What is the meaning of : ' ...have to zero the stick '

May be the stick has a switch to make it "write protected" ?

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #9 on: March 07, 2012, 05:42:12 AM »
No, first thing I looked for when he told me.......the thing just doesn't want
« Last Edit: March 07, 2012, 05:51:21 AM 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 AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: wiping/formatting read-only usb stick
« Reply #10 on: March 07, 2012, 06:00:49 AM »
No, first thing I looked for when he told me.......the thing just doesn't want

try this, open a terminal, su to root, umount the filesystem first:
Code: [Select]
umount /dev/sdb1
dd   if=/dev/zero   of=/dev/sdb   bs=1M count=1

the above should destroy the MBR and the partition table of your USB stick, please be 100% sure to apply the command to the right device, i.e. /dev/sdb or whatever is called when you plug in the stick.

Note that I'm referring to the whole device /dev/sdb (and not to a partition like /dev/sdb1 )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #11 on: March 07, 2012, 06:12:41 AM »
[tony@localhost ~]$ su
Password:
[root@localhost ~]# umount /dev/sdb1
[root@localhost ~]# dd   if=/dev/zero   of=/dev/sdb   bs=1M count=1
dd: opening `/dev/sdb': Read-only file system
[root@localhost ~]#

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

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: wiping/formatting read-only usb stick
« Reply #12 on: March 07, 2012, 06:19:56 AM »
[tony@localhost ~]$ su
Password:
[root@localhost ~]# umount /dev/sdb1
[root@localhost ~]# dd   if=/dev/zero   of=/dev/sdb   bs=1M count=1
dd: opening `/dev/sdb': Read-only file system
[root@localhost ~]#



what return
Code: [Select]
dmesg | tail -10
a) when plugging in the device
b) when trying to dd

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: wiping/formatting read-only usb stick
« Reply #13 on: March 07, 2012, 06:28:25 AM »
[tony@localhost ~]$ su
Password:
[root@localhost ~]# dmesg | tail -10
scsi 11:0:0:0: Direct-Access              USB FLASH DRIVE  PMAP PQ: 0 ANSI: 0 CCS
sd 11:0:0:0: Attached scsi generic sg2 type 0
sd 11:0:0:0: [sdb] 3919872 512-byte logical blocks: (2.00 GB/1.86 GiB)
sd 11:0:0:0: [sdb] Write Protect is on
sd 11:0:0:0: [sdb] Mode Sense: 23 00 80 00
sd 11:0:0:0: [sdb] Assuming drive cache: write through
sd 11:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 11:0:0:0: [sdb] Assuming drive cache: write through
sd 11:0:0:0: [sdb] Attached SCSI removable disk
[root@localhost ~]#

it says : write protect is on.
Just looked again with a magnifying glass...no switch !
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 #14 on: March 07, 2012, 06:36:09 AM »
Quote
a) when plugging in the device
b) when trying to dd

Not sure what you mean
when plugging in the device manager comes up like it always does--normal
when dd.....Read-only file system
Please note: I have done the dd command before, because I found them by googling, but with same negative result
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )