Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-06 Thread Walter Dnes
On Sat, Jan 05, 2013 at 10:05:29AM +, Mick wrote
 On Saturday 05 Jan 2013 02:26:18 Walter Dnes wrote:
 
One last gasp... were you doing this as root?  Regular users cannot dd
  directly to a device, for obvious reasons.
 
 Yes, also tried it as root.  No change.  BTW, with the device mounted I 
 shouldn't have a problem with dd on a file.

  Whoa... you should *NOT* have it mounted when trying to dd to the
device.  I.e., it must be mounted if you're trying...

dd if=~/foo of=/media/usbstick/bar

  But it must *NOT* be mounted if you want to...

dd count=1 bs=512 if=/dev/zero of=/dev/sdx

  Do you run with an automounter?

-- 
Walter Dnes waltd...@waltdnes.org
I don't run desktop environments; I run useful applications



Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-06 Thread Mick
On Monday 07 Jan 2013 03:13:30 Walter Dnes wrote:
 On Sat, Jan 05, 2013 at 10:05:29AM +, Mick wrote
 
  On Saturday 05 Jan 2013 02:26:18 Walter Dnes wrote:
 One last gasp... were you doing this as root?  Regular users cannot
 dd
   
   directly to a device, for obvious reasons.
  
  Yes, also tried it as root.  No change.  BTW, with the device mounted I
  shouldn't have a problem with dd on a file.
 
   Whoa... you should *NOT* have it mounted when trying to dd to the
 device.  I.e., it must be mounted if you're trying...
 
 dd if=~/foo of=/media/usbstick/bar
 
   But it must *NOT* be mounted if you want to...
 
 dd count=1 bs=512 if=/dev/zero of=/dev/sdx

Yes, of course, we're saying the same thing.


   Do you run with an automounter?

Nope!  It would drive me insane ...
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-05 Thread Mick
On Saturday 05 Jan 2013 02:26:18 Walter Dnes wrote:

   One last gasp... were you doing this as root?  Regular users cannot dd
 directly to a device, for obvious reasons.

Yes, also tried it as root.  No change.  BTW, with the device mounted I 
shouldn't have a problem with dd on a file.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-04 Thread Mick
On Friday 04 Jan 2013 18:43:48 James wrote:
 Mick michaelkintzios at gmail.com writes:
  Is there some cryptic hdparm command I could run on it to reset it?  I
  mean, it's bricked as is anyway, so it can't get *much* worse.
 
 Try putting it on a windows system and delete what you can.
 Then try various tools to mount or reformat the usb stick.
 
 I've had a few and I just had to hack at them for a while.
 
 It helps if you can remember/determine, how the drive was set up.
 Fat? Fat32? NTFS? ext3?
 
 then test with appropriate tools
 
 parted may work, or tell you something about the stick.
 
 hth,
 James

Thanks James, no luck with parted either.  It'll see the old vfat partition in 
there, but it will not delete it, reformat it on in any way change it.

Different MSWindows tools also fail to operate on it.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-04 Thread Mick
On Friday 04 Jan 2013 19:12:18 Nikos Chantziaras wrote:
 On 04/01/13 18:32, Mick wrote:
  I was trying to zero out a USB stick and at some point it seems to have
  locked itself up.  By that I mean that for all intends and purposes I
  cannot write to it in any conceivable way.
 
 Can you elaborate on that?  Do you get any error messages from dd or in
 dmesg?

dd if=/dev/zero of=/mnt/iso/bigfile.txt bs=512
dd: writing ‘/mnt/iso/bigfile.txt’: Input/output error
376705+0 records in
376704+0 records out
192872448 bytes (193 MB) copied, 1.01944 s, 189 MB/s

rm /mnt/iso/bigfile.txt
rm: cannot remove ‘/mnt/iso/bigfile.txt’: Read-only file system


The output of mount:

/dev/sdb1 on /mnt/iso type vfat (rw)

(was mounted rw as root just in case).


This is what dmesg shows:

