LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   USB storage stick not recognized by fdisk (http://www.linuxquestions.org/questions/linux-desktop-74/usb-storage-stick-not-recognized-by-fdisk-4175458308/)

beliya 04-16-2013 07:45 AM

USB storage stick not recognized by fdisk
 
Hello.

I've got a 8gb USB drive that is not recognized by fdisk. The last time I used it, I installed Debian live on it and it worked fine on the system. However, today when I tried it again, it's not recognized by the bios and the system on my hard drive.
It appears in dmesg when it's plugged:

[13737.236125] usb 1-2: new high-speed USB device number 13 using ehci_hcd
[13737.446112] usb 1-2: New USB device found, idVendor=058f, idProduct=1234
[13737.446117] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[13737.446120] usb 1-2: Product: Mass Storage Device
[13737.446123] usb 1-2: Manufacturer: Alcor Micro
[13737.446650] scsi15 : usb-storage 1-2:1.0
[13738.445184] scsi 15:0:0:0: Direct-Access Generic USB Flash Disk 7.76 PQ: 0 ANSI: 4
[13738.449202] sd 15:0:0:0: Attached scsi generic sg2 type 0
[13738.450729] sd 15:0:0:0: [sdb] Attached SCSI removable disk

and I can see it with lsusb also

Bus 001 Device 013: ID 058f:1234 Alcor Micro Corp. Flash Drive

However, the partitions or the flash drive itself are not seen in fdisk. I tried it in Windows XP also.. same story, it appears as a card-reader, I can't format it.

Any suggestions?

Drakeo 04-16-2013 10:19 AM

what do you want to do format it or mount it. BIOS see's and has giving the Image sdb . you took a live image that is bootable and put it on a usb drive and you want it back to normal.
I am not going to trouble shoot why your system is not mounting it making a little Icon and then associating it with a file manager.
that live image is just that a image and we need to wipe it.
Alein Bob has this down to a art for slackware used it many times very powerful. Remember back back up back up.
Go here to the Slackware documentation and read the second half how to convert.
After many years I have used slackware to fix every distro there is. And a puppy on a leash.
let me know

273 04-16-2013 10:25 AM

You might want to show the output of fdisk -l (in code tags) when the drive is inserted to confirm it is missing.

beliya 04-16-2013 10:51 AM

Hey Drakeo, thanks for the input, I will check it out in a while.

Drakeo, I can't use dd because the drive is not appearing as a system-editable.

Even thought I've got

[24546.582667] sd 17:0:0:0: [sdb] Attached SCSI removable disk

dd is unhappy

root@ibm:/# dd if=/dev/zero of=/dev/sdb count=1 bs=512
dd: opening `/dev/sdb': No medium found

-----------------

237, this is ouput from fdisk -l

root@ibm:/# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
240 heads, 63 sectors/track, 64601 cylinders, total 976773168 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: 0x1ff19a0f

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 966797311 483397632 83 Linux
/dev/sda2 966799358 976771071 4985857 5 Extended
/dev/sda5 966799360 976771071 4985856 82 Linux swap / Solaris
root@ibm:/#

Regards,
Beliya

273 04-16-2013 10:53 AM

That is bizarre. I'd be wondering about a hardware fault. Have you tried it on another USB port, silly as it sounds?

beliya 04-16-2013 10:57 AM

273, that is not silly at all, as I am considering hardware failure at the moment too

I've tried it on all three USB ports on my Thinkpad T60 without result. I also tried to mount the USB stick in Windows XP. There it's recognized as storage device but in My Computer it appears as card reader..

It's strange because the usb stick is almost brand new.. I've got it about 2 months ago, and I've hardly used it.

Regards,
Beliya

273 04-16-2013 11:01 AM

There are suggestions when googling that a low level format could repair this but I'm afraid I don't know how that would be achieved in Linux. I'm surprised you can still break hardware like this in software but perhaps you can. I think HP do some USB drive tools but I'm not sure whether they just work on their drives.

Edit: Another thing occurs. You could try using dd to put another .iso on it in case that makes it visible again?

beliya 04-16-2013 11:13 AM

Well.. I can't write another ISO because I will have to use either dd (which I cant use) or unetbootin (which requires the usb to be mounted). So that's not among the options.

I have another USB drive (the same one, same brand, same capacity) .. so I can try to do the same thing I did with the one that can't be booted and see if it's really a software break.. I will just have to be brave and stupid enough :D

273 04-16-2013 11:16 AM

Ah, I wasn't sure whether you'd tried dd again so thought it worth a try since you're pointing it at /dev/sdb rather than a partition.

beliya 04-16-2013 12:00 PM

I'm still open for suggestions =)

lleb 04-17-2013 12:51 PM

try the following:

either open multiple terminal(konsole) windos or use screen in split mode so that you can monitor /var/log/messages at the same time you plug the USB drive into the system. as you are watching /var/log/messages (tail -f is your friend for this) and you see /dev/sdX# if there is a number associated with it then try to manually mount the drive.

If you have run dd in the attempt to make it a bootable USB (live or otherwise) this may not work and you might have to run an other DD just to clean it up.

Code:

Apr 17 09:29:48 centos kernel: usb 1-2: new high speed USB device number 2 using ehci_hcd
Apr 17 09:29:48 centos kernel: usb 1-2: New USB device found, idVendor=1b1c, idProduct=0ab1
Apr 17 09:29:48 centos kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 17 09:29:48 centos kernel: usb 1-2: Product: Flash Voyager
Apr 17 09:29:48 centos kernel: usb 1-2: Manufacturer: Corsair
Apr 17 09:29:48 centos kernel: usb 1-2: SerialNumber: 92e646a69e562a
Apr 17 09:29:48 centos kernel: usb 1-2: configuration #1 chosen from 1 choice
Apr 17 09:29:48 centos kernel: Initializing USB Mass Storage driver...
Apr 17 09:29:48 centos kernel: scsi10 : SCSI emulation for USB Mass Storage devices
Apr 17 09:29:48 centos kernel: usbcore: registered new interface driver usb-storage
Apr 17 09:29:48 centos kernel: USB Mass Storage support registered.
Apr 17 09:29:49 centos kernel: scsi 10:0:0:0: Direct-Access    Corsair  Flash Voyager    0.00 PQ: 0 ANSI: 2
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: Attached scsi generic sg3 type 0
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] 31588352 512-byte logical blocks: (16.1 GB/15.0 GiB)
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] Write Protect is off
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write through
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write through
Apr 17 09:29:49 centos kernel: sdc: sdc1
Apr 17 09:29:50 centos kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write through
Apr 17 09:29:50 centos kernel: sd 10:0:0:0: [sdc] Attached SCSI removable disk


[root@centos ~]# fdisk -l /dev/sdc

Disk /dev/sdc: 16.2 GB, 16173236224 bytes
255 heads, 63 sectors/track, 1966 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1              1        1967    15794131+  b  W95 FAT32

As you can clearly see on my system the drive is detected as sdc without a number or /dev. the default for CentOS is to identify just the SCSI, in this case, drive letter assignment. I know it is /dev/sdc as that is how CentOS functions, your distro may read differently, but /dev/sdX is virtually a Linux standard.

The output of fdisk -l /dev/sdc clearly states I have plugged in a 16G FAT32 formatted flash drive with a single partition.

If your system is unable to identify anything about your drive after plugging it in and /var/log/messages tells you the drive letter then fdisk should also tell you what to use to identify that device as there are plenty of file systems out there that fdisk is not capable of dealing with. HFS is one of them as an example.

you can also run df -Th to see if the system automajically mounted the drive:

my CentOS server does no such thing for starters im not running a GUI and it is a server configured to NOT auto mount this specific flash drive. I do use autofs for other specific devices, just not this flash drive:

Code:

[root@centos ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
              ext4    50G  4.7G  43G  10% /
tmpfs        tmpfs    939M    0  939M  0% /dev/shm
/dev/sda1    ext4    485M  117M  343M  26% /boot
/dev/mapper/vg_centos-lv_home
              ext4    1.8T  1.1T  624G  64% /exports/centos
/dev/sdb1    ext4    1.4T  953G  353G  73% /exports/stuff

for me to mount this drive i would have to do the following:

Code:

[root@centos ~]# mount -t vfat /dev/sdc1 /mnt/usb
[root@centos ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
              ext4    50G  4.7G  43G  10% /
tmpfs        tmpfs    939M    0  939M  0% /dev/shm
/dev/sda1    ext4    485M  117M  343M  26% /boot
/dev/mapper/vg_centos-lv_home
              ext4    1.8T  1.1T  624G  64% /exports/centos
/dev/sdb1    ext4    1.4T  953G  353G  73% /exports/NFS_TV_Shows
/dev/sdc1    vfat    16G  166M  15G  2% /mnt/usb

using the -t vfat flag to tell CentOS that this is a FAT32 file system I am able to easily mount the drive that you can now clearly see in df -Th.

jACK-ah 04-17-2013 10:31 PM

Bro I think is software problem unfortunatilly

Drakeo 04-22-2013 12:09 PM

ok go into bios with the usb inserted and see what bios see's and then you will find that ubuntu as i have seem every install has set my system up as the master drive. but when you run blkid you get what the bios see's. if you look at the installed /etc/fstab you will see what I mean. this has caused me many issues with the ubuntu.
so after mounting it you still cant wipe it out ?

Quote:

LQ Newbie

Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0

Hey Drakeo, thanks for the input, I will check it out in a while.

Drakeo, I can't use dd because the drive is not appearing as a system-editable.

Even thought I've got

[24546.582667] sd 17:0:0:0: [sdb] Attached SCSI removable disk

dd is unhappy

root@ibm:/# dd if=/dev/zero of=/dev/sdb count=1 bs=512
dd: opening `/dev/sdb': No medium found
and manual mount
Quote:

[root@centos ~]# mount -t vfat /dev/sdc1 /mnt/usb
[root@centos ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
ext4 50G 4.7G 43G 10% /
tmpfs tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 ext4 485M 117M 343M 26% /boot
/dev/mapper/vg_centos-lv_home
ext4 1.8T 1.1T 624G 64% /exports/centos
/dev/sdb1 ext4 1.4T 953G 353G 73% /exports/NFS_TV_Shows
/dev/sdc1 vfat 16G 166M 15G 2% /mnt/usb
looks like
should be dd if=/dev/zero of=/dev/sdc count=1 bs=512


All times are GMT -5. The time now is 01:17 PM.