# cannot mount fat32 hdb1

## drawsmcgraw

I've searched the forums and, while I've seen similar errors, none of the fixes I've seen are helping me here... I'm hoping someone else out there can help me a bit here  :Embarassed: 

Instead of giving a confusing description of my disk setup, here's the output of fdisk -l

```

bash-2.05b# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1        7649    61440561    7  HPFS/NTFS

/dev/hda2            7650        7658       72292+  83  Linux

/dev/hda3            7659        7783     1004062+  82  Linux swap

/dev/hda4            7784        9729    15631245   83  Linux

Disk /dev/hdb: 160.0 GB, 160041885696 bytes

255 heads, 63 sectors/track, 19457 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hdb1   *           1        3824    30716248+   c  W95 FAT32 (LBA)

/dev/hdb4            3825        4328     4048380   83  Linux

bash-2.05b# 

```

And when I try to mount my fat32 partition...

```

bash-2.05b# mount -t vfat /dev/hdb1 /mnt/fat32Winshare/

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

       or too many mounted file systems

```

I don't think it's 100% relevant, but here's the vitals of my fstab as well

```

/dev/hda1               /mnt/winshare   ntfs            ro,umask=0222,auto      0 0

/dev/hda2               /boot                      ext2            noauto,noatime               1 2

/dev/hda4               /                              ext3            noatime                              0 1

/dev/hda3               none                      swap            sw                                       0 0

/dev/hdb1               /mnt/fat32Winshare      vfat    umask=0222,auto,user,rw 0 0

/dev/cdrom              /mnt/cdrom      iso9660         noauto,ro,umask=0222    0 0

```

I've got dev/hda1 mounting on boot with no problem, so I figure this kinda thing would be trivial but, alas... Any ideas?

----------

## petrasl

If you compiled the kernel with vfat as a module, try to do :

```

modprobe vfat

```

You can also paste here the output of 

```
mount
```

----------

## janosh

Had this problem yesterday...

When you build fat32 support in the kernel, you have to choose the right codepage.

```
File systems  --->

DOS/FAT/NT Filesystems  --->

<*> MSDOS fs support

<*> VFAT (Windows-95) fs support

(850) Default codepage for FAT  <-- You must set the correct codepage
```

and i think you need the codepage you choose in the native language support also

```
File systems  --->

DOS/FAT/NT Filesystems  --->

Native Language Support  --->

 <*>   Codepage 850 (Europe)
```

That made the trick for me, hope it'll help you to

----------

## drawsmcgraw

To Petrasel:

I have vfat support built into the kernel, and the output of mount:

```

bash-2.05b# mount

/dev/hda4 on / type ext3 (rw,noatime)

none on /dev type devfs (rw)

none on /proc type proc (rw)

none on /sys type sysfs (rw)

none on /dev/pts type devpts (rw)

none on /dev/shm type tmpfs (rw)

none on /proc/bus/usb type usbfs (rw)

/dev/hda1 on /mnt/winshare type ntfs (ro,umask=0222)

```

To Janosh:

How do I know which is the correct codepage? Currently, mine is  437 and the "default charset for FAT" is iso8859-1. And... I don't have "Native Language Support" under "DOS/FAT/NT Filesystems"... I'm using 2.6.10-rc1-mm5 sources... could that be why?

To both:

Thanks for the incredible response time!

----------

## nephlim

In the area where you enable vfat support must be an entry like Codepage. You have to enter a value there by the hand, so you can't select a codepage. 

There must be the same codepage as in the native language support area, which is - like you said - not in the vfat area.

This is what it looks like in the vfat area:

```

DOS/FAT/NT Filesystems--->

   <*> MSDOS fs support

   <*> VFAT (Windows-95) fs support

   (850) Default codepage for FAT  <-- This is what's interesting for you

   (iso8859-15) Default iocharset for FAT  <-- I think with charset you mean this?

   < > NTFS file system support

```

And in the native language support area:

