# VFAT not working.

## marz

I'm experience trouble with vfat with Kernel  2.6.11-gentoo-r6, 2005.0.

Both,  floopy or pendrive, on mounting rises this message:

-- This is ok !

bash-2.05b# mkfs.vfat /dev/fd0    

mkfs.vfat 2.10 (22 Sep 2003)

-- But I cannot mount

bash-2.05b# mount -t vfat /dev/fd0 /mnt/floppy

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

       or too many mounted file systems

bash-2.05b# 

-- If I try with ext2 or another, it's ok

bash-2.05b# mkfs.ext2 /dev/fd0

mke2fs 1.35 (28-Feb-2004)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

184 inodes, 1440 blocks

72 blocks (5.00%) reserved for the super user

First data block=1

1 block group

8192 blocks per group, 8192 fragments per group

184 inodes per group

Writing inode tables: done                            

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

-- And mounts ok

bash-2.05b# mount -v -t ext2 /dev/fd0 /mnt/floppy

/dev/fd0 on /mnt/floppy type ext2 (rw)

bash-2.05b# 

---- So, it eliminates hardware faulty, modules unloads ( I can create vfat) and lacks of dev or mountpoints

After all: 

- I`ve compiled using both (manually and genkernel) but problem still persist.

- I`ve these modules enabled on

- The problem still the same for any devi (USB, hd, etc..)

- I`ve enabled 

# DOS/FAT/NT Filesystems

CONFIG_FAT_FS=y

CONFIG_VFAT_FS=y

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

- Anyway, if somebody could help, many thanx in advance.

----------

## Rad

Yeh. Sorry to ask, but did you actually compile and boot the kernel after configuration?

----------

## Voltago

And wasn't there something about FAT16/32 not working on volumes smaller than, what was it now... 32MByte?

Try on your floppy

```
mkfs.msdos /dev/fd0
```

instead.

----------

## marz

Sure ! I`ve rebooted many times.

