# Cannot mount fat32 partition

## sigmalll

I have vfat in my kernel

fdisk -l

```
Disk /dev/sda: 74.3 GB, 74355769344 bytes

255 heads, 63 sectors/track, 9039 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1        2550    20482843+   7  HPFS/NTFS

/dev/sda2            2551        5100    20482875    c  W95 FAT32 (LBA)

/dev/sda3   *        5101        5105       40162+  83  Linux

/dev/sda4            5106        9039    31599855    5  Extended

/dev/sda5            5106        5230     1004031   82  Linux swap / Solaris

/dev/sda6            5231        9039    30595761   83  Linux

```

fstab

```
/dev/sda2               /mnt/documents  vfat            defaults,rw     0 0

```

```
 mount /mnt/documents/

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

       or too many mounted file systems
```

What am I missing?

----------

## NeddySeagoon

sigmalll,

In the kernel config, you can choose the defualt codepage that vfat will use for displaying file names. It fails with a very misleading error message when you don't actually build that codepage.

Look at your kernel config to see which codepage(s) you have made and use the

```
 -o codepage=
```

option to mount to use one of those.

----------

## GungHo

sigmalll,

VFAT is not FAT32, it's only 16bit FAT with support for long filenames.

So I think you have to change your /etc/fstab to

/dev/sda2               /mnt/documents  fat32            defaults,rw     0 0 

or do a mount with the '-t' option

hth

----------

## nenn

its actually neither, it looks to me as you have that other Windows partition that you cant access, i know because i had the same with my ibm thinkpad. but the type you need is ntfs in your kernel and as the type of the partition being booted.

----------

## vortux

[code="sigmalll"]

/dev/sda2            2551        5100    20482875    c  W95 FAT32 (LBA)

[/code]

I'm not sure if it makes a difference, but I used b W95 FAT32 instead of c W95 FAT32 (LBA). To be honest, though, I'm not sure what the difference is.

```

mount /mnt/documents/

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

       or too many mounted file systems

```

I had the exact same problem. It should work if you format the partition from Windows. XP will automatically ask you the first time you try to use it, how you want to format it. Select FAT32 from the drop-down menu, wait 5-10 minutes, and boot Gentoo. Voila! Mounted, working FAT32 partition!

----------

## cylgalad

Your disk is not correctly partitionned, your fat partition (btw it's really vfat you need to put in fstab...) should be within the extended partition.

----------

## NeddySeagoon

cylgalad,

That is not important. Reading FAT32 should still work.

----------

## sigmalll

 *nenn wrote:*   

> its actually neither, it looks to me as you have that other Windows partition that you cant access, i know because i had the same with my ibm thinkpad. but the type you need is ntfs in your kernel and as the type of the partition being booted.

 

I have the NTFS partition mounted no problem

----------

## sigmalll

 *cylgalad wrote:*   

> Your disk is not correctly partitionned, your fat partition (btw it's really vfat you need to put in fstab...) should be within the extended partition.

 

It is, you have can upto 4 primary partitions.

----------

## sigmalll

 *NeddySeagoon wrote:*   

> sigmalll,
> 
> In the kernel config, you can choose the defualt codepage that vfat will use for displaying file names. It fails with a very misleading error message when you don't actually build that codepage.
> 
> Look at your kernel config to see which codepage(s) you have made and use the
> ...

 

You might have hit it right there, as soon as I get chance to crank my box up I will have a play and see if this fixes it

----------

## cylgalad

 *sigmalll wrote:*   

> It is, you have can upto 4 primary partitions.

 

It's not, you can't have 4 primary fat/ntfs partitions, just one (it's C: ), all the rest must be within the extended partition. 

Anyway it's always better just to have one (C: ) primary partition and to put all the rest in the extended partition, you won't have any partition troubles with stupid partitionning programs (like pqmagic...)

----------

## synapscape

cylgalad:

 *Quote:*   

> It's not, you can't have 4 primary fat/ntfs partitions, just one (it's C: ), all the rest must be within the extended partition. 

 

Sorry, but this is pure nonsense. You can have 4 primary partitions on your harddrive, this is the maximum which can be kept in the partitiontable, no matter which filesystem is used. If you need more partitions, you are forced to use an extended partition.

The only thing you have to take care of is multiple primary partitions with multiple windows on it. Windows likes to be on the first primary partition and that one has to be bootable. More than one partition of this kind confuses windows. This causes trouble, but, as usual, this is a windows problem, not a problem of partitions.

Anyways, it is recommended to format a partition with the OS the chosen filesystem comes from. At least in my experience.

----------

## Omadon

I have a similar problem.

I'm running

```
Linux locutus 2.6.9-gentoo-r14 #15 SMP Thu Feb 10 12:03:43 GMT 2005 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
```

In my kernel config I enabled:

```
<M> MSDOS fs support

<M> VFAT (Windows-95) fs support

(437) Default codepage for FAT

(iso8859-1) Default iocharset for FAT

<M> NTFS file system support

[ ]   NTFS debugging support

[ ]   NTFS write support
```

and also:

```
<*> Base native language support

(iso8859-1) Default NLS Option 

<*>   Codepage 437 (United States, Canada)
```

When I try to mount my fat32 partition:

```
root@locutus # mount -t vfat /dev/hda1 /mnt/win32

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

       or too many mounted file systems
```

Checking dmesg, I notice it says when I try to mount it

```
FAT: IO charset iso8859-1 not found
```

In the kernel config under Native Language Support there is a line:

```
< >   NLS ISO 8859-1  (Latin 1; Western European Languages)
```

I tried enabling that, but when I rebooted grub said the kernel line was an invalid executable command (or something to that affect) and wouldn't boot.  I can do it again to get the full grub message if it would help.

Are you getting the same thing?

----------

## NeddySeagoon

Omadon, 

That missing

```
 < >   NLS ISO 8859-1  (Latin 1; Western European Languages)
```

is/was your problem. Fixing that and reinstalling the kerenl has not mad it unable to boot, if thats all you did.

It looks like you have editied the grub.conf file and got it wrong.

The full message verbatam would help.

----------

## Omadon

 *NeddySeagoon wrote:*   

> That missing
> 
> ```
>  < >   NLS ISO 8859-1  (Latin 1; Western European Languages)
> ```
> ...

 

I added it back into the kernel and rebooted, seems to work fine now.  I am able to mount my fat32 partition.  Thanks.

Strange though, before when grub refused to boot it, I put in the liveCD, chroot'ed over to /mnt/gentoo, and recompiled the kernel without the option, I didn't touch anything else.  It worked fine after that :\

----------

