Ken (Chanoch) Bloom's Blog

17th May 2009

Using a JMicron JM20337 USB IDE adapter with linux

My old computer died, and I got a new one, and now I'm working on recovering documents from the old hard drive. As the new comptuer has SATA (and the old one had IDE), I needed to borrow a USB-IDE adapter to recover the drive.

Because I can't seem to find any documentation about the adapter on the web, I'm going to post a tip here about making it work.

The adapter is a JMicron JM20337 adapter. It shows in lsusb as

Bus 001 Device 002: ID 152d:2338 JMicron Technology Corp. / JMicron
USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge

and it shows in dmesg as:

usb 1-1: new high speed USB device using ehci_hcd and address 2
usb 1-1: New USB device found, idVendor=152d, idProduct=2338
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
usb 1-1: Product: USB to ATA/ATAPI Bridge
usb 1-1: Manufacturer: JMicron
usb 1-1: SerialNumber: 152D203380B6
usb 1-1: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning

It's still waiting for the device to settle, as I write this, becuase I haven't turned on power to the drive yet. When I first connected it last night (with the drive attached) and turned it on, I got the message:

scsi 4:0:0:0: Direct-Access                                    PQ: 0 ANSI: 2 CCS
sd 4:0:0:0: [sdb] Attached SCSI disk

No partition table, and if I tried to dd if=/dev/sdb (for example to try and recover the partition table), I got a zero length file.

After some failed googling and experimentation, I discovered that the drive has to be jumpered as an IDE slave. (Not a master, and cable select won't work.)

Then I get the partitions, and more information about the drive

scsi5 : SCSI emulation for USB Mass Storage devices
scsi 5:0:0:0: Direct-Access     WDC WD12 00JB-00EVA0      5R15 PQ: 0 ANSI: 2 CCS
sd 5:0:0:0: [sdb] 234441648 512-byte hardware sectors: (120 GB/111 GiB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] 234441648 512-byte hardware sectors: (120 GB/111 GiB)
sd 5:0:0:0: [sdb] Write Protect is off
 sdb: sdb1 sdb2 < sdb5 > sdb3
sd 5:0:0:0: [sdb] Attached SCSI disk

You may also need to plug the USB cable in to the computer after turning on power to the disk for things to work properly. (If you plugged in the USB cable first, you can just unplug it and replug it.)

Permalink | linux.
22nd May 2009

Ruby Odeum

Somewhere out there, in a far corner of the Web that I won't find again, there was a Gem of Ruby/Odium 0.4, a ruby binding for the QDBM inverted index APIs. I'm going to mirror it here until I come up with some better idea of what to do with it.

Permalink | linux.
My Website Archives