# Fat32 mounting on 2.6.8-rc2 [Solved]

## VisualPhoenix

Hey there everyone. I've got a little problem -- and I'm fairly sure its kernel related. After recently switching to 2.6.8-rc2 from an earlier 2.6.5-gentoo-r1 kernel, suddenly I can not mount any of my fat32 drives. Now I know the first thing a lot of you will say is that the partitions are corrupt. If I boot the old 2.6.5 kernel, they mount fine -- so whats the deal?

```
root@LiquidMercury ~ # mount /dev/hdg5 /mnt/hdd/5/

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

       or too many mounted file systems
```

Bzzt..  ok now you all want to see the partition table.

```

Disk /dev/hdg: 200.0 GB, 200049647616 bytes

255 heads, 63 sectors/track, 24321 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hdg1               2       16709   134207010    f  W95 Ext'd (LBA)

/dev/hdg2   *       16710       20661    31744440    c  W95 FAT32 (LBA)

/dev/hdg3           20662       24321    29398950    c  W95 FAT32 (LBA)

/dev/hdg5               2        4080    32764536    c  W95 FAT32 (LBA)

/dev/hdg6            4081        8159    32764536    c  W95 FAT32 (LBA)

/dev/hdg7            8160       12238    32764536    c  W95 FAT32 (LBA)

/dev/hdg8           12239       14924    21575263+   c  W95 FAT32 (LBA)

/dev/hdg9           14925       16709    14337981    c  W95 FAT32 (LBA)

```

looks fine.

```

root@LiquidMercury ~ # hdparm -g /dev/hdg

/dev/hdg:

 geometry     = 24321/255/63, sectors = 390721968, start = 0

```

kernel looks fine:

```
 File Systems ->  DOS/FAT/NT Filesystems -> 

<*> MSDOS fs support

<*> VFAT (Windows-95) fs support

  (437) Default codepage for FAT

  (iso8859-1) Default iocharset for FAT

<*> NTFS file system support    

```

Any clues?Last edited by VisualPhoenix on Sat Aug 07, 2004 6:27 am; edited 1 time in total

----------

## squeegy

http://lkml.org/lkml/2004/8/4/99

Check that out.

----------

## VisualPhoenix

do you think thats related? I should be able to mount a read only filesystem shouldnt I?

----------

## squeegy

Yes it's definitley related.  You now have to specificy the codepage and iocharset I believe, that is if I am reading the thread on LKML right.  On the left side you'll see all the replies in that thread, go through them all.

----------

## VisualPhoenix

So whats the default for fat32? how do i find out the correct codepage and iocharset for fat32?

(437) Default codepage for FAT

 (iso8859-1) Default iocharset for FAT 

doesnt work...

----------

## squeegy

I'm sorry I have no clue beyond what I've already posted.  And what I posted I'm not very knowledgable about, I just happened to notice it while reading through the LKML.  You might want to look at Documentation/filesystems/vfat.txt for the 2.6.8-rc2 kernel and see if there's anything there.

----------

## VisualPhoenix

meh. still can't figure out the proper settings.

----------

## Malakin

Do you have "codepage 437" and "NLS ISO 8859-1" support enabled in your kernel? (file systems->native language support->)

I'm using 2.6.8-rc2 without any problems with fat32 directories.

----------

## VisualPhoenix

you got it dude! "NLS ISO 8859-1" was built as a module instead of in the kernel! GOOD LOOK! THANKS SO MUCH!

----------

## JinxterX

 *VisualPhoenix wrote:*   

> you got it dude! "NLS ISO 8859-1" was built as a module instead of in the kernel! GOOD LOOK! THANKS SO MUCH!

 

Can you read AND write to your FAT32 partitions? Because I can only read them now.

----------

## Isaiah

 *JinxterX wrote:*   

> Can you read AND write to your FAT32 partitions? Because I can only read them now.

 

Can only read here also  :Confused: 

----------

## Malakin

I can read/write just fine. 2.6-8-rc2

----------

## JinxterX

I get this is /var/log/messages :

FAT: codepage or iocharset option didn't specified

File name can not access proper (mounted as read-only)

Everything relevant is enabled in the kernel, don't understand.

[Edit]

Fixed it, stupid oversight on my part, just added codepage=437 and iocharset=iso8859-1 to each vfat entry in /etc/fstab.  :Razz: 

----------

## Isaiah

 *JinxterX wrote:*   

> Fixed it, stupid oversight on my part, just added codepage=437 and iocharset=iso8859-1 to each vfat entry in /etc/fstab. 

 

I need to know how/where to put this in my fstab, if you would be so kind  :Confused: 

----------

## Malakin

That's weird, I don't need that to mount my fat32 partitions read/write. Just typing "mount /dev/whatever /mnt/whatever" will mount a fat32 partition read/write just fine for me without any errors. Or a simple line in fstab without specifying the codepage and iocharset. I wonder what the difference is between my setup and yours?...

----------

## Isaiah

 *Malakin wrote:*   

> That's weird, I don't need that to mount my fat32 partitions read/write. Just typing "mount /dev/whatever /mnt/whatever" will mount a fat32 partition read/write just fine for me without any errors. Or a simple line in fstab without specifying the codepage and iocharset. I wonder what the difference is between my setup and yours?...

 

For what it's worth, 2.6.8-rc3-Redeeman1 in use here  :Cool: 

P.S. This is working for me...

```
/dev/hda1      /mnt/win_c   vfat      defaults,umask=000,codepage=437,iocharset=iso8859-1   0 0
```

----------

## JinxterX

 *Isaiah wrote:*   

>  *Malakin wrote:*   That's weird, I don't need that to mount my fat32 partitions read/write. Just typing "mount /dev/whatever /mnt/whatever" will mount a fat32 partition read/write just fine for me without any errors. Or a simple line in fstab without specifying the codepage and iocharset. I wonder what the difference is between my setup and yours?... 
> 
> For what it's worth, 2.6.8-rc3-Redeeman1 in use here 
> 
> P.S. This is working for me...
> ...

 

My fstab entry is basically the same as yours and it works too. Using 2.6.8-rc3-nitro1.

----------