hub 2-1:1.0: state 7 ports 8 chg  evt 0002
hub 2-1:1.0: port 1, status 0101, change 0001, 12 Mb/s
hub 2-1:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
hub 2-1:1.0: port 1 not reset yet, waiting 10ms
usb 2-1.1: new high-speed USB device number 8 using ehci_hcd
hub 2-1:1.0: port 1 not reset yet, waiting 10ms
usb 2-1.1: default language 0x0409
usb 2-1.1: udev 8, busnum 2, minor = 135
usb 2-1.1: New USB device found, idVendor=1307, idProduct=0163
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.1: Product: USB Mass Storage Device
usb 2-1.1: Manufacturer: USBest Technology
usb 2-1.1: SerialNumber: 08032204c2f5fd
usb 2-1.1: usb_probe_device
usb 2-1.1: configuration #1 chosen from 1 choice
usb 2-1.1: adding 2-1.1:1.0 (config #1, interface 0)
usb-storage 2-1.1:1.0: usb_probe_interface
usb-storage 2-1.1:1.0: usb_probe_interface - got id
scsi10 : usb-storage 2-1.1:1.0
scsi 10:0:0:0: Direct-Access Ut163USB2FlashStorage 0.00 PQ: 0 ANSI: 2
sd 10:0:0:0: Attached scsi generic sg2 type 0
sd 10:0:0:0: [sdb] 1974271 512-byte logical blocks: (1.01 GB/963 MiB)
sd 10:0:0:0: [sdb] Write Protect is off
sd 10:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 10:0:0:0: [sdb] Asking for cache data failed
sd 10:0:0:0: [sdb] Assuming drive cache: write through
sd 10:0:0:0: [sdb] Asking for cache data failed
sd 10:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 10:0:0:0: [sdb] Asking for cache data failed
sd 10:0:0:0: [sdb] Assuming drive cache: write through
sd 10:0:0:0: [sdb] Attached SCSI removable disk


I can't recall the hdparm errors (run it on a different box) but if important 
I can get these for you.

Thanks.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-04 Thread Walter Dnes
On Fri, Jan 04, 2013 at 07:16:51PM +, Mick wrote

 Thanks James, no luck with parted either.  It'll see the old vfat
 partition in there, but it will not delete it, reformat it on in
 any way change it.
 
 Different MSWindows tools also fail to operate on it.

  Under the heading of grasping-for-straws... does it have a physical
write-protect switch?  If such a switch was engaged, that would explain
things.

-- 
Walter Dnes waltd...@waltdnes.org
I don't run desktop environments; I run useful applications



Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-04 Thread Mick
On Friday 04 Jan 2013 20:27:38 Walter Dnes wrote:
 On Fri, Jan 04, 2013 at 07:16:51PM +, Mick wrote
 
  Thanks James, no luck with parted either.  It'll see the old vfat
  partition in there, but it will not delete it, reformat it on in
  any way change it.
  
  Different MSWindows tools also fail to operate on it.
 
   Under the heading of grasping-for-straws... does it have a physical
 write-protect switch?  If such a switch was engaged, that would explain
 things.

Hi Walter,

No, it doesn't, but just in case it had some virtual lock I tried 
(successfully) to run 'hdparm -L 0 /dev/sdb'.  It did not make a difference.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] Resetting USB flash

2013-01-04 Thread Walter Dnes
On Fri, Jan 04, 2013 at 11:56:44PM +, Mick wrote
 On Friday 04 Jan 2013 20:27:38 Walter Dnes wrote:
  
Under the heading of grasping-for-straws... does it have a physical
  write-protect switch?  If such a switch was engaged, that would explain
  things.
 
 Hi Walter,
 
 No, it doesn't, but just in case it had some virtual lock I tried 
 (successfully) to run 'hdparm -L 0 /dev/sdb'.  It did not make a difference.

  One last gasp... were you doing this as root?  Regular users cannot dd
directly to a device, for obvious reasons.

-- 
Walter Dnes waltd...@waltdnes.org
I don't run desktop environments; I run useful applications