# usb mount - wrong files [SOLVED]

## Splink

Trying to mount my usb stick on my cam.

i get .. 

 *Quote:*   

> Feb 12 21:44:46 gentoo sda: assuming Write Enabled
> 
> Feb 12 21:44:46 gentoo sda: assuming drive cache: write through
> 
> Feb 12 21:44:46 gentoo sda: sda1
> ...

 

so i mount it .. with usbfs ... etc -

```
bash-2.05b# mount -t usbfs /dev/sda1 /mnt/memory_card/

bash-2.05b# cd /mnt

bash-2.05b# cd memory_card/

bash-2.05b# ls

001  002  003  004  devices

bash-2.05b#

```

this aint the right dir structure  :Smile: 

I have mounted about 10 devices around sda .. sdb .. sg0 .. etc .. and they all show t he same info .. but not the info on my memory card.Last edited by Splink on Mon Feb 21, 2005 9:23 am; edited 1 time in total

----------

## cyrillic

 *Splink wrote:*   

> so i mount it .. with usbfs ... etc -
> 
> ```
> bash-2.05b# mount -t usbfs /dev/sda1 /mnt/memory_card/ 
> ```
> ...

 

usbfs is a virtual filesystem for USB devices, not for the data itself.

Try this instead

```
bash-2.05b# mount -t vfat /dev/sda1 /mnt/memory_card/ 
```

----------

## angoraspruce

 *Splink wrote:*   

> 
> 
> ```
> bash-2.05b# mount -t usbfs /dev/sda1 /mnt/memory_card/
> 
> ...

 

If you don't mind me taking a shot in the dark, the usbfs is dynamically generated, like '/proc', and it's usually mounted in '/proc/bus/usb'.  Here's the output of that directory on my computer...

```
001  002  003  004  005  devices  drivers
```

... much like what you have above, suggesting that you mounted it at '/mnt/memory_card'.  And it can be mounted anywhere, much like you just did.

Here's the shot in the dark, I think this is what you want to do:

```
mount -t vfat /dev/sda1 /mnt/memory_card/
```

This is assuming that your memory stick is 'vfat', which they all are to begin with, and are usually kept that way so they're portable from system to system.

HTH  :Smile: 

----------

## Earthwings

Moved from Installing Gentoo.

----------

## Splink

okidockey ..  thanks for looking at this.

I tried both before I posted this I think, and it gives me:

 *Quote:*   

> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
> 
>        or too many mounted file systems
> 
> bash-2.05b# mount -t vfat /dev/sda /mnt/memory_card/
> ...

 

Now I remember going through the same thing about a month ago with mandrake - as I just started on linux.. but then it was all done automatically for me and made me lazy  :Smile: 

----------

## Splink

I really should look before I post things ..  :Smile: 

Ok, after I posted the last message, I went back to console and did:

 *Quote:*   

> bash-2.05b# fdisk /dev/sda
> 
> Command (m for help): p
> 
> Disk /dev/sda: 129 MB, 129892352 bytes
> ...

 

So i thought .. a ha !! fat16 !!!

and I did .. 

```
bash-2.05b# mount -t FAT16 /dev/sda1 /mnt/memory_card

mount: fs type FAT16 not supported by kernel

```

So, I looked at the kernel options, and there is a section for DOS/FAT files systems.. but I cant seem to find anything for FAT16 specific. Am i being really dumb here ?  :Smile: 

----------

## angoraspruce

If the following doesn't do it:

```
mount -t msdos /dev/sda1 /mnt/memory_card
```

...then maybe you don't have support for mounting vfat/msdos filesystems? 

Best regards  :Smile: 

----------

## Splink

hehe, prob  :Smile: 

I am away from my gentoo box at the moment, so I will give it a try.

Just a thought .. are the installatons for the DOS support in the kernel supposed to be (M) or (*) ? That is ..,.. for me to mount this usb filesystem.

----------

## Sachankara

mount -t vfat /dev/sda1 /mnt/path

If it doesn't work, try looking at the bottom of the system log with "dmesg | tail"...

----------

## cyrillic

 *Splink wrote:*   

> So i thought .. a ha !! fat16 !!!
> 
> and I did .. 
> 
> ```
> ...

 

You should be able to mount FAT12, FAT16, FAT32 partitions using -t vfat.

... as long as your kernel supports it.

To see a list of supported filesystems, do this.

```
# cat /proc/filesystems 
```

If you have vfat compiled as a module rather than directly in the kernel, it will appear in the list after you load the module.

----------

## shruggy1987

try mounting without the -t argument:

mount /dev/sda1 /mnt/XXXXXX

if that doesn't work, try the same thing with /dev/sda (no -t argument)

thats what worked for me.

----------

## Splink

```
bash-2.05b# mount /dev/sda1 /mnt/memory_card/

mount: /dev/sda1 is not a valid block device

bash-2.05b# mount /dev/sda /mnt/memory_card/

mount: /dev/sda is not a valid block device

bash-2.05b#

```

If I keep trying to specify vfat or msdos, I get

```
mount: wrong fs type, bad option, bad superblock on /dev/sda1,

       or too many mounted file systems

```

Usb appears to be loading up fine .. 

```
Feb 17 08:04:46 gentoo Vendor: Sony      Model: Sony Camcorder    Rev: 2.00

Feb 17 08:04:46 gentoo Type:   Direct-Access                      ANSI SCSI revision: 00

Feb 17 08:04:46 gentoo SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Feb 17 08:04:46 gentoo sda: assuming Write Enabled

Feb 17 08:04:46 gentoo sda: assuming drive cache: write through

Feb 17 08:04:46 gentoo SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

Feb 17 08:04:46 gentoo sda: assuming Write Enabled

Feb 17 08:04:46 gentoo sda: assuming drive cache: write through

Feb 17 08:04:47 gentoo sda: sda1

Feb 17 08:04:47 gentoo Attached scsi removable disk sda at scsi3, channel 0, id 0, lun 0

Feb 17 08:04:47 gentoo Attached scsi generic sg0 at scsi3, channel 0, id 0, lun 0,  type 0

Feb 17 08:04:47 gentoo usb-storage: device scan complete

```

This is a Sony DCR-PC330 if that makes any difference  :Smile: 

I have also loaded in most file system support, including automount and scsi devices in the kernel.

----------

## Splink

Right, 

I managed to fix this by putting in fstab:

```

/dev/sda1    /mnt/memory_card      vfat     uid=(username),codepage=850

```

Within the kernel I had set the dos file system to use UK codepage instead of a US one of 437. It could not load cp437 (even though it was selected in the kernel) and the vfat was defaulting as it (even though i set it to default at 850, and rebuilt the kernel)

Forcing this to use 850 mounts it with no problem. I think there are a few other people who have had similar issues, just nice to know these little bits which turn an easy problem into a nightmare sometimes  :Smile: 

----------

## angoraspruce

Ah...mystery solved.   And thank you for sharing.  It's nice to know what the heck was up with this deal.

Soif you want to hand mount it, then:

```
 mount -t vfat -o codepage=850 /dev/sda1    /mnt/memory_card
```

 :Smile: 

----------

## Splink

aye indeed  :Smile: 

i did that first, and went into lazy mode, hence put it right into fstab  :Smile: 

----------

