# How to Mount USB Stick Hard Drive [SOLVED]

## sheepdog

cat /proc/scsi/usb-storage/0 shows *Quote:*   

> 
> 
>    Host scsi0: usb-storage
> 
>        Vendor: SanDisk Corporation
> ...

 lsmod shows *Quote:*   

> sd_mod                 13848  0
> 
> usb_storage            64416  0
> 
> scsi_mod               76416  2 sd_mod,usb_storage
> ...

 

udev is running but I'm not sure how to determine if it sees this device or not.  There is no /dev/sda and there is no /dev/sda1.  How do I mount this thing?  Thanks.Last edited by sheepdog on Sat Feb 11, 2006 5:55 am; edited 1 time in total

----------

## nyk

what does /proc/bus/usb/devices show?

----------

## sheepdog

 *nyk wrote:*   

> what does /proc/bus/usb/devices show?

 

There is no such file.  "ls /proc/bus" shows *Quote:*   

> input  pci

 udev did create a "/dev/usbstick1" device per a rule.  However, if i say,  *Quote:*   

> mount -t vfat /dev/usbstick1 /mnt/flashstick/

 it shows *Quote:*   

> mount: wrong fs type, bad option, bad superblock on /dev/usbstick1,
> 
>        or too many mounted file systems

 

----------

## fb

Hi,

First I am not sure what kind of USB stick you have really.

As far I understand they are usually formatted in FAT16,

which means you should use msdos for the file system,

I could be wrong on the particular of your stick on that one.

Assuming that you also already had created /mnt/flashstick

you can bump in a few other problem. The best thing to learn

more about your situation if the filesystem thing doesn't 

cut it, would be to copy the relevant entry from the output 

of dmesg when you plug your stick. That would be a great 

help.

Cheers,

 Francois

----------

## sheepdog

Here is the dmsg output: *Quote:*   

> Nov 14 07:22:47 [kernel] usb 3-1: new full speed USB device using address 6
> 
> Nov 14 07:22:47 [kernel] usb 3-1: not running at top speed; connect to a high speed hub
> 
> Nov 14 07:22:47 [kernel]   Vendor: SanDisk   Model: Cruzer Mini       Rev: 0.1
> ...

 Attempting to mount it: *Quote:*   

> goliath root # mount -t vfat /dev/sda1 /mnt/flashstick/
> 
> mount: special device /dev/sda1 does not exist
> 
> goliath root # mount -t vfat /dev/usbstick1 /mnt/flashstick/
> ...

 Linux version is 2.6.9-gentoo-r1.  Added SCSI Generic module to the kernel and then looked for the usb stick: *Quote:*   

> goliath root # sg_scan -i
> 
> /dev/sg0: scsi0 channel=0 id=0 lun=0 [em]
> 
>     SanDisk   Cruzer Mini       0.1  [rmb=1 cmdq=0 pqual=0 pdev=0x0]
> ...

 udevinfo shows: *Quote:*   

> udevinfo -a -p /devices/pci0000:00/0000:00:06.0/0000:01:00.1/usb3/3-1/3-1:1.0/host0/0:0:0:0
> 
>  looking at class device '/sys/devices/pci0000:00/0000:00:06.0/0000:01:00.1/usb3/3-1/3-1:1.0/host0/0:0:0:0':
> 
>     SYSFS{detach_state}="0"
> ...

 

----------

## fb

Hi sheepdog,

I have seen your message in the thread I started. I have never

seen those particular messages in dmesg before. Let's investigate

several thing:

- Is /dev/usbstick1 a link to an other device? 

(ls -la /dev/usbstick1).

- It seems that you have something on /dev/sg0. Have you

tried fdisk /dev/sg0 ?

- What is your hardware configuration. Are you plugging your

stick in an extension hub outside of your computer?

For completness did you try:

mount -t auto /dev/usbstick1 /mnt/flashstick ?

----------

## sheepdog

Hi fb.  Thanks for the reply.  Here are the answers to your questions:

The usb stick is being plugged into a USB port on the motherboard.  Before plugging in the stick there is no /dev/usbstick1.  After plugging in the stick *Quote:*   

