Using FAT32 with Linux
jsparkes asks:
"I haven't been able to find definitive information on
mounting FAT32 filesystems in linux. It seems like it was
implemented by Gordon Chaffee, who has
this Fat32 homepage. It seems that it was added in
2.0.34 and should also be in 2.2.X. Does it work? Is just
like an ext2 fs, or are there limitations? I'd like to
dual boot linux and win98, but if I can't use my large
FAT32 partitions, it would be pointless. (I have a 10G
win98 drive, and will use a 1.2G for linux..)"
It seems to work great on FAT32 partitions on my 10GB drive. No special tools/patches required on kernels >2.0.34. Just do a "mount -t vfat /dev/hd?? /mnt/??" and the filesystem will be mounted just like any other one. Of course permissions will be somewhat screwed up, but that's because the FAT32 filesystem doesn't store that information.
Just do a 'man mount' /etc/fstab
and patch up your
And you can set permissions to a certain extent,
i.e. the umask and the owner and group of the entire filesystem.....
When you build your kernel, be sure to include FAT and VFAT (Win95) from the Filesystem options.
If you build as modules, you may have to
"insmod vfat".
I'm using it right now, and it's fine...
I Think he means vfat works w/ fat12 and fat16
but not neccessarily w/ fat32 (under NT)
A disk is formatted using Fat 16, 16 or 32.
You can use msdos fs which inly gives you basic 8+3 filenames, or you can use vfat which gives you longer filenames...
Fat32 is not implemenred in vfat it's implemented *under* it.
The above is not official it's just my petty delusion
You can buy a FAT32 driver for only (!?!) $39/seat from www.ntinternals.com. Talk about something that could have easily been added in a service pack (but no, MS goes and puts in IE4 instead)
I am currently running Debian 2.1 with Kernel 2.2.5.
I am dual booting with 98 (only for some games, of course).
Linux reads my FAT32 partition with Win98 fine.
It uses the vfat fs to read it.
I had the same problems you have now, I tried to get FAT32 under 2.0.xxx but it didn't work. Here's what I did to get it working:
Compile and use kernel 2.2.xx Here's the tricky part: try and keep your kernel config as minimal as can be, regarding harddrives and filesystems. There's stuff about VFAT in the config utility. I can't remember if I turned it on or off, but if you try it set to on and it don't work, try it off...
The other thing is that when I set up the system with RedHat 5.2, I used Disk Druid to set up the directory structure for the FAT32 partitions. Of course, you can do this manually, I just forget how... I know that RedHat's configuration utility in X can map paths to partitions as well.
Finally, this will end up as having only root as having write access to the mounted partitions. So, login as root and give other users wrote and read access as needed.
This *should* give you a working FAT32 read/write set up under kernel 2.2 For some reason, I couldn't get it to work under 2.0.xx, but it wasn't really necessary, so I didn't mind.
You should never take life too seriously - You'll never get out of it alive.
It should work just like FAT16; simply mount the partition as vfat, and all should be well. I've done this with both 2.0.36 and 2.2.x.
\\'
Does it exist? It would be nice to have the ability to check my vfat partition for errors (while running Linux).
Posted by hurstdawg:
I run RedHat 5.2 and win98 on separate hard drives over here and so far linux has had no trouble reading the windoze drive. All I did was set it to mount with everytime linux boots and it works great. sees all the files and has no trouble manipulating them.
Posted by Ronin_Kitsune:
There is also a utility that lets you see your Linux partition from Windows9* - a useful thing.
It's at: http://www.yipton.demon.co.uk/
FAT32 supported was added a long time ago to fips and the kernel. The vfat driver transparently accesses fat32 filesystems as well as vfat filesystems. Just make sure MSDOS and VFAT are enabled during the kernel compile.
Can you scandisk under wine? Oe perhaps dosemu running the Win95 command int?
-- I'm the root of all that's evil, but you can call me cookie..
Neither did I. Perhaps he's using a 2000 beta?
-- I'm the root of all that's evil, but you can call me cookie..
Err, I don't think you know exactly what we mean by Fat32.. NT 4.0 doesn't support Fat32, only Fat16 and NTFS..
-- I'm the root of all that's evil, but you can call me cookie..
I hope you mean modprobe. Get into the 90's.
You can definitely mount your fat32 drives r/w under kernel >2.0.34 and with 2.2.*. Make sure you mount as type vfat instead of msdos so you may keep your windows long filenames, or you may get some Progra~1 junk for filenames.
If you want to boot a linux system off a fat32 partition, I would recommend using UMSDOS, which is a simulated Linux filesystem that can live on fat partitions. It uses extra files and funny file names in the directory for UNIX file permissions, but it feels slower than a native ext2 filesystem so you may not want to use it for performance reasons. One of the few distributions that supports UMSDOS is Slackware with their Zipslack. I just tried it out a couple weeks ago on a machine at home, and it is ok, but it's nowhere near the speed of my native ext2 system at school.
Uh-uh.
NT can't boot fram a FAT32 partition, but you can
keep C: as FAT16 and put your 95B/98 \WINDOWS dir
on a FAT32 D or higher.
The stuff about IE4 is complete rubbish. W95 OSR2
is needed for FAT32 - it is nothing whatsoever to
do with IE4. If you don't know for sure, don't go
ahead and say it anyway. Check!
Liam P. ~ "Intelligence is a lethal mutation." (me)
I've had no problems with FAT32 under 2.0.36 and 2.2.x. (mounting as type vfat). It is straight forward, as the other posts have said.
J Williamson
I have a linux box and a win98box networked together. I play mp3s on the windows box from a fat32 partition on the linux box's disk(partition shared over samba) I've never had any problems reading stuff at mp3 rates(I do have a relatively large audio buffer set in x11amp which probably helps.)
Where I do have problems with using fat32 from linux is when I attempt to ls a directory with on the order of 1024 files. ls -l or ls -color take forever and a half because apparently ls is looking for inode info on each file and evidently isn't happy about it not being there. Also accessing those dirs over the samba share is horrendously slow as well. \ls (to get rid of my aliases) works fine. I don't know why the stat() calls aren't just returning whatever the inode values are for the whole filesystem. Guess I should read more of the source to see what is going on.
--
I didn't think NT supported FAT32, only FAT16. Have I missed something?
I have a NT 4.0 drive that is vfat. so when I read this I decided to test it.
I umount my NT partition as I had been mounting it as msdos. (umount /ntfat)
then I mounted it.
it worked, with long filenames and everything looks pretty cool.. oh my NT partition is vfat32 not NTFS. when I originally installed NT I wanted to be able to use msdos atleast.
both msdos and vfat will work, but vfat shows the long filenames.
I have now just changed my fstab to mount the drive as vfat from now on...
Only 'flamers' flame!
http://www.winternals.com/
"Significant understanding of the NTFS file system layout was derived by studying the Linux-based NTFS driver code maintained by Martin von Loewis. We acknowledge his indirect contribution to this endeavor."
It's nice to know someone is cashing in on Linux.
1) NT can't boot off a fat32 partition, this means that win98/95 cant be fat32, and the nt partition cant be fat32.
2) Pre-OSR2 Win95 can be "upgraded" to fat32 by installing ie4, when you install it, it asks you for "Large Drive Support?" and it automagically converts the fat16->fat32 and boom it reads fat32.
Tom Holroyd informed me that there were bugs in the FAT32 code that could be tickled by high load. One person countered that he had no problems with FAT32 under load.
In the mean time, I can still run cdda2wav on a different machine with a slower SCSI drive and write to the troublesome FAT32 partition over NFS.
> All software is broken.
I've had no problems reading and writing FAT32 partitions since 2.0.36, and I'm now running 2.2.3. However, one headache seems to be permissions - I seem to have read/write permissions on these drives only as root, and adding my other users to the "disk" group doesn't solve the problem. Awaiting a solution to this one.
"The weather is here, wish you were beautiful."
I use about 650MB of MP3 files on one of my FAT32 partitions, both under Linux (X11amp) and Windoze (Winamp). No problems with the MP3's, even with several apps running (though Windoze tends to crash more often under these conditions, unrelated to Winamp). I'm on an AMD K6-2/400 with 128MB RAM. For what it's worth.
"The weather is here, wish you were beautiful."
I guess this just boils down to a documentation
issue. It does clearly say anywhere that FAT32
is supported.
I found out by installing linux and trying it, but
it would have been nice to know in advance.
You'll be just fine. You are correct in that support is available in kernel 2.0.34+ and 2.1.60+ and hence 2.2. I personally mount a couple of >4GB fat32 partitions from my 13GB EIDE drive under Linux (2.2.5) which is running on a 3GB SCSI disk.
Long filenames work, but you will still be at the mercy of the usual VFAT semantics, so all files are owned by one user (cf mount -o uid=XXX), long filenames are supported, but are case-insensitive, etc.
It appears that there are number of versions of fdisk out there that don't grok the FAT32X partition type. This is the >2GB partition size support for which M$ went and created yet another partition type. Don't worry about it, you can still mount these partitions just fine.
Tim
NT 4 doesn't support FAT32, however in typical Microsoft fashion, it has its own, unnamed, way of having FAT partitions larger than 2 Gig, which existed before FAT32. You can see this doing an NT install. Install NT on a partition > 2Gb as NTFS, after NT reboots from setup it will convert the drive from > 2Gb FAT to NTFS. Or you can leave the drive as FAT. AFAIK DOS/Win9x can't read this large FAT partition because it isn't really FAT32.
the extended FAT16 format (i.e. > 2GB) has been supported since M$DOS 5 or 6. hence, it is also supported in windows 95 (since it is really just a graphical shell over MSDOS 7.0)
windows 95 cannot read FAT32 before OSR2 (OEM Service Release 2). i think that there was also some service pack for older win95's that allowed them to do so as well. win 98 reads FAT32 out of the box, of course. "Win2K Enterprise Edition" (back when it was called NT 5) was supposed to be the first NT derived kernel that would support FAT32 natively (without third-party utilities).
{ sorry to babble so much about M$ crap, but i figure that anyone who's reading three levels deep into a thread on Linux and FAT32 might be interested. }
md
Well, the easy way is to add a umask command in fstab. This seems to work
fairly well for me. I changed the mounting gid to something that
contained my user id. Then I added a umask=007 to the fstab entry (where
defaults would normally appear). This makes everything rwxrwxr-x. That
should work.
On a side note, has anyone using vfat in linux had performance problems? I tried running mp3s off of a vfat partition and had serious problems with performance when my drive went under hard load. The problem went away once I moved them over to an ext2 partition. Same physical drive. My guess was that the caching on the vfat partition is not well implimented. Streaming off the vfat partition was done in many short reads, whereas the streaming off an ext2 partition was done in much fewer, but slightly longer reads. Has anyone else had performace issues with a vfat partition?