Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
FAT filesystem and Linux
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Widely used Linux filesystem format}} [[Linux]] has several [[filesystem]] drivers for the [[File Allocation Table]] (FAT) filesystem format. These are commonly known by the names used in the <code>[[mount (Unix)|mount]]</code> command to invoke particular drivers in the kernel: ''{{Not a typo|msdos}}'', ''{{Not a typo|vfat}}'', and ''{{Not a typo|umsdos}}''.<ref name="StanfieldSmith">{{cite book |title=Linux system administration |series=Craig Hunt Linux library |author-first1=Vicki |author-last1=Stanfield |author-first2=Roderick W. |author-last2=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-first=Brian |author-last=Ward |publisher=[[No Starch Press]] |year=2004 |isbn=978-1-59327-035-3 |pages=41}}</ref> == History and support == Most of the major Linux distributions, including RedHat, SuSE, and Debian, do not employ ''{{Not a typo|umsdos}}'' to permit installation of Linux on a FAT disc volume. A few distributions do, however.<ref name="Smith2">{{cite book |title=The multi-boot configuration handbook |series=Handbook Series |author-first=Roderick W. |author-last=Smith |publisher=[[Que Publishing]] |year=2000 |isbn=978-0-7897-2283-6 |pages=[https://archive.org/details/isbn_9780789722836/page/256 256,341–342] |url=https://archive.org/details/isbn_9780789722836/page/256 }}</ref> These include distributions such as Phat Linux, which installs in <code>C:\PHAT</code> on DOS by unpacking a [[ZIP file]] and is booted by running a [[COMMAND.COM]] script named <code>LINUX.BAT</code>,<ref name="McCune"/> and [[ZipSlack]]{{Citation needed|date=September 2009}}. The UMSDOS project was started in 1992 by Jacques Gelinas and made available to the net in January 1994 as a patch. It was included in the standard distribution starting with kernel 1.1.36.{{Citation needed|date=September 2009}} UMSDOS was removed from the Linux 2.6.11 kernel for lack of maintenance.<ref>{{Cite web |title=Summary of changes from v2.6.10 to v2.6.11 |url=https://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.11|website=www.kernel.org |access-date=2017-11-15}}</ref> UVFAT, an extension of UMSDOS to use the Windows data structures for long filenames instead of its own, was discontinued before release.<ref>{{Cite web |title=UMSDOS filesystem: UVFAT support |url=http://linux.voyager.hr/umsdos/#uvfat |website=linux.voyager.hr |access-date=2015-07-16}}</ref> They should work in 2.4.x kernels.{{Citation needed|date=September 2009}} Earlier Linux distributions which used UMSDOS are [[MuLinux]],<ref>[http://mulinux.narod.ru/en_index.html MuLinux Project]</ref> Monkey Linux<ref>[http://projectdevolve.tripod.com/text/descript.htm Monkey Linux Explained]</ref> and Winlinux 2000.<ref>[https://archive.today/20120707065033/http://articles.techrepublic.com.com/5100-10878_11-1044390.html The Linux/Windows combo: Use these resources to make it work]</ref> == Feature comparison == {{anchor|Differences, advantages, and disadvantages}} All of the Linux filesystem drivers support all three FAT types, namely [[FAT12]], [[FAT16]] and [[FAT32]]. Where they differ is in the provision of support for [[long filename]]s, beyond the [[8.3 filename]] structure of the original FAT filesystem format, and in the provision of Unix file semantics that do not exist as standard in the FAT filesystem format such as [[file permissions]].<ref name="StanfieldSmith"/> The filesystem drivers are mutually exclusive. Only one can be used to mount any given disk volume at any given time. Thus the choice among them is determined by what long filenames and Unix semantics they support and what use one wants to make of the disk volume.<ref name="Smith1">{{cite book |title=Linux in a Windows world |author=Roderick W. Smith |publisher=[[O'Reilly Media, Inc.]] |year=2005 |isbn=0-596-00758-2 |pages=449}}</ref> === {{Not a typo|msdos}} === The ''{{Not a typo|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 ''{{Not a typo|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 ''{{Not a typo|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-first=Christopher |author-last=Negus |publisher=[[John Wiley and Sons]] |year=2007 |isbn=978-0-470-08279-9 |pages=[https://archive.org/details/linuxbiblebootup0000negu/page/159 159] |url=https://archive.org/details/linuxbiblebootup0000negu/page/159 }}</ref> === {{Not a typo|umsdos}} === The key advantage to ''{{Not a typo|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-first1=Stefan |author-last1=Strobel |author-first2=Volker |author-last2=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-first=Mike |author-last=McCune |publisher=[[Prentice Hall PTR]] |year=2001 |isbn=978-0-13-030670-8 |pages=[https://archive.org/details/integratinglinux0000mccu/page/7 7–9] |url=https://archive.org/details/integratinglinux0000mccu/page/7 }}</ref> === {{Not a typo|vfat}} === ''{{Not a typo|vfat}}'', although lacking full Unix file semantics and lacking the ability to have Linux installed on and running from a FAT disk volume, does not have the aforementioned disadvantages of ''{{Not a typo|umsdos}}'' when it comes to simply sharing data on a FAT disk volume between Linux and other operating systems such as Windows. Its data structures are the same as those used by Windows for VFAT long filenames, and it does not require running a synchronization utility in order to prevent Windows and Linux data structures from becoming disjointed. For this reason, it is the most appropriate of Linux's FAT filesystem drivers to use in the majority of situations.<ref name="StanfieldSmith"/><ref name="Smith1"/><ref name="McCune"/> {| class="wikitable sortable" |- ! FS-Driver !! Long filenames !! Unix file semantics !! Comment |- | {{Not a typo|msdos}}|| {{no}} || {{no}} || 8.3 filenames only |- | {{Not a typo|vfat}}|| {{yes}} || {{no}} || Uses same data structures that Windows uses |- | {{Not a typo|umsdos}}|| {{yes}} || {{yes}} || Can host Linux; may need maintenance when switching OS |} == Commonalities == As mentioned previously, all of the Linux filesystem drivers support all of the three File Allocation Table sizes, 12-bit, 16-bit, and 32-bit. Other common features that they all support are various Linux mounting options (specified with the <code>-o</code> option to the <code>[[mount (Unix)|mount]]</code> command):<ref name="Smith1"/><ref name="Smith2"/> ;<code>uid</code> and <code>gid</code>:These two options tell the filesystem driver to set the (default, in the case of ''{{Not a typo|umsdos}}'') owner user ID and group ID to be a single, specified, value for all files in the volume. Both IDs are specified as numeric values (as to be found in the <code>[[/etc/passwd]]</code> file). So, for example, to specify to the ''{{Not a typo|vfat}}'' filesystem driver that all files and directories are to have owner ID 745 and group ID 15, the <code>mount</code> command would be invoked as {{nowrap|1=<code>mount -t vfat -o uid=745,gid=15</code>.<ref name="Smith1"/><ref name="Smith2"/>}} Linux filesystem drivers do not at present incorporate support for [[FAT file password|file/directory password]]s on FAT12/FAT16/FAT32 volumes and multi-user [[FAT file access rights|world/group/owner access permissions for read/write/delete/execute rights]] on FAT12/FAT16 volumes as implemented in various operating systems of the Digital Research family, including [[DR-DOS]], [[PalmDOS]], [[Novell DOS]], [[OpenDOS]], [[FlexOS]], [[Concurrent DOS]], [[Multiuser DOS]], System Manager and [[REAL/32]].<!-- not sure if REAL/32 supports owner-IDs on FAT32. If it does it would require certain tweaks as the owner-ID entry is used for the high-word of the cluster number on FAT32 volumes now --> ;<code>umask</code>:This option sets the [[umask]] to apply globally to all files in the volume. For example, to specify to the ''{{Not a typo|vfat}}'' filesystem driver that no "group" or "other" access is to be allowed, the <code>mount</code> command would be invoked as {{nowrap|1=<code >mount -t vfat -o umask=077</code>.<ref name="Smith1"/><ref name="Smith2"/>}} ;<code>conv</code>:This option specifies ''file content conversion'' semantics. It is possible for the filesystem drivers to convert the newline conventions in files, between LF termination and CRLF termination, on the fly as files are read and written. By default this conversion is entirely disabled. The filesystem drivers can perform conversion for some files, attempting to auto-detect what files to convert based upon the extension portion of the filename, or globally for all files. These three conversion levels are specified as <code>conv=b</code> (for "binary"), <code>conv=a</code> (for "auto-detect"), and <code>conv=t</code> (for "text"), respectively. The latter two options carry an inherent risk of corrupting non-text file data. No conversion at all is the default.<ref name="Smith1"/><ref name="Smith2"/> == {{Not a typo|umsdos}} == === {{anchor|--LINUX-.---}}{{anchor|Data structures of umsdos}} Data structure === The ''{{Not a typo|umsdos}}'' FAT filesystem driver stores all of the extra information relating to Unix file semantics in what, to another FAT filesystem driver, appears to be just a normal file in each directory and subdirectory, named <code>--LINUX-.---</code>.<ref name="StanfieldSmith"/><ref name="Smith1"/><ref name="McCune"/><ref name="Smith2"/><ref name="Danesh"/> In the absence of this file in any given directory, and thus by default, the ''{{Not a typo|umsdos}}'' filesystem driver provides the same semantics as the ''{{Not a typo|msdos}}'' filesystem driver does for the directory: only 8.3 filenames and no extra Unix file semantics. To enable the ''{{Not a typo|umsdos}}'' driver's extra abilities, it is necessary to create that file in the directory and synchronize its internal data with the normal FAT data for any existing entries already in the directory. This is done with a tool called <code>umssync</code>.<ref name="StanfieldSmith"/><ref name="Smith1"/><ref name="McCune"/> This is the utility program that is run, across every directory on the disc volume, every time that one switches from running Windows to running Linux, in order for the ''{{Not a typo|umsdos}}'' filesystem driver to incorporate any changes made to files and directories by Windows into its private data structures in its <code>--LINUX-.---</code> file. By default, the <code>umssync</code> tool creates <code>--LINUX-.---</code> files in directories if they do not already exist, resulting in such a file in every directory in the disc volume. When switching between Windows and Linux this behaviour is not often considered desirable. Therefore, the normal mode of operation when invoking <code>umssync</code> after switching from Windows to Linux (which is usually done by running the tool at Linux boot time from a startup script) is to employ the <code>-c</code> option to the command, which prevents the creation of any new <code>--LINUX-.---</code> files in directories that do not already possess them.<ref name="StanfieldSmith"/><ref name="Smith1"/><ref name="McCune"/> === Installing Linux on FAT {{anchor| on and booting it from FAT volumes using umsdos}} === As mentioned, ''{{Not a typo|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]] or {{Not a typo|linld}} 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 root directory of the DOS [[system partition and boot partition|boot volume]], e.g. <code>C:\LINUX</code> . The various Linux top-level directories are thus, to DOS, directories such as <code>C:\LINUX\ETC</code> (for <code>/etc</code>), <code>C:\LINUX\BIN</code> (for <code>/bin</code>), <code>C:\LINUX\LIB</code> (for <code>/lib</code>), and so forth. The ''{{Not a typo|umsdos}}'' filesystem driver automatically prepends the <code>C:\LINUX\</code> to all pathnames. The location of the Linux root directory is supplied to the ''{{Not a typo|umsdos}}'' filesystem driver in the first place via an option to the <code>loadlin</code> command. So, for example, <code>loadlin</code> would be invoked with a command line such as <code>loadlin c:\linux\boot\vmlinuz rw root=c:\linux</code> .<ref name="McCune"/><ref name="Danesh">{{cite book |title=Making Linux work: essential tips & techniques |series=1001 Tips Series |author-first=Arman |author-last=Danesh |publisher=Cengage Learning |year=2002 |isbn=978-1-884133-78-7 |pages=[https://archive.org/details/makinglinuxworke00dane/page/19 19] |url=https://archive.org/details/makinglinuxworke00dane/page/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 ''{{Not a typo|umsdos}}'' filesystem driver per se.<ref name="McCune"/> == Accessing FAT formatted volumes without kernel support == {{further|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 ''{{Not a typo|vfat}}'' FAT filesystem driver, {{Not a typo|mountlo}} 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-first=Raj |author-last=Rajagopal |publisher=[[CRC Press]] |year=2000 |pages=[https://archive.org/details/multioperatingsy0000unse/page/25 25–21] |isbn=978-0-8493-9831-5 |url=https://archive.org/details/multioperatingsy0000unse/page/25 }}</ref><ref name="Welsh">{{cite book |title=Running Linux |series=Essential Guide to Linux |author-first=Matt |author-last=Welsh |edition=4th |publisher=[[O'Reilly Media, Inc.]] |year=2003 |isbn=978-0-596-00272-5 |pages=405}}</ref> Alternately, one of the [[FUSE (Linux)|FUSE]] filesystem drivers may be used—FatFuse, FuseFat or {{Proper name|mountlo}}.<ref>{{cite web |url=http://sourceforge.net/p/fuse/wiki/NonNativeFileSystems/ |title=FUSE: NonNativeFileSystems |url-status=dead |archive-url=https://web.archive.org/web/20150915191135/http://sourceforge.net/p/fuse/wiki/NonNativeFileSystems/ |archive-date=2015-09-15 }}</ref> == POSIX overlay filesystem == A modern equivalent of UMSDOS is POSIX Overlay Filesystem ({{Not a typo|posixovl}}). It works in FUSE.<ref>{{Cite web|url=http://sourceforge.net/projects/posixovl/|title = POSIX Overlay Filesystem}}</ref> ==See also== *[[DMSDOS]] (DoubleSpace/DriveSpace/Stacker compatible compressed FAT volumes for Linux) *[[Design of the FAT file system]] ==References== {{Reflist}} ==Further reading== * {{Cite journal |url=http://tldp.org/HOWTO/UMSDOS-HOWTO.html |title=UMSDOS HOW-TO |author-first=Jacques |author-last=Gelinas |version=1.2 |date=2001-12-01 |publisher=[[Linux Documentation Project]]}} * [http://linux.voyager.hr/umsdos/ UMSDOS developer’s page] * [https://arstechnica.com/open-source/news/2009/07/vfat-linux-patch-could-circumvent-microsofts-patent-claims.ars New Linux patch could circumvent Microsoft's FAT patents] by Ryan Paul {{DEFAULTSORT:Fat Filesystem And Linux}} [[Category:Disk file systems]] [[Category:File systems supported by the Linux kernel]] [[Category:Free special-purpose file systems]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Further
(
edit
)
Template:No
(
edit
)
Template:Not a typo
(
edit
)
Template:Nowrap
(
edit
)
Template:Proper name
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Yes
(
edit
)