You are not logged in.

#1 2008-11-22 19:38:25

CuleX
Member
Registered: 2007-09-15
Posts: 107

Identification of unformatted USB storage devices

Hello,

I plugged in today my new card reader. Arch recognized it well and I even got a device file.

My problem is, I got multiple device files; sdc to sdf. Each one seems to be one slot of the card reader. As the SD card isn't formatted yet, it's impossible to identify anything by its count of partitions. If I fdisk a drive that doesn't contain the SD card, I could accidentially destroy the reader itself. I don't know how it reacts, if I randomly fdisk them to see their size (Yes, I AM paranoid).

I'm talking about a Digitus 24in1 card reader with an Sandisk MicroSD adapter (with an inserted MicroSD card, of course) on i686. I'll provide log files if neccessary.

Is there any _safe_ solution?

Thanks

Offline

#2 2008-11-23 12:18:33

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Identification of unformatted USB storage devices

If you plug your card reader with no card then you don't get any device file afaik, so nothing to fdisk, then when you plug a card a device file will be created. To know which one plug the card and watch the output of dmesg.
Here is an example, plugging the card reader

usb 6-4: new high speed USB device using ehci_hcd and address 4
usb 6-4: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi6 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 6:0:0:0: Direct-Access     Multi    Flash Reader     1.00 PQ: 0 ANSI: 0

And then inserting a card

sd 6:0:0:0: [sdb] Attached SCSI removable disk
sd 6:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
sd 6:0:0:0: [sdb] 985088 512-byte hardware sectors (504 MB)
sd 6:0:0:0: [sdb] Write Protect is off
sd 6:0:0:0: [sdb] Mode Sense: 03 00 00 00
sd 6:0:0:0: [sdb] Assuming drive cache: write through
sd 6:0:0:0: [sdb] 985088 512-byte hardware sectors (504 MB)
sd 6:0:0:0: [sdb] Write Protect is off
sd 6:0:0:0: [sdb] Mode Sense: 03 00 00 00
sd 6:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1

As you can see the card is sdb and has one partition sdb1.

Last edited by R00KIE (2008-11-23 12:19:37)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2008-11-23 12:30:14

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Identification of unformatted USB storage devices

I'm not 100% sure, but cat /proc/partitions will tell you, because it will list unmounted partitions too.

Offline

Board footer

Powered by FluxBB