# USB + FAT32? [SOLVED]

## Pithlit

I just wanna know how to get a portable MP3 player using a FAT32 formatted CF card usable in linux... Every time I try to mount it (mount -t vfat /dev/sda1 /home/mp3) I get:

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

.Last edited by Pithlit on Sat Apr 16, 2005 8:09 pm; edited 1 time in total

----------

## donjuan

Do you have FAT32 support built into your kernel?

----------

## Pithlit

Of course I do. I wouldn't be able to mount FAT32 HDDs otherwise.

----------

## petlab

We have to ask these questions, since you didn't detail them all -  :Smile: 

How about this one - can you mount anything else fat or fat32?  That would help us troubleshoot.

----------

## Pithlit

I'm aware of that petlap, and I do apreciate all help but I tend to give short answers without unnecesary chitchat (sorry if that sounds cold). On the other hand I do tend to give out as much detail as possible and getting no answers at all.

What did you mean by "anything else fat or fat32" ? I didn't try to make a fat32 CD yet...

----------

## petlab

Have you ever been able to mount any fat filesystem

Is that short enough for ya toughguy?

Your detail link doesn't work.

----------

## Pithlit

Fixed details and 

```
Of course I do. I wouldn't be able to mount FAT32 HDDs otherwise.
```

now (if I'm allowed to ask) could we not insult eachother?  :Rolling Eyes: 

----------

## petlab

Sorry - it just seemed like you started it with "of course I do."  donjuan was trying to help you, giving one of the more common reasons for your problem.  At that point, you hadn't given us ANY details on what you had tried.  Then you snapped at donjuan.

We can't guess what you have done to troubleshoot, and we shouldn't have to ASK for details.  If you have already tried all the common solutions, let us know.  Then we won't have to waste time with a bunch of things you already tried.

See what I mean?

----------

## petlab

What about partitioning?  I am guessing here, but don't you have to partition it first?  Maybe repartitioning with cfdisk, then mkfs.

----------

## Pithlit

I didn't see that as snapping... but anyway.

I didn't try partitioning actually... What bothers me is that it it works fine in windows. I formated the thing there, transfered the songs, etc... and it works. Whereas here I just cant mount it. It's already partitioned and formated and filled with data so that partitioning shouldn't be an issue.

----------

## petlab

I agree, but you are still having problems.  There might be a difference in the partition, which came from an incomplete or buggy partitioning program when the card was initially partitioned.

----------

## Pithlit

hardly... but it might be worth a shot.

----------

## petlab

You just come across as grumpy.  I suppose no one else tells you this?  Come on, we are having fun here.  I want to help out with your problem.  Mostly what you are doing is saying "no, it's not that," or "I doubt that's it.."  I'm giving suggestions.  I thought that's what you would want.

When you are willing to actually do some work to try fixing the problem, let me know.

----------

## Pithlit

Well, since you seem to be having fun (and since it's pretty much the only thing I haven't tried yet - from the suggested ones)...

```
hardly... but it might be worth a shot.
```

 This means "I'll try that but I have my doubts about it." I'll let you know if it works or not. Like I said... it might be worth it.  :Razz: 

----------

## petlab

Okay, sorry to be so hard, sometimes less is really less (as far as being short in your posts)

I actually have had a problem like this once, and I thought it really odd myself.  On the other hand, I expect it when trying to send graphics files from one program to another.  I can fix it by opening the file in a third program, then resaving it.  The base format is not always implemented the same between programs.

FAT should be the same no matter where it is created.  And so should the partition.  But, so should graphics files, and they aren't.  Hope you get it going.  :Very Happy: 

----------

## Pithlit

Yeah me too... otherwise I'll need to get me a win box just for this  :Twisted Evil: 

----------

## sotha_sil

 *Pithlit wrote:*   

> I just wanna know how to get a portable MP3 player using a FAT32 formatted CF card usable in linux... Every time I try to mount it (mount -t vfat /dev/sda1 /home/mp3) I get:
> 
> ```
> mount: wrong fs type, bad option, bad superblock on /dev/sda1, or too many mounted file systems
> ```
> ...

 

I get that exact same error message ever since attempting the 2.6 kernel upgrade. When I boot in 2.4, I can mount a fat32 drive fine, in 2.6, I can't.  I suspect fat32 support is no longer an option for the 2.6 kernel.  When I perform a "make menuconfig" I see no fat32 file systems, just vfat (windows 95 (pre fat32)) and fat (DOS).

At any rate, I hate having to reboot into 2.4 just to mount my windows partitions so I hope someone can actually post a solution to this problem here.

----------

## Pithlit

```
#

# DOS/FAT/NT Filesystems

# 

CONFIG_FAT_FS=y

CONFIG_MSDOS_FS=y

CONFIG_VFAT_FS=y

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-2"

CONFIG_NTFS_FS=y

# CONFIG_NTFS_DEBUG is not set

# CONFIG_NTFS_RW is not set

```

That's from 2.6.10-gentoo-r4. And this reminds me... should some of these options (also the options found in USB support) be compiled as modules? IIRC I compiled everything in.

----------

## petlab

Yeah, there you go.  It can support vat. , and you DO have the msdos as well as the fat and vfat.  Those are all needed.

Theoretically, you can either compile in, OR use as modules.  Of course, as modules you need to make sure they are not just made, but also installed, (make modules modules_install)

----------

## donjuan

I did find the response to my initial post rather cold, but I basically ignored that.  The reason why I didn't respond anymore was really because I couldn't think of anything else that could be the problem, but now I can since you guys started talking about more kernel stuff.  Do you have USB mass storage support compiled in?  (Device Drivers --> USB Support --> USB Mass Storage Support)

Also, the handbook mentions the usbfs.  I did a little research about it and it's similar to the /proc file system.  Is it necessary to mount USB flash drives?  If so, you should probably make sure you have the following line in your /etc/fstab: 

```
none        /proc/bus/usb   usbfs         defaults      0 0
```

----------

## Pithlit

I basically just followed this (only with a 2.6 kernel). I wouldn't know anything about usbfs tho. I'll try tomorrow. Thanks for the help so far.

----------

## Pithlit

Let's start from the beginning... Hi, I'm Pithlit /joke

# dmesg

```
scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: FL        Model: Nex IIe Digital   Rev: 0001

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sda: 2684354560 512-byte hdwr sectors (274878 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

Device not ready. Make sure there is a disc in the drive.

SCSI device sda: 2684354560 512-byte hdwr sectors (274878 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0: p1

Device not ready. Make sure there is a disc in the drive.

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete
```

So that works fine (at least as far as I can tell)

I tried partitioning with # cfdisk /dev/sda1

```
Wrote partition table, but re-read table failed.  Reboot to update table.

Toggle bootable flag of the current partition
```

 and it didn't go very well.

# mkfs.vfat -F 32 /dev/sda1 went smoothly... I now have a nice empty CF card  :Mad: 

# fsck.msdos  /dev/sda1

```
dosfsck 2.10, 22 Sep 2003, FAT32, LFN

There are differences between boot sector and its backup.

Differences: (offset:original/backup)

  447:01/00, 448:01/00, 450:06/00, 451:0e/00, 452:b0/00, 453:b4/00, 454:30/00

  , 458:e0/00, 459:9c/00, 460:07/00

1) Copy original to backup

2) Copy backup to original

3) No action

? 1

Leaving file system unchanged.

/dev/sda1: 0 files, 1/491912 clusters
```

Yupee!! Something went wrong again (chosing 1, 2 or 3 always leads to "Leaving file system unchanged.")

That /proc/bus/usb didn't change a thing either. I guess I'm stuck with the idea of a win box...

P.S. I'm not trying to be cold or snappy or anything... I'm just so desperate I'd bite a piece of the keyboard off if I knew it'd help.

----------

## donjuan

 *Pithlit wrote:*   

> Device not ready. Make sure there is a disc in the drive.

 It's having trouble communicating (we already knew that), so that part didn't go fine.  Another suggestion I've found is to try building SCSI Generic Support into the kernel, which doesn't look like it should be necessary, but who knows.  The last thing I've found is to try a more recent kernel.  If neither of those works it's looking like your device just isn't supported =/.

----------

## Pithlit

Hmm... I can format it with ext2, ext3 and reiser (I haven't tried others) and mount it just fine. That makes me think the device itself is fine and supported. And I have generic scsi support (cos of a firewire cd-rw). Anyone knows if I can use gtkam (or just gphoto) to transfer files onto a camera? Cos that would save my ass at least till I figure out another way...

edit: ...a 2.6.11-gentoo-r3 kernel

----------

## nightfrost

First off: this is one of the funniest threads I've ever read on these forums! Secondly, check out "File Systems > DOS/FAT/NT Filesystems" and "File Systems > Native Language Support". I used to have problems mounting fat32 until I changed the default codepage from 437 (USA) to 850 (Europe), and iso8859-1 to iso8859-15. You might also want to enable utf-8 if that's not enabled. However, I never quite understood exactly why that helped. Anyway, good luck on ya...

----------

## mcspiff

I had similar problems and (humor me here) try

```

touch /dev/sda

mount /dev/sda1 /mnt/mountpoint

```

Something to do with usb timeouts. this may not help you at all.

----------

## Pithlit

```
CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-2"

....

....

CONFIG_NLS=y

CONFIG_NLS_DEFAULT="iso8859-2"

CONFIG_NLS_UTF8=y
```

Will try that out...

I'll also try your suggestion mcspiff (yes, I'm desperate  :Razz:  ).

----------

## mcspiff

good luck, if not we'll figure it out

----------

## Pithlit

 *nightfrost wrote:*   

> First off: this is one of the funniest threads I've ever read on these forums! Secondly, check out "File Systems > DOS/FAT/NT Filesystems" and "File Systems > Native Language Support". I used to have problems mounting fat32 until I changed the default codepage from 437 (USA) to 850 (Europe), and iso8859-1 to iso8859-15. You might also want to enable utf-8 if that's not enabled. However, I never quite understood exactly why that helped. Anyway, good luck on ya...

 

Finally got around to recompile the kernel and funny enough... IT WORKED! I love you right now  :Razz:  I guess USB/VFAT doesn't like USA  :Laughing:  Thanks again.

----------

## Huey1

 *Quote:*   

> I'm just so desperate I'd bite a piece of the keyboard off if I knew it'd help.

 

Yeah - we have all been there, or nearly there. Maybe its only the way keyboards get after some determined Gentoo config/compiling that stops us going the whole way.

----------

## nightfrost

 *Pithlit wrote:*   

>  *nightfrost wrote:*   First off: this is one of the funniest threads I've ever read on these forums! Secondly, check out "File Systems > DOS/FAT/NT Filesystems" and "File Systems > Native Language Support". I used to have problems mounting fat32 until I changed the default codepage from 437 (USA) to 850 (Europe), and iso8859-1 to iso8859-15. You might also want to enable utf-8 if that's not enabled. However, I never quite understood exactly why that helped. Anyway, good luck on ya... 
> 
> Finally got around to recompile the kernel and funny enough... IT WORKED! I love you right now  I guess USB/VFAT doesn't like USA  Thanks again.

 

I'm glad it worked out for you  :Smile: 

----------

