Problems mounting a fat32 partition in gentoo -solved

cjr22

Member
Mar 21, 2003
65
0
0
I'm having problems mounting a vfat partition using my gentoo installation. On /dev/hdb1 I have a fat32 partition which is working fine under windows. However, when I try to do a mount -t vfat /dev/hdb1 /mnt/win I get a "wrong fs type, bad option, bad superblock on /dev/hdb1, or too many mounted file systems" error from mount. I've checked that I've got vfat support in my kernel (I have, although I'm not sure what the default codepage and other options there should be) and when I cat /proc/filesystems vfat is there. I've got ntfs partitions on the same disk that mount without problems.

The next thing I tried was booting off a knoppix CD, and, amazingly, I discovered that this worked, and that I could mount the windows partition with no problems. So the partition must be ok, and there's something wrong with my gentoo setup. Any ideas how to go about debugging this, or getting more info on it?

Cheers,
Chris
 

Hyperblaze

Lifer
May 31, 2001
10,027
1
81
have you tried to mount it without the -t vfat?

i've mounted "mount /dev/hdb1 /mnt/win" for a while now....

rarely use -t anymore
 

djdrastic

Senior member
Dec 4, 2002
441
0
0
can you please supply us a copy of

*dmesg | grep hd
*Can you fdisk to that partition and print the partition tables ?
*What happens if you try the autofs feature ?
*As which user are you trying to mount the partition ?

 

cjr22

Member
Mar 21, 2003
65
0
0
I'm at work at the moment, so I'll try dmesg and autofs when I get home. I already tried fdisk, it reports the partition correctly as win95 fat32 (LBA) - or something like that - and I've tried to mount as both root and a normal user with the same results. I'll let you know more when I get home. I think it must be something to do with the kernel configuration or the version of mount, because I can mount it fine when I boot off the knoppix cd.
 

cjr22

Member
Mar 21, 2003
65
0
0
Fixed it! I'd got the codepages wrong. In the kernel config, under the Native Language Support I'd only compiled the european codepage, but in the vfat section I had the american one as the default. Adding the option codepage=850 when mounting meant that it worked perfectly. I'm now recompiling the kernel with a less stupid config ;-)
 

djdrastic

Senior member
Dec 4, 2002
441
0
0
Thanks for the information ! Hopefully this will info will help someone else , struggling with a similiar problem