> goliath root # ls -la /dev/usbstick1
> 
> crw-rw----  1 root root 21, 0 Nov 14 18:53 /dev/usbstick1

 fdisk /dev/sg0 just hangs.  I must Ctl-C to kill it.  Seems to me the last time I tried fdisk /dev/sg0 it said it wasn't a valid block device. *Quote:*   

> goliath root # mount -t auto /dev/usbstick1 /mnt/flashstick/
> 
> mount: /dev/usbstick1 is not a block device

 More detailed hardware info follows: *Quote:*   

> goliath
> 
>     description: Computer
> 
>     product: To be filled by O.E.M.
> ...

 

----------

## tollwilly125

Take a look at this:  https://forums.gentoo.org/viewtopic.php?t=221381&highlight=mount+usb+stick

----------

## sheepdog

Thanks for the reply, tollwilly.  I had not seen that post before and I did not have any Natural Language turned on in the kernel.  Unfortunately, after turning on codePage437 and ISO-8859-1 the stick still fails to mount.  All the commands return the same result as before.

Seems that the missing /dev/sda is a big red herring, but I don't see why it is missing.

----------

## fb

Nice hardware   :Cool:  , I'd like to have one like that around.

I presume that you are on amd64 on this?  The fact that

you say that you have a udev rule that create /dev/usbstick1

is strange. From what I gather you certainly didn't write the

rule. Which version of udev and hotplug are you using?

It is quite possible that they are different from x86.

I definitely don't get this device on my x86 system and I

am quite sure I don't on my ppc either. On x86 I have

udev-043 and hotplug-20040923 on ppc they are lower

version (or may be equal for hotplug I would need to check

tomorow to be sure).

Cheers

----------

## sheepdog

Versions: *Quote:*   

> *  sys-fs/udev
> 
>       Latest version available: 043
> 
>       Latest version installed: 043
> ...

 Rule:

 *Quote:*   

> BUS="usb", SYSFS{serial}="SNDK8CB7740FB4706705", NAME="usbstick1"

 

The problem definitely has to do with the fact that there is no /dev/sda.  mount requires a block device and /dev/sg0 and /dev/usbstick1 are both character devices.

----------

## bdad

 *sheepdog wrote:*   

> Versions: *Quote:*   *  sys-fs/udev
> 
>       Latest version available: 043
> 
>       Latest version installed: 043
> ...

 My SanDisk USB drive is working. DMESG shows  *Quote:*   

> Initializing USB Mass Storage driver...
> 
> scsi3 : SCSI emulation for USB Mass Storage devices
> 
> usbcore: registered new driver usb-storage
> ...

  when it is plugged in. My kernel config shows the following for USB support:

```
# USB support

#

CONFIG_USB=m

# CONFIG_USB_DEBUG is not set

#

# Miscellaneous USB options

#

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

# CONFIG_USB_SUSPEND is not set

# CONFIG_USB_OTG is not set

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

#

# USB Host Controller Drivers

#

CONFIG_USB_EHCI_HCD=m

# CONFIG_USB_EHCI_SPLIT_ISO is not set

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set

# CONFIG_USB_OHCI_HCD is not set

CONFIG_USB_UHCI_HCD=m

#

# USB Device Class drivers

#

CONFIG_USB_AUDIO=m

#

# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem

#

# CONFIG_USB_MIDI is not set

CONFIG_USB_ACM=m

CONFIG_USB_PRINTER=m

CONFIG_USB_STORAGE=m

# CONFIG_USB_STORAGE_DEBUG is not set

# CONFIG_USB_STORAGE_RW_DETECT is not set

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_DPCM is not set

# CONFIG_USB_STORAGE_HP8200e is not set

CONFIG_USB_STORAGE_SDDR09=y

CONFIG_USB_STORAGE_SDDR55=y

# CONFIG_USB_STORAGE_JUMPSHOT is not set

```

I also mount the device using:

```
mount /dev/sdd1 /mnt/SanDisk
```

I don't specify the filesystem. Also using UDev.

Hope it helps, B

----------

## sheepdog

Problem solved.

Upgraded to kernel 2.6.15-gentoo-r1.

 *Quote:*   

> goliath ~ # ls /proc/scsi
> 
> device_info  scsi  sg  usb-storage
> 
> goliath ~ # ls /proc/scsi/usb-storage/
> ...

 Now this works:

```
goliath ~ # mount /dev/usbstick1 /mnt/flashstick/

```

----------