```

Native Language Support--->

   --- Base native language support

   (iso8859-15) Default NLS Option

   < > Codepage 437 (United States, Canada)

   < > Codepage 737 (Greek) 

   < > Codepage 775 (Baltic Rim)

   <*> Codepage 850 (Europe)

   < > Codepage 852 (Central/Eastern Europe)

   < > Codepage 855 (Cyrillic)

   < > Codepage 857 (Turkish) 

   < > Codepage 860 (Portuguese)

   < > Codepage 861 (Icelandic) 

   < > Codepage 862 (Hebrew)

   < > Codepage 863 (Canadian French)

   < > Codepage 864 (Arabic)

   < > Codepage 865 (Norwegian, Danish)

   < > Codepage 866 (Cyrillic/Russian) 

   < > Codepage 869 (Greek) 

   < > Simplified Chinese charset (CP936, GB2312)

   < > Traditional Chinese charset (Big5)

   < > Japanese charsets (Shift-JIS, EUC-JP)

   < > Korean charset (CP949, EUC-KR)

   < > Thai charset (CP874, TIS-620) 

   < > Hebrew charsets (ISO-8859-8, CP1255)

   < > Windows CP1250 (Slavic/Central European Languages)

   < > Windows CP1251 (Bulgarian, Belarusian)

   < > ASCII (United States)

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

   < > NLS ISO 8859-2(Latin 2; Slavic/Central European Languages)

   < > NLS ISO 8859-3(Latin 3; Esperanto, Galician, Maltese, Turkish)

   < > NLS ISO 8859-4(Latin 4; old Baltic charset) 

   < > NLS ISO 8859-5(Cyrillic)

   < > NLS ISO 8859-6(Arabic) 

   < > NLS ISO 8859-7(Modern Greek)

   < > NLS ISO 8859-9(Latin 5; Turkish)

   < > NLS ISO 8859-13 (Latin 7; Baltic) 

   < > NLS ISO 8859-14 (Latin 8; Celtic) 

   <*> NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)

   < > NLS KOI8-R (Russian) 

   < > NLS KOI8-U/RU (Ukrainian, Belarusian)

   <*> NLS UTF8

```

Hope now you know what is meant?

Greetings

----------

## drawsmcgraw

Excellent! Had to enable native language support for the codepage as well as the other ones you had listed (minus the iso8859-15), and it even mounts on startup now. Thanks a lot!

----------

## jfb3

So what's my problem.  I still can't get this to work? 

I start with:

```
drwxrwxrwx   2 root root   48 Dec 11 03:10 bigdisk
```

The mount command I'm using is:

```
mount -t vfat -o users,rw,umask=000,quiet,exec /dev/hdd1 /bigdisk
```

I end up with:

```
root # mount

/dev/hda3 on / type reiserfs (rw,noatime)

none on /dev type devfs (rw)

none on /proc type proc (rw)

none on /sys type sysfs (rw)

none on /dev/pts type devpts (rw)

none on /dev/shm type tmpfs (rw)

none on /proc/bus/usb type usbfs (rw)

/dev/hdd1 on /bigdisk type vfat (rw,nosuid,nodev,umask=000,quiet)

```

```
┌─────────────────────────────────────────────────────────────────────────────────┐ │

  │ │                    <*> MSDOS fs support                                         │ │

  │ │                    <*> VFAT (Windows-95) fs support                             │ │

  │ │                    (850) Default codepage for FAT                               │ │

  │ │                    (iso8859-15) Default iocharset for FAT                       │ │

  │ │                    < > NTFS file system support 

```

```
--- Base native language support                                             

  │ │    (iso8859-15) Default NLS Option                                              │ │

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

  │ │    < >   Codepage 737 (Greek)                                                   │ │

  │ │    < >   Codepage 775 (Baltic Rim)                                              │ │

  │ │    <*>   Codepage 850 (Europe)                                                  │ │

  │ │    < >   Codepage 852 (Central/Eastern Europe)                                  │ │

  │ │    < >   Codepage 855 (Cyrillic)                                                │ │

  │ │    < >   Codepage 857 (Turkish)                                                 │ │

  │ │    < >   Codepage 860 (Portuguese)                                              │ │

  │ │    < >   Codepage 861 (Icelandic)                                               │ │

  │ │    < >   Codepage 862 (Hebrew)                                                  │ │

  │ │    < >   Codepage 863 (Canadian French)                                         │ │

  │ │    < >   Codepage 864 (Arabic)                                                  │ │

  │ │    < >   Codepage 865 (Norwegian, Danish)                                       │ │

  │ │    < >   Codepage 866 (Cyrillic/Russian)                                        │ │

  │ │    < >   Codepage 869 (Greek)                                                   │ │

  │ │    < >   Simplified Chinese charset (CP936, GB2312)                             │ │

  │ │    < >   Traditional Chinese charset (Big5)                                     │ │

  │ │    < >   Japanese charsets (Shift-JIS, EUC-JP)                                  │ │

  │ │    < >   Korean charset (CP949, EUC-KR)                                         │ │

  │ │    < >   Thai charset (CP874, TIS-620)                                          │ │

  │ │    < >   Hebrew charsets (ISO-8859-8, CP1255)                                   │ │

  │ │    < >   Windows CP1250 (Slavic/Central European Languages)                     │ │

  │ │    < >   Windows CP1251 (Bulgarian, Belarusian)                                 │ │

  │ │    < >   ASCII (United States)                                                  │ │

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

  │ │    < >   NLS ISO 8859-2  (Latin 2; Slavic/Central European Languages)            

  | │    < >   NLS ISO 8859-2  (Latin 2; Slavic/Central European Languages)           │ │

  │ │    < >   NLS ISO 8859-3  (Latin 3; Esperanto, Galician, Maltese, Turkish)       │ │

  │ │    < >   NLS ISO 8859-4  (Latin 4; old Baltic charset)                          │ │

  │ │    < >   NLS ISO 8859-5  (Cyrillic)                                             │ │

  │ │    < >   NLS ISO 8859-6  (Arabic)                                               │ │

  │ │    < >   NLS ISO 8859-7  (Modern Greek)                                         │ │

  │ │    < >   NLS ISO 8859-9  (Latin 5; Turkish)                                     │ │

  │ │    < >   NLS ISO 8859-13 (Latin 7; Baltic)                                      │ │

  │ │    < >   NLS ISO 8859-14 (Latin 8; Celtic)                                      │ │

  │ │    <*>   NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)        │ │

  │ │    < >   NLS KOI8-R (Russian)                                                   │ │

  │ │    < >   NLS KOI8-U/RU (Ukrainian, Belarusian)                                  │ │

  │ │    <*>   NLS UTF8                                                               │ │

```

I've recompiled my kernel to match not only the suggestions in this thread but every thread I've found that is similar and still /dev/hdd1 behaves as read-only.  This drive used to mount cleanly under 2.4 kernel system.

----------

## nephlim

Try this command instead:

```

mount -t vfat -o user,rw,exec,quiet,umask=000 /dev/hdd1 /bigdisk

```

Hint: "user" instead of "users". "users" may work on 2.4.x but on 2.6.x it won't!

Greetings

----------

## Zyne

 *nephlim wrote:*   

> Try this command instead:
> 
> ```
> 
> mount -t vfat -o user,rw,exec,quiet,umask=000 /dev/hdd1 /bigdisk
> ...

 

heh? isn't it exactly the opposite?

I have users in my /etc/fstab for my 2.6.9-nitro4 kernel, and it works great...

read/write support on my fat drive too...

here's what I have in my /etc/fstab:

```

/dev/hdb1               /mnt/tv         vfat            noauto,users,rw         0 0

```

works great for me! (if you want it to auto-mount, change noauto to auto of course)

----------

## jfb3

Ok, I'll bite...

```

1) mount -t vfat -o user,rw,umask=000,quiet,exec /dev/hdd1 /bigdisk

2) mount -t vfat -o uid=0,gid=0,rw,umask=000,quiet,exec /dev/hdd1 /bigdisk

3) mount -t vfat -o uid=1000,gid=100,rw,umask=000,quiet,exec /dev/hdd1 /bigdisk

4) mount -t vfat -o rw,umask=000,quiet,exec /dev/hdd1 /bigdisk

```

1) user vs users

2) 0/0 for root user/group

3) 1000,100 for ~my~ user/group

4) why not?

Still NO.

----------

## teilo

 *jfb3 wrote:*   

> 
> 
> I end up with:
> 
> ```
> ...

 

Ok, we're missing something here. The last line there says that /dev/hdd1 is mounted on /bigdisk. That's precicely what I would expect from your mount command.

What, exactly, is not working? You say it doesn't work, but you didn't post an error message or describe the problem you are experiencing.

----------

## jfb3

Actually I did, it was just buried at the end of my first post, sorry.  

I can't delete or move anything on the drive.  

The error message I get is "Read-only file system".

----------

## teilo

 *jfb3 wrote:*   

> Actually I did, it was just buried at the end of my first post, sorry.  
> 
> I can't delete or move anything on the drive.  
> 
> The error message I get is "Read-only file system".

 

My bad. Sorry!   :Embarassed: 

I have seen this error on occasion with ext3, when the kernel detects a drive error. Suddenly it blocks all writes and gives that exact message. Note that this is not a rights issue, since it is the file system itself that is read only.

If you haven't already, I would emerge dosfstools and run fsck.vfat on that partition to see if anything comes up.

----------

## nephlim

Sorry guys,

for me and many other collegues the "users" hadn't worked so I was assuming that it won't work ever. So that was my fault sorry...

jfb3, did you tried to mount the partition in rw mode on another system, e.g. Knoppix? It would help I think to know if it's related to your kernel/system especially.

Greetings

----------

## jfb3

Okay, here's the deal.

I ran fsck.vfat on the drive and it complained about a very large file (about 4 gig) with a name that wasn't OK. ("?\.000\.0000" or some such.) I tried to rename it in the tool.  [No, I didn't miss the space, it's a 200 GB drive with lots of stuff on it.]

The file previously didn't show up with 'ls' or any gui app.

Then, although I still couldn't delete the file...

I booted with a Slax 4.01 cd and ~was~ able to delete that file. (Wierd, huh. Go Slax!) (Although it still had a strange name, and definately ~not~ the name I attempted to give it. Something like "@_".)

Then I booted up normal, mounted the drive with the command I always used and all seems okay.

I'll blame the problem on windows.  I use that drive in both Linux and in Windows as storage for photos I take and code I write.

Thanks for the help.

----------

