FAT filesystem and Linux: Difference between revisions

Content deleted Content added
Bluelinking 1 books for verifiability.) #IABot (v2.1alpha3
No edit summary
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 <code>[[mount (Unix)|mount]]</code> 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-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>
 
== Differences, advantages,History and disadvantagessupport ==
Most of the major Linux distributions, including RedHat, SuSE, and Debian, do not employ ''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&ndash;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.is/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>
 
Line 30 ⟶ 38:
;<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"/>
 
== {{anchor|--LINUX-.---}}Data structures of umsdos ==
 
=== {{anchor|--LINUX-.---}}{{anchor|Data structures of umsdos}} Data structure ===
The ''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"/>
 
Line 37 ⟶ 47:
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 ''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, ''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 linld is used to then bootstrap Linux from DOS.<ref name="McCune"/>
 
Line 43 ⟶ 53:
 
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"/>
 
== Development history and kernel/distribution support ==
Most of the major Linux distributions, including RedHat, SuSE, and Debian, do not employ ''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&ndash;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.is/20120707065033/http://articles.techrepublic.com.com/5100-10878_11-1044390.html The Linux/Windows combo: Use these resources to make it work]</ref>
 
== Accessing FAT formatted volumes without kernel support ==