Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
has several
filesystem drivers for the
File Allocation Table
File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on Ha ...
(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, ...
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 t ...
and is booted by running a
COMMAND.COM script named
LINUX.BAT
,
and
ZipSlack.
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, 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 and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on ...
,
FAT16
File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on Ha ...
and
FAT32
File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on ...
. 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 MS-DOS. Long filenames can be more descriptive, including longer filename extensions such as .jpeg, .tiff, an ...
s, beyond the
8.3 filename
An 8.3 filename (also called a short filename or SFN) is one that obeys the filename convention used by CP/M and 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 opera ...
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
Typically, a file system maintains permission settings for each stored item commonly files and directories that either grant or deny the ability to manipulate file system items. Often the settings allow controlling access based on function s ...
.
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 Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
uses for
VFAT
File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on h ...
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
ext2, or second extended file system, is a file system for the Linux kernel (operating system), kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed ...
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
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, ...
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 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 is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 198 ...
,
PalmDOS
DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 1988, ...
,
Novell DOS
DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 1988, ...
,
OpenDOS
DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introd ...
,
FlexOS
FlexOS is a discontinued modular real-time multiuser multitasking operating system ( RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business ...
,
Concurrent 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 ...
,
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
umask is a shell command that reports or sets the mask value that limits the file permissions for newly created files in many Unix and Unix-like file systems. A system call with the same name, , provides access to the mask value stored in the ...
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
;
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 a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
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 s ...
or is used to then bootstrap Linux from DOS.
The convention for such an installation is for the Linux
root directory
In a Computing, computer file system, and primarily used in the Unix and Unix-like operating systems, the root directory is the first or top-most Directory (computing), directory in a hierarchy. It can be likened to the trunk of a Tree (data st ...
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
In computer operating systems, memory paging is a memory management scheme that allows the physical memory used by a program to be non-contiguous. This also helps avoid the problem of memory fragmentation and requiring compaction to reduce fra ...
rather than a
swap partition
In computer operating systems, memory paging is a memory management scheme that allows the physical memory used by a program to be non-contiguous. This also helps avoid the problem of memory fragmentation and requiring compaction to reduce fra ...
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 a free software collection of utilities to allow a Unix operating system to manipulate files on an MS-DOS file system, typically a floppy disk or floppy disk image.
The mtools are part of the GNU Project and are released under the GNU G ...
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 protec ...
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
The FAT file system is a file system used on MS-DOS and Windows 9x family of operating systems. It continues to be used on mobile devices and embedded systems, and thus is a well-suited file system for data exchange between computers and devi ...
References
Further reading
*
UMSDOS developer’s pageNew Linux patch could circumvent Microsoft's FAT patentsby Ryan Paul
{{DEFAULTSORT:Fat Filesystem And Linux
Disk file systems
File systems supported by the Linux kernel
Free special-purpose file systems