And the most incredible the same is ocurring in my desktop (Dell PIII), with debian distro (the kernel is 2.6. :Cool:  and everything was working fine, before the recent upgrade (Gentoo/Laptop and Debian/Desktop).

I`m realling suspecting of my lack of intelligence, or I missing some point, or something change in new 2.6.

----------

## marz

 *Voltago wrote:*   

> And wasn't there something about FAT16/32 not working on volumes smaller than, what was it now... 32MByte?
> 
> Try on your floppy
> 
> ```
> ...

 

--- ok

bash-2.05b# mkfs.msdos /dev/fd0

mkfs.msdos 2.10 (22 Sep 2003)

--- not ok 

bash-2.05b# mount /dev/fd0 /mnt/floppy

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

       or too many mounted file systems

bash-2.05b# 

Not works !

----------

## Rad

 *marz wrote:*   

> Sure ! I`ve rebooted many times.

 

Just to be ABSOLUTELY sure - okay, you rebooted many times, but did you compile and then copy the kernel image & System.map to /boot. Was /boot mounted, if it's on it's own partition? Did you adapt the lilo or grub configuration to actually point to the new kernel image?

----------

## marz

-- My system

bash-2.05b# uname -a

Linux hazel 2.6.11-gentoo-r6marz #7 Mon May 9 20:15:51 BRT 2005 i686 Intel(R) Pentium(R) III Mobile CPU      1000MHz GenuineIntel GNU/Linux

-- My partitions (Boot not mounted: it's stays off, to avoid damages during use)

bash-2.05b# df -k

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/hda4               144540    108180     36360  75% /

tmpfs                   123476         0    123476   0% /dev/shm

/dev/hazel_vg/tmp_lv   1048540    200072    848468  20% /tmp

/dev/hazel_vg/var_lv   1843136   1570676    272460  86% /var

/dev/hazel_vg/opt_lv   1048540    303996    744544  29% /opt

/dev/hazel_vg/usr_lv   6516532   3338764   3177768  52% /usr

/dev/hazel_vg/home_lv

                        511980    152368    359612  30% /homebash-2.05b

-- Nothing (under) 

# ls /boot

bash-2.05b# 

-- Mounting and ls'ing  bash-2.05b# mount /bootbash-2.05b# ls -l /boot

total 22349

-rw-r--r--  1 root root   41895 Dez 12 02:05 bootsplash.img

lrwxrwxrwx  1 root root      27 Mai  9 20:16 config -> config-2.6.11                                                                           -gentoo-r6marz

-rw-r--r--  1 root root   32474 Mai  2 23:33 config-2.6.11-gentoo-r6

-rw-r--r--  1 root root   30685 Mai  9 20:16 config-2.6.11-gentoo-r6                                                                           marz

-rw-r--r--  1 root root   30499 Mai  9 17:41 config-2.6.11-gentoo-r6                                                                           marz.old

lrwxrwxrwx  1 root root      31 Mai  9 20:16 config.old -> config-2.                                                                           6.11-gentoo-r6marz.old

-rw-r--r--  1 root root 1060576 Mai  9 20:17 fbsplash-livecd-2005.0-                                                                           1024x768

drwxr-xr-x  2 root root     512 Mai 17 14:17 grub

-rw-r--r--  1 root root  482112 Mai  9 15:10 initrd-2.6.11-gentoo-r6

-rw-r--r--  1 root root 7088675 Mai  9 15:05 kernel-2.6.11-gentoo-r6

lrwxrwxrwx  1 root root      31 Mai  9 20:16 System.map -> System.ma                                                                           p-2.6.11-gentoo-r6marz

-rw-r--r--  1 root root  918999 Mai  9 15:05 System.map-2.6.11-gento                                                                           o-r6

-rw-r--r--  1 root root  935455 Mai  9 20:16 System.map-2.6.11-gento                                                                           o-r6marz

-rw-r--r--  1 root root  922906 Mai  9 17:41 System.map-2.6.11-gento                                                                           o-r6marz.old

lrwxrwxrwx  1 root root      35 Mai  9 20:16 System.map.old -> Syste                                                                           m.map-2.6.11-gentoo-r6marz.old

lrwxrwxrwx  1 root root      28 Mai  9 20:16 vmlinuz -> vmlinuz-2.6.                                                                           11-gentoo-r6marz

-rw-r--r--  1 root root 7056095 Mai  2 23:33 vmlinuz-2.6.11-gentoo-r                                                                           6

-rw-r--r--  1 root root 2142803 Mai  9 20:16 vmlinuz-2.6.11-gentoo-r                                                                           6marz

-rw-r--r--  1 root root 2096515 Mai  9 17:41 vmlinuz-2.6.11-gentoo-r                                                                           6marz.old

lrwxrwxrwx  1 root root      23 Mai  5 21:03 vmlinuz.genk -> kernel-                                                                           2.6.11-gentoo-r6

lrwxrwxrwx  1 root root      24 Mai  2 23:33 vmlinuz.ok -> vmlinuz-2                                                                           .6.11-gentoo-r6

lrwxrwxrwx  1 root root      32 Mai  9 20:16 vmlinuz.old -> vmlinuz-                                                                           2.6.11-gentoo-r6marz.old

...

----------

## marz

I'm still in trouble ..

Well, now in home, I"m testing on debian... I mounted the floppy and pendriver, but a problem persist: I cannot format vfat with the traditional mkfs.vfat or mkfs -t vffat. Despite the module is loaded.

That distro tree have no utils to format that. (Debian)

I"m suspecting from something rellataded to patents or else..

These distros (Gentoo and Debian) have some restrictions related to (proprietary standards) and I like it, but if this is the case, what is the tip to have vfat working around ? Unfortunatelly I have to stick to sodid w.

If there is any direction, please inform to me.. By the way I googling for news..

----------

## Gentree

 *Quote:*   

> Despite the module is loaded.

  Do you mean that? I think you will need to have this stuff built-in not as modules.

 :Cool: 

----------

## Rad

Well modules should work, but your kernel image was made/copied on may the 9th? Doesn't that suggest you forgot to copy or compile the kernel after you reconfigured, so it's not being booted? (Or did you wait 11 days to ask this question?)

Please CHECK what I asked before!

BTW I forgot to say that, but mkfs.some_filesystem works without any kernel support for the corresponding filesystem...

----------

## Gentree

 *Rad wrote:*   

> Well modules should work, but your kernel image was made/copied on may the 9th? Doesn't that suggest you forgot to copy or compile the kernel after you reconfigured, so it's not being booted? (Or did you wait 11 days to ask this question?)
> 
> Please CHECK what I asked before!
> 
> 

 

Yes, dont forget that /boot still exists even if you chose not to mount for safety sake. So if you copy the kernel there will be no error, but it will not be copied to the location you indicated to grub. Grub does not rely on mount points but BIOS devices : (hd0,0) etc. Double-check you are mounting the partition before you copy the kernel. 

 *Quote:*   

> 
> 
> BTW I forgot to say that, but mkfs.some_filesystem works without any kernel support for the corresponding filesystem...

  Indeed ! It seems to only require *fstools type pkgs eg xfstools for xfs.

Are you missing  sys-fs/dosfstools by any chance?

Also check for USB mass-storage devices in kernel config.

 :Cool: 

----------

## dsd

check "dmesg" after trying to mount

----------

## frostschutz

(EDIT: Deleted my earlier reply because I made a mistake)

I had the same problem in 2.6.11.8 - at first I thought vfat was seriously broken, because suddenly I couldn't mount my 80GB windows disk (10 fat32 partitions) anymore, and fsck.vfat reported dozens of errors. At the same time I found a thread about broken VFAT on LKML, so I didn't check anymore for configuration errors or the like.

Thanks for the "dmesg" hint. I actually was lacking some required codepage. I now enabled all of them (in native language support), and that fixed the problem. So in my case it was actually a configuration error responsible for the problem.

I still think that this is a flaw of both the kernel configuration mechanism and mount; the kernel configuration could take care of these dependencies (like it does for many other options), and mount could provide a less stupid error message. wrong fs type bad superblock my ass.  :Rolling Eyes: 

----------

## dsd

the kernel defaults *work*. theres many ways you can break your system by playing around with the defaults.

i guess you are one of the people who copies their .config from a previous kernel when compiling a new one. this is dangerous when you are upgrading from one release to another (e.g. 2.6.9 to 2.6.10) because too much changes between each version. if you had started from a fresh .config when appropriate, you *probably* wouldnt have run into this problem.

----------

## frostschutz

I'm not talking about defaults. And yes, I'm copying old .configs and use make oldconfig to update them. That's what it's there for, isn't it? I was talking about dependencies, like 'make menuconfig' automatically enables other stuff when you select something, or doesn't let you select something that requires something else...

----------

## dsd

oldconfig is *not* recommended for general use, unless you really know what you are doing. its only useful for revision releases, e.g. upgrading from gentoo's 2.6.11-r8 to 2.6.11-r9

----------

## marz

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

Thanx, thanx and ... many thanx. 

The problem is over, at least in Debian (in Gentoo I'll suspect to be the same. and I ll solve monday. my laptop is in office, and I cannot acces it from here, my port 22 is close ... I forgot to keep it open on friday, heheh)

Like Gentree suggest, it was LACKING dostools (sorry for my disattention!).

I've installed it on my debianbox and it solved the problem. (it was lacking there to)

Well, something caused this confusion, and I will enum that for future reference:

- I stayed out of my gentoobox (work priorities) since november. At that time, it was running an installation made on april/2004, with a Gentoo 2004.0, and sucessfully upgraded to 2004.3, and this month I take it back and tryied to upgrade it to 2005.0 and it was successfull either. So I started to eliminate bloated files using filescruft... (good script, but be careful) welll my first outage was: I lost my gcc 3.3.5 !!! After read, read read, tips, how-to (it was so handy and useful) I finally, recover everytthing... 

- No backups untill now, (dumb and cool live in the edges spirit), I do not reccomend this approach (don't be stupid like me, make backups... At least it will avoid unnecessary, stress during upgrades !)

- The good guy here is Netcat, I found a nice hint in the how-to backups on Getntoo Wiki

- Less priority tasks like use w$ stuff, will apper at the end.. Try use that gizmos between tasks, to assure everything is working fine!

- If some necessary ebuild or packet vanish (use eix or emerge -S), reinstall it asap!

- And don't use emerge -U  - it drove my system unstable last year, and I could not find out why... Unfortunattelly I've read that tip where it was recommended, too late !

- But afterall, in this battlefield, my system is running ! And I'm proud of that was the first installation that I made, and I didn't need to reinstall from scratch agian.. .just recovered following priceless How-tos, Tips and this amazing forum and Gentoo Wiki!. Be warned, it hurts but pays at the end !

Thanx again !

----------

## marz

Today (tuesday) I've restart to work on this problem in my gentoobox... I`m not so happy because it could not be fixed so easily there like in my debian box!

Following dmesg like dsd told before, I've found an interesting message:

Unable to load NLS charset cp437

FAT: codepage cp437 not found

Hands back on kernel compiling... I will get an "fresh" (seems make mrproper, make clean can handle it) and inform any evolutions... 

Any advises will be welcome...

TIA

----------

## frostschutz

 *marz wrote:*   

> Unable to load NLS charset cp437
> 
> FAT: codepage cp437 not found

 

Yeah, I had that too. See my reply above. Just enable these codepages...

----------

