FAT filesystem and Linux: Difference between revisions

Content deleted Content added
Commonalities: add user
SporkBot (talk | contribs)
Line 1:
[[Linux]] has several [[filesystem]] drivers for the [[File Allocation Table]] (FAT) filesystem format. These are commonly known by the names used in the <tt>[[mount (Unix)|mount]]</tt> command to invoke particular drivers in the kernel: ''msdos'', ''vfat'', and ''umsdos''.<ref name=StanfieldSmith>{{cite book|title=Linux system administration|series=Craig Hunt Linux library|author=Vicki Stanfield and Roderick W. Smith|edition=2nd|publisher=John Wiley and Sons|year=2002|isbn=978-0-7821-4138-2|pages=166}}</ref><ref name=Ward>{{cite book|title=How Linux works: what every superuser should know|series=No Starch Press Series|author=Brian Ward|publisher= Starch Press|year=2004|isbn=<!--1-59327-035-6|isbn=-->978-1-59327-035-3|pages=41}}</ref>
 
== Differences, advantages, and disadvantages ==
Line 5:
 
=== msdos ===
The ''msdos'' filesystem driver provides no extra Unix file semantics and no long filename support. If a FAT disk filesystem is mounted using this driver, only 8.3 filenames will be visible, no long filenames will be accessible, nor will any long filename data structures of any kind on the disk volume be maintained. The ''vfat'' filesystem driver provides long filename support using the same disk data structures that [[Microsoft Windows]] uses for [[VFAT]] long filename support on FAT format volumes, but it does not support any extra Unix file semantics. The ''umsdos'' filesystem driver provides long filename support, and extra Unix file semantics. However, it does so using on-disk data structures that are not recognized by any filesystem drivers for any operating systems other than Linux.<ref name=StanfieldSmith /><ref name=Ward /><ref name=Smith1 /><ref name=Negus>{{cite book|title=Linux bible: boot up to Ubuntu, Fedora, KNOPPIX, Debian, SUSE, and 11 other distributions|series=Bible Series|author=Christopher Negus|publisher=John Wiley and Sons|year=2007|isbn=<!--0-470-08279-8|isbn=-->978-0-470-08279-9|pages=159}}</ref>
 
=== umsdos ===
The key advantage to ''umsdos'' out of the three is that it provides full Unix file semantics. Therefore it can be used in situations where it is desirable to install Linux on and run it from a FAT disk volume, which require such semantics to be available. However, Linux installed on and running from such a disk volume is slower than Linux installed on and running from a disk volume formatted with, for example, the [[ext2]] filesystem format.<ref name=StanfieldSmith /><ref name=StroberElling>{{cite book|title=Linux, unleashing the workstation in your PC|series=The Complete Linux Kit, Rainer Maurer|author=Stefan Strobel and Volker Elling|edition=3rd|publisher=Springer|year=1997|isbn=978-0-387-94880-5|pages=43}}</ref> Further, unless a utility program is regularly run every time that one switches from running Windows to running Linux, certain changes made to files and directories on the disk by Windows will cause error messages about inaccessible files in Linux.<ref name=McCune>{{cite book|title=Integrating Linux and Windows|series=Open source technology series|author=Mike McCune|publisher=Prentice Hall PTR|year=2001|isbn=<!--0-13-030670-3|isbn=-->978-0-13-030670-8|pages=7&ndash;9}}</ref>
 
=== vfat ===
Line 40:
As mentioned, ''umsdos'' permits installing Linux on, and then bootstrapping and running it from, a FAT format disc volume. The advantage of this is that it permits the use of Linux on a computer where [[DOS]] is already installed, without requiring that the hard disc be [[partition (computing)|repartitioned]]. Linux is not bootstrapped directly from a [[Volume Boot Record]] in such a scenario. Instead DOS is first bootstrapped, and [[loadlin]] is used to then bootstrap Linux from DOS.<ref name=McCune />
 
The convention for such an installation is for the Linux [[root directory]] to be a subdirectory of the actual root directory of the DOS [[system partition and boot partition|boot volume]], e.g. <tt>C:\LINUX</tt> . The various Linux top-level directories are thus, to DOS, directories such as <tt>C:\LINUX\ETC</tt> (for <tt>/etc</tt>), <tt>C:\LINUX\BIN</tt> (for <tt>/bin</tt>), <tt>C:\LINUX\LIB</tt> (for <tt>/lib</tt>), and so forth. The ''umsdos'' filesystem driver automatically prepends the <tt>C:\LINUX\</tt> to all pathnames. The ___location of the Linux root directory is supplied to the ''umsdos'' filesystem driver in the first place via an option to the <tt>loadlin</tt> command. So, for example, for the aforegiven root directory <tt>loadlin</tt> would be invoked with a command line such as <source lang=bash enclose=none>loadlin c:\linux\boot\vmlinuz rw root=c:\linux</source> .<ref name=McCune /><ref name=Danesh>{{cite book|title=Making Linux work: essential tips &amp; techniques|series=1001 Tips Series|author=Arman Danesh|publisher=Cengage Learning|year=2002|isbn=<!--1-884133-78-9|isbn=-->978-1-884133-78-7|pages=19}}</ref>
 
The installation of Linux into such a directory in the first place simply involves unpacking files from an archive into that directory and its subdirectories. Such an installation also generally requires the use of a [[swap file]] rather than a [[swap partition]] for Linux, however this is related to the desire not to repartition the hard disc and unrelated to the ''umsdos'' filesystem driver per se.<ref name=McCune />
Line 53:
== Accessing FAT formatted volumes without kernel support ==
{{further2|[[mtools]]}}
Although the filesystem drivers in the kernel make it possible to access files and directories on FAT formatted volumes in the normal manner, it is also possible to do so without kernel driver support, using the utility programs that form the [[mtools]] utility suite. Like the ''vfat'' FAT filesystem driver, mtools provides long filename support using the same disc data structures that Microsoft Windows uses.<ref name=Smith2 /><ref name=Rajagopal>{{cite book|title=Multi-operating system networking: living with Unix, Netware, and NT|series=Auerbach Best Practices Series|author=Raj Rajagopal|publisher=CRC Press|year=2000|pages=25–21|isbn=<!--0-8493-9831-2|isbn=-->978-0-8493-9831-5}}</ref><ref name=Welsh>{{cite book|title=Running Linux|series=Essential Guide to Linux|author=Matt Welsh|edition=4th|publisher=O'Reilly Media, Inc.|year=2003|isbn=<!--0-596-00272-6|isbn=-->978-0-596-00272-5|pages=405}}</ref>
 
== POSIX Overlay Filesystem ==