HOME

TheInfoList



OR:

Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
has several
filesystem In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
drivers for the
File Allocation Table File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
(FAT) filesystem format. These are commonly known by the names used in the
mount Mount is often used as part of the name of specific mountains, e.g. Mount Everest. Mount or Mounts may also refer to: Places * Mount, Cornwall, a village in Warleggan parish, England * Mount, Perranzabuloe, a hamlet in Perranzabuloe parish, C ...
command to invoke particular drivers in the kernel: ', ', and '.


History and support

Most of the major Linux distributions, including RedHat, SuSE, and Debian, do not employ ' to permit installation of Linux on a FAT disc volume. A few distributions do, however. These include distributions such as Phat Linux, which installs in C:\PHAT on DOS by unpacking a
ZIP file ZIP is an archive file format that supports lossless data compression. A ZIP file may contain one or more files or directories that may have been compressed. The ZIP file format permits a number of compression algorithms, though DEFLATE is th ...
and is booted by running a
COMMAND.COM COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
script named LINUX.BAT, and
ZipSlack ZipSlack was a specially compiled release of the Slackware Linux distribution which was designed to be lightweight and portable. It was distributed in a ZIP archive along with the Slackware release. Installing ZipSlack only required obtaining the ...
. 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. UMSDOS was removed from the Linux 2.6.11 kernel for lack of maintenance. UVFAT, an extension of UMSDOS to use the Windows data structures for long filenames instead of its own, was discontinued before release. They should work in 2.4.x kernels. Earlier Linux distributions which used UMSDOS are
MuLinux muLinux is an Italy, Italian, English language, English-language lightweight Linux distribution maintained by mathematics and physics professor Michele Andreoli, meant to allow very old and obsolete computers (80386, 80486 and Pentium Pro hardware ...
, Monkey Linux and Winlinux 2000.


Feature comparison

All of the Linux filesystem drivers support all three FAT types, namely
FAT12 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
,
FAT16 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on Hard disk drive, hard disks and other devices. It is often supported for compatibi ...
and
FAT32 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by c ...
. Where they differ is in the provision of support for
long filename Long filename (LFN) support is Microsoft's backward-compatible extension of the 8.3 filename (short filename) naming scheme used in DOS. Long filenames can be more descriptive, including longer filename extensions such as .jpeg, .tiff, .html, a ...
s, beyond the
8.3 filename An 8.3 filename (also called a short filename or SFN) is a filename convention used by old versions of DOS and versions of Microsoft Windows prior to Windows 95 and Windows NT 3.5. It is also used in modern Microsoft operating systems as an alterna ...
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 Most file systems include attributes of files and directories that control the ability of users to read, change, navigate, and Execution (computing), execute the contents of the file system. In some cases, menu options or functions may be made visi ...
. 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.


The ' 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 ' filesystem driver provides long filename support using the same disk data structures that
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
uses for
VFAT File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by c ...
long filename support on FAT format volumes, but it does not support any extra Unix file semantics. The ' 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.


The key advantage to ' 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 The ext2 or second extended file system is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same pr ...
filesystem format. 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.


', 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 ' 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.


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 -o option to the mount command): ;uid and gid:These two options tell the filesystem driver to set the (default, in the case of ') 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 /etc/passwd file). So, for example, to specify to the ' filesystem driver that all files and directories are to have owner ID 745 and group ID 15, the mount command would be invoked as mount -t vfat -o uid=745,gid=15. Linux filesystem drivers do not at present incorporate support for file/directory passwords on FAT12/FAT16/FAT32 volumes and multi-user 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 DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
,
PalmDOS DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
,
Novell DOS DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
,
OpenDOS DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
,
FlexOS FlexOS is a discontinued modular real-time multiuser computer multitasking, multitasking operating system (RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible ...
,
Concurrent DOS Multiuser DOS is a Real-time operating system, real-time multi-user multi-tasking operating system for IBM Personal Computer, IBM PC-compatible microcomputers. An evolution of the older Concurrent CP/M-86, Concurrent DOS and Concurrent DOS 386 ...
,
Multiuser DOS Multiuser DOS is a real-time multi-user multi-tasking operating system for IBM PC-compatible microcomputers. An evolution of the older Concurrent CP/M-86, Concurrent DOS and Concurrent DOS 386 operating systems, it was originally developed by ...
, System Manager and
REAL/32 Multiuser DOS is a real-time multi-user multi-tasking operating system for IBM PC-compatible microcomputers. An evolution of the older Concurrent CP/M-86, Concurrent DOS and Concurrent DOS 386 operating systems, it was originally developed by ...
. ;umask:This option sets the
umask In computing, umask is a command (computing), command that determines the settings of a Mask (computing), mask that controls how file permissions are set for newly created files. It may also affect how the file permissions are changed explicitly. ...
to apply globally to all files in the volume. For example, to specify to the ' filesystem driver that no "group" or "other" access is to be allowed, the mount command would be invoked as mount -t vfat -o umask=077. ;conv: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 conv=b (for "binary"), conv=a (for "auto-detect"), and conv=t (for "text"), respectively. The latter two options carry an inherent risk of corrupting non-text file data. No conversion at all is the default.



Data structure

The ' 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 --LINUX-.---. In the absence of this file in any given directory, and thus by default, the ' filesystem driver provides the same semantics as the ' filesystem driver does for the directory: only 8.3 filenames and no extra Unix file semantics. To enable the ' 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 umssync. 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 ' filesystem driver to incorporate any changes made to files and directories by Windows into its private data structures in its --LINUX-.--- file. By default, the umssync tool creates --LINUX-.--- 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 umssync 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 -c option to the command, which prevents the creation of any new --LINUX-.--- files in directories that do not already possess them.


Installing Linux on FAT

As mentioned, ' 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 DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicatio ...
is already installed, without requiring that the hard disc be repartitioned. Linux is not bootstrapped directly from a Volume Boot Record in such a scenario. Instead DOS is first bootstrapped, and
loadlin loadlin is a Linux boot loader that runs under 16-bit real-mode DOS (including the MS-DOS mode of Windows 95, Windows 98 and Windows Me startup disk). It allows the Linux system to load and replace the running DOS without altering existing DOS sy ...
or is used to then bootstrap Linux from DOS. The convention for such an installation is for the Linux
root directory In a computer file system, and primarily used in the Unix and Unix-like operating systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the trunk of a tree, as the starting point where all branches ...
to be a subdirectory of the root directory of the DOS boot volume, e.g. C:\LINUX . The various Linux top-level directories are thus, to DOS, directories such as C:\LINUX\ETC (for /etc), C:\LINUX\BIN (for /bin), C:\LINUX\LIB (for /lib), and so forth. The ' filesystem driver automatically prepends the C:\LINUX\ to all pathnames. The location of the Linux root directory is supplied to the ' filesystem driver in the first place via an option to the loadlin command. So, for example, loadlin would be invoked with a command line such as loadlin c:\linux\boot\vmlinuz rw root=c:\linux . 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 Swap or SWAP may refer to: Finance * Swap (finance), a derivative in which two parties agree to exchange one stream of cash flows against another * Barter Science and technology * Swap (computer programming), exchanging two variables in t ...
rather than a
swap partition In computer operating systems, memory paging is a memory management scheme by which a computer stores and retrieves data from secondary storage for use in main memory. In this scheme, the operating system retrieves data from secondary stora ...
for Linux, however this is related to the desire not to repartition the hard disc and unrelated to the ' filesystem driver per se.


Accessing FAT formatted volumes without kernel support

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 Mtools is an open source collection of tools to allow a Unix operating system to manipulate files on an MS-DOS file system, typically a floppy disk or floppy disk image.https://www.gnu.org/software/mtools/ Homepage The mtools are part of the GNU ...
utility suite. Like the ' FAT filesystem driver, provides long filename support using the same disc data structures that Microsoft Windows uses. Alternately, one of the
FUSE Fuse or FUSE may refer to: Devices * Fuse (electrical), a device used in electrical systems to protect against excessive current ** Fuse (automotive), a class of fuses for vehicles * Fuse (hydraulic), a device used in hydraulic systems to protect ...
filesystem drivers may be used—FatFuse, FuseFat or .


POSIX overlay filesystem

A modern equivalent of UMSDOS is POSIX Overlay Filesystem (). It works in FUSE.


See also

* DMSDOS (DoubleSpace/DriveSpace/Stacker compatible compressed FAT volumes for Linux) *
Design of the FAT file system A FAT file system is a specific type of computer file system architecture and a family of industry-standard file systems utilizing it. The FAT file system is a legacy file system which is simple and robust. It offers good performance even in ...


References


Further reading

*
UMSDOS developer’s page

New Linux patch could circumvent Microsoft's FAT patents
by Ryan Paul {{DEFAULTSORT:Fat Filesystem And Linux Disk file systems File systems supported by the Linux kernel Free special-purpose file systems