Misplaced Pages

FAT filesystem and Linux

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Linux has several filesystem drivers for the File Allocation Table (FAT) filesystem format. These are commonly known by the names used in the mount command to invoke particular drivers in the kernel: msdos , vfat , and umsdos .

#311688

117-455: 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. These include distributions such as Phat Linux, which installs in C:\PHAT on DOS by unpacking a ZIP file and is booted by running a COMMAND.COM script named LINUX.BAT , and ZipSlack . The UMSDOS project

234-399: A .ZIP file is 22 bytes. Such an empty zip file contains only an End of Central Directory Record (EOCD): [0x50,0x4B,0x05,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] The maximum size for both the archive file and the individual files inside it is 4,294,967,295 bytes (2 −1 bytes, or 4 GB minus 1 byte) for standard ZIP. For ZIP64,

351-506: A "normal" central directory entry for a file, followed by an optional "zip64" directory entry, which has the larger fields. The format of the Local file header (LOC) and Central directory file header (CDFH) are the same in ZIP and ZIP64. However, ZIP64 specifies an extra field that may be added to those records at the discretion of the compressor, whose purpose is to store values that do not fit in

468-590: A .zip file without prior decompression. It combines the use of ZLib block flushes issued at regular interval with a hidden index file mapping offsets of the uncompressed file to offsets in the compressed stream. ZIP readers that are not aware of that extension can read a SOZip-enabled file normally and ignore the extended features that support efficient seek capability. .ZIP file format includes an extra field facility within file headers, which can be used to store extra data not defined by existing ZIP specifications, and which allow compliant archivers that do not recognize

585-401: A 12-byte structure (optionally preceded by a 4-byte signature) immediately after the compressed data: The central directory file header entry is an expanded form of the local header: After all the central directory entries comes the end of central directory (EOCD) record, which marks the end of the ZIP file: This ordering allows a ZIP file to be created in one pass, but the central directory

702-427: A 16-bit length. A ZIP64 local file extra field record, for example, has the signature 0x0001 and a length of 16 bytes (or more) so that two 64-bit values (the uncompressed and compressed sizes) may follow. Another common local file extension is 0x5455 (or "UT") which contains 32-bit UTC UNIX timestamps. This is immediately followed by the compressed data. If the bit at offset 3 (0x08) of the general-purpose flags field

819-440: A 4 GB (2 bytes) limit on various things (uncompressed size of a file, compressed size of a file, and total size of the archive), as well as a limit of 65,535 (2 -1) entries in a ZIP archive. In version 4.5 of the specification (which is not the same as v4.5 of any particular tool), PKWARE introduced the "ZIP64" format extensions to get around these limitations, increasing the limits to 16  EB (2 bytes). In essence, it uses

936-495: A 64 KiB page frame in the reserved upper memory area. 80386 and later systems could use a virtual 8086 mode (V86) mode memory manager like EMM386 to create expanded memory from extended memory without the need of an add-on card. The second specification was the Extended Memory Specification (XMS) for 80286 and later systems. This provided a way to copy data to and from extended memory, access to

1053-449: 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. As mentioned previously, all of

1170-471: A LZ77 variant provided by IBM z/OS CMPSC instruction. The most commonly used compression method is DEFLATE , which is described in IETF RFC   1951 . Other methods mentioned, but not documented in detail in the specification include: PKWARE DCL Implode (old IBM TERSE), new IBM TERSE , IBM LZ77 z Architecture (PFS), and a JPEG variant. A "Tokenize" method was reserved for a third party, but support

1287-416: A ZIP file. This identifies what files are in the ZIP and identifies where in the ZIP that file is located. This allows ZIP readers to load the list of files without reading the entire ZIP archive. ZIP archives can also include extra data that is not related to the ZIP archive. This allows for a ZIP archive to be made into a self-extracting archive (application that decompresses its contained data), by prepending

SECTION 10

#1732787385312

1404-1119: A ZIP64 extra field. However, if they appear, their order must be as shown in the table. On the other hand, the format of EOCD for ZIP64 is slightly different from the normal ZIP version. It is also not necessarily the last record in the file. An End of Central Directory Locator follows (an additional 20 bytes at the end). The File Explorer in Windows XP does not support ZIP64, but the Explorer in Windows Vista and later do. Likewise, some extension libraries support ZIP64, such as DotNetZip, QuaZIP and IO::Compress::Zip in Perl. Python 's built-in zipfile supports it since 2.5 and defaults to it since 3.4. OpenJDK 's built-in java.util.zip supports ZIP64 from version Java 7 . Android Java API support ZIP64 since Android 6.0. Mac OS Sierra's Archive Utility notably does not support ZIP64, and can create corrupt archives when ZIP64 would be required. However,

1521-425: A ballot to determine whether a project should be initiated to create an ISO/IEC International Standard format compatible with ZIP. The proposed project, entitled Document Packaging , envisaged a ZIP-compatible 'minimal compressed archive format' suitable for use with a number of existing standards including OpenDocument , Office Open XML and EPUB . In 2015, ISO/IEC 21320-1 "Document Container File — Part 1: Core"

1638-401: A batch file is interpreted as a program to run. Batch files can also make use of internal commands, such as GOTO and conditional statements . The operating system offers an application programming interface that allows development of character-based applications, but not for accessing most of the hardware , such as graphics cards , printers , or mice . This required programmers to access

1755-498: A configuration file similar to CONFIG.SYS and AUTOEXEC.BAT. If the MSDOS.SYS BootGUI directive is set to 0 , the boot process will stop with the command processor (typically COMMAND.COM) loaded, instead of executing WIN.COM automatically. DOS uses a filesystem which supports 8.3 filenames : 8 characters for the filename and 3 characters for the extension. Starting with DOS 2 hierarchical directories are supported. Each directory name

1872-425: A conversation with fellow United Way National Board Executive Committee member Mary Maxwell Gates , who referred Opel to her son Bill Gates for help with an 8088-compatible build of CP/M. IBM was then sent to Digital Research, and a meeting was set up. However, initial negotiations for the use of CP/M broke down: Digital Research wished to sell CP/M on a royalty basis, while IBM sought a single license, and to change

1989-524: A few developers and computer engineers still use it because it is close to the hardware. DOS's structure of accessing hardware directly allows it to be used in embedded devices . The final versions of DR-DOS are still aimed at this market. ROM-DOS is used as operating system for the Canon PowerShot Pro 70. On Linux , it is possible to run DOSEMU , a Linux-native virtual machine for running DOS programs at near native speed. There are

2106-483: A file name with a space, has sometimes been used by viruses or hacking programs to obscure files from users who do not know how to access these locations. DOS was designed for the Intel 8088 processor, which can only directly access a maximum of 1 MiB of RAM. Both IBM and Microsoft chose 640 kibibytes (KiB) as the maximum amount of memory available to programs and reserved the remaining 384 KiB for video memory,

2223-521: A manifesto proposing the development of an open-source replacement. Within a few weeks, other programmers including Pat Villani and Tim Norman joined the project. A kernel, the COMMAND.COM command line interpreter (shell), and core utilities were created by pooling code they had written or found available. There were several official pre-release distributions of FreeDOS before the FreeDOS 1.0 distribution

2340-666: A more user-friendly environment, numerous software manufacturers wrote file management programs that provided users with WIMP interfaces. Microsoft Windows is a notable example, eventually resulting in Microsoft Windows 9x becoming a self-contained program loader, and replacing DOS as the most-used PC-compatible program loader. Text user interface programs included Norton Commander , DOS Navigator , Volkov Commander , Quarterdesk DESQview , and Sidekick . Graphical user interface programs included Digital Research's GEM (originally written for CP/M) and GEOS . Eventually,

2457-406: 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 umsdos filesystem driver provides the same semantics as the msdos filesystem driver does for the directory: only 8.3 filenames and no extra Unix file semantics. To enable the umsdos driver's extra abilities, it is necessary to create that file in

SECTION 20

#1732787385312

2574-513: A number of other emulators for running DOS on various versions of Unix and Microsoft Windows such as DOSBox . DOSBox is designed for legacy gaming (e.g. King's Quest , Doom ) on modern operating systems. DOSBox includes its own implementation of DOS which is strongly tied to the emulator and cannot run on real hardware, but can also boot MS-DOS, FreeDOS, or other DOS operating systems if needed. MS-DOS and IBM PC DOS related operating systems are commonly associated with machines using

2691-413: A program run from one floppy while accessing its data on another. Hard drives were originally assigned the letters "C" and "D". DOS could only support one active partition per drive. As support for more hard drives became available, this developed into first assigning a drive letter to each drive's active primary partition , then making a second pass over the drives to allocate letters to logical drives in

2808-501: A retail version of MS-DOS, starting with MS-DOS 5.0. In the mid-1980s, Microsoft developed a multitasking version of DOS . This version of DOS is generally referred to as "European MS-DOS 4" because it was developed for ICL and licensed to several European companies. This version of DOS supports preemptive multitasking, shared memory, device helper services and New Executable ("NE") format executables. None of these features were used in later versions of DOS, but they were used to form

2925-420: A revision of the ZIP specification providing for the storage of file names using UTF-8 , finally adding Unicode compatibility to ZIP. All multi-byte values in the header are stored in little-endian byte order. All length fields count the length in bytes. The extra field contains a variety of optional data such as OS-specific attributes. It is divided into records, each with at minimum a 16-bit signature and

3042-566: A series of disagreements over two successor operating systems to DOS, OS/2 and Windows. They split development of their DOS systems as a result. The last retail version of MS-DOS was MS-DOS 6.22; after this, MS-DOS became part of Windows 95, 98 and Me. The last retail version of PC DOS was PC DOS 2000 (also called PC DOS 7 revision 1), though IBM did later develop PC DOS 7.10 for OEMs and internal use. The FreeDOS project began on 26 June 1994, when Microsoft announced it would no longer sell or support MS-DOS. Jim Hall then posted

3159-429: 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. 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

3276-415: A time can use them, and DOS itself has no functionality to allow more than one program to execute at a time. The DOS kernel provides various functions for programs (an application program interface ), like character I/O, file management, memory management, program loading and termination. DOS provides the ability for shell scripting via batch files (with the filename extension .BAT ). Each line of

3393-400: A timestamp resolution of only two seconds; ZIP file records mimic this. As a result, the built-in timestamp resolution of files in a ZIP archive is only two seconds, though extra fields can be used to store more precise timestamps. The ZIP format has no notion of time zone , so timestamps are only meaningful if it is known what time zone they were created in. In September 2006, PKWARE released

3510-522: 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. 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 umsdos when it comes to simply sharing data on

3627-572: A year Microsoft licensed MS-DOS to over 70 other companies, which supplied the operating system for their own hardware, sometimes under their own names. Microsoft later required the use of the MS-DOS name, with the exception of the IBM variant. IBM continued to develop their version, PC DOS , for the IBM PC. Digital Research became aware that an operating system similar to CP/M was being sold by IBM (under

FAT filesystem and Linux - Misplaced Pages Continue

3744-539: Is a real DOS, like MS-DOS 6.22 or PC DOS 5.00. One makes a bootable floppy disk of the DOS, adds a number of drivers from OS/2, and then creates a special image. The DOS booted this way has full access to the system, but provides its own drivers for hardware. One can use such a disk to access cdrom drives for which there is no OS/2 driver. In all 32-bit (IA-32) editions of the Windows NT family since 1993, DOS emulation

3861-714: Is also 8.3 format but the maximum directory path length is 64 characters due to the internal current directory structure (CDS) tables that DOS maintains. Including the drive name, the maximum length of a fully qualified filename that DOS supports is 80 characters using the format drive:\path\filename.ext followed by a null byte. DOS uses the File Allocation Table (FAT) filesystem. This was originally FAT12 which supported up to 4078 clusters per drive. DOS 3.0 added support for FAT16 which used 16-bit allocation entries and supported up to 65518 clusters per drive. Compaq MS-DOS 3.31 added support for FAT16B which removed

3978-415: Is also placed at the end of the file in order to facilitate easy removal of files from multiple-part (e.g. "multiple floppy-disk") archives, as previously discussed. The .ZIP File Format Specification documents the following compression methods: Store (no compression), Shrink ( LZW ), Reduce (levels 1–4; LZ77 + probabilistic), Implode, Deflate, Deflate64, bzip2 , LZMA , Zstandard , WavPack , PPMd , and

4095-512: 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 the most common. This format was originally created in 1989 and was first implemented in PKWARE, Inc. 's PKZIP utility, as a replacement for the previous ARC compression format by Thom Henderson. The ZIP format

4212-431: Is an optional built-in driver for a fourth line printer supported in some versions of DR-DOS since 7.02. CONFIG$ constitutes the real mode PnP manager in MS-DOS 7.0–8.0. AUX typically defaults to COM1 , and PRN to LPT1 ( LST ), but these defaults can be changed in some versions of DOS to point to other serial or parallel devices. The PLT device (present only in some HP OEM versions of MS-DOS)

4329-531: Is available in COMMAND.COM. Programs like the Microsoft CD-ROM Extensions (MSCDEX) provide access to files on CD-ROM disks. Some TSRs can even perform a rudimentary form of task switching. For example, the shareware program Back and Forth (1990) has a hotkey to save the state of the currently-running program to disk, load another program, and switch to it, making it possible to switch "back and forth" between programs (albeit slowly, due to

4446-408: Is based upon DOS 5. Although there is a default configuration (config.sys and autoexec.bat), one can use alternate files on a session-by-session basis. It is possible to load drivers in these files to access the host system, although these are typically third-party. Under OS/2 2.x and later, the DOS emulation is provided by DOSKRNL. This is a file that represents the combined IBMBIO.COM and IBMDOS.COM,

4563-421: Is correctly identified by the presence of an end of central directory record which is located at the end of the archive structure in order to allow the easy appending of new files. If the end of central directory record indicates a non-empty archive, the name of each file or directory within the archive should be specified in a central directory entry, along with other metadata about the entry, and an offset into

4680-544: Is documented in the ZIP specification, and known to be seriously flawed. In particular, it is vulnerable to known-plaintext attacks , which are in some cases made worse by poor implementations of random-number generators . Computers running under native Microsoft Windows without third-party archivers can open, but not create, ZIP files encrypted with ZipCrypto, but cannot extract the contents of files using different encryption. New features including new compression and encryption (e.g. AES ) methods have been documented in

4797-468: Is formally named "APPNOTE - .ZIP File Format Specification" and it is published on the PKWARE.com website since the late 1990s. Several versions of the specification were not published. Specifications of some features such as BZIP2 compression, strong encryption specification and others were published by PKWARE a few years after their creation. The URL of the online specification was changed several times on

FAT filesystem and Linux - Misplaced Pages Continue

4914-632: Is introduced in .ZIP File Format Specification 6.2, which encrypts metadata stored in Central Directory portion of an archive, but Local Header sections remain unencrypted. A compliant archiver can falsify the Local Header data when using Central Directory Encryption. As of version 6.2 of the specification, the Compression Method and Compressed Size fields within Local Header are not yet masked. The original .ZIP format had

5031-502: Is invalid." These names (except for NUL) have continued to be supported in all versions of MS-DOS, PC DOS and DR-DOS ever since. LST was also available in some OEM versions of MS-DOS 1.25, whereas other OEM versions of MS-DOS 1.25 already used LPT1 (first line printer ) and COM1 (first serial communication device ) instead, as introduced with PC DOS. In addition to LPT1 and LPT2 as well as COM1 to COM3 , Hewlett-Packard's OEM version of MS-DOS 2.11 for

5148-413: Is likely to render the media unbootable. It is, however, possible to replace the shell at will, a method that can be used to start the execution of dedicated applications faster. This limitation does not apply to any version of DR DOS, where the system files can be located anywhere in the root directory and do not need to be contiguous. Therefore, system files can be simply copied to a disk provided that

5265-455: Is not necessarily the case, as this is not required by the ZIP specification - most notably, a self-extracting archive will begin with an executable file header. Tools that correctly read ZIP archives must scan for the end of central directory record signature, and then, as appropriate, the other, indicated, central directory records. They must not scan for entries from the top of the ZIP file, because (as previously mentioned in this section) only

5382-504: Is provided by way of a virtual DOS machine (NTVDM). 64-bit (IA-64 and x86-64) versions of Windows do not support NTVDM and cannot run 16-bit DOS applications directly; third-party emulators such as DOSbox can be used to run DOS programs on those machines. DOS systems use a command-line interface . A program is started by entering its filename at the command prompt. DOS systems include utility programs and provide internal commands that do not correspond to programs. In an attempt to provide

5499-524: Is set, then the CRC-32 and file sizes are not known when the header is written. If the archive is in Zip64 format, the compressed and uncompressed size fields are 8 bytes long instead of 4 bytes long (see section 4.3.9.2 ). The equivalent fields in the local header (or in the Zip64 extended information extra field in the case of archives in Zip64 format) are filled with zero, and the CRC-32 and size are appended in

5616-572: The C:\LINUX\ 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 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

5733-424: 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

5850-698: The HP Portable Plus also supported LST as alias for LPT2 and 82164A as alias for COM2 ; it also supported PLT for plotters . Otherwise, COM2 , LPT2 , LPT3 and the CLOCK$ (still named CLOCK in some issues of MS-DOS 2.11 ) clock device were introduced with DOS 2.0, and COM3 and COM4 were added with DOS 3.3. Only the multitasking MS-DOS 4 supported KEYBD$ and SCREEN$ . DR DOS 5.0 and higher and Multiuser DOS support an $ IDLE$ device for dynamic idle detection to saving power and improve multitasking. LPT4

5967-640: The Intel x86 or compatible CPUs , mainly IBM PC compatibles . Machine-dependent versions of MS-DOS were produced for many non-IBM-compatible x86 -based machines, with variations from relabelling of the Microsoft distribution under the manufacturer's name, to versions specifically designed to work with non-IBM-PC-compatible hardware. As long as application programs used DOS APIs instead of direct hardware access, they could run on both IBM-PC-compatible and incompatible machines. The original FreeDOS kernel, DOS-C ,

SECTION 50

#1732787385312

6084-490: The extended partition , then a third pass to give any other non-active primary partitions their names (where such additional partitions existed and contained a DOS-supported file system). Lastly, DOS allocates letters for optical disc drives , RAM disks , and other hardware. Letter assignments usually occur in the order the drivers are loaded, but the drivers can instruct DOS to assign a different letter; drivers for network drives, for example, typically assign letters nearer to

6201-516: The file extensions .zip or .ZIP and the MIME media type application/zip . ZIP is used as a base file format by many programs, usually under a different name. When navigating a file system via a user interface, graphical icons representing ZIP files often appear as a document or other object prominently featuring a zipper . The .ZIP file format was designed by Phil Katz of PKWARE and Gary Conway of Infinity Design Concepts. The format

6318-521: The read-only memory of adapters on some video and network peripherals, and the system's BIOS. By 1985, some DOS applications were already hitting the memory limit, while much of reserved was unused, depending on the machine's specifications. Specifications were developed to allow access to additional memory. The first was the Expanded Memory Specification (EMS) was designed to allow memory on an add-on card to be accessed via

6435-494: The 32‑ MiB drive limit and could support up to 512 MiB. Finally MS-DOS 7.1 (the DOS component of Windows 9x) added support for FAT32 which used 32-bit allocation entries and could support hard drives up to 137 GiB and beyond. Starting with DOS 3.1, file redirector support was added to DOS. This was initially used to support networking but was later used to support CD-ROM drives with MSCDEX . IBM PC DOS 4.0 also had preliminary installable file system (IFS) support but this

6552-584: The 65,520-byte high memory area directly above the first megabyte of memory and the upper memory block area. Generally XMS support was provided by HIMEM.SYS or a V86 mode memory manager like QEMM or 386MAX which also supported EMS. Starting with DOS 5, DOS could directly take advantage of the HMA by loading its kernel code and disk buffers there via the DOS=HIGH statement in CONFIG.SYS. DOS 5+ also allowed

6669-605: The DOS virtual machine is provided by WINOLDAP. WinOldAp creates a virtual machine based on the program's PIF file, and the system state when Windows was loaded. The DOS graphics mode, both character and graphic, can be captured and run in the window. DOS applications can use the Windows clipboard by accessing extra published calls in WinOldAp, and one can paste text through the WinOldAp graphics. The emulated DOS in OS/2 and Windows NT

6786-494: The IBM PC compatible market between 1981 and 1995. Although the name has come to be identified specifically with this particular family of operating systems, DOS is a platform-independent acronym for disk operating system , whose use predates the IBM PC. Dozens of other operating systems also use the acronym, beginning with the mainframe DOS/360 from 1966. Others include Apple DOS , Apple ProDOS , Atari DOS , Commodore DOS , TRSDOS , and AmigaDOS . IBM PC DOS (and

6903-420: 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): 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

7020-547: 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 filenames , 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 . The filesystem drivers are mutually exclusive. Only one can be used to mount any given disk volume at any given time. Thus

7137-424: The PKWARE website. A summary of key advances in various versions of the PKWARE specification: WinZip , starting with version 12.1, uses the extension .zipx for ZIP files that use compression methods newer than DEFLATE; specifically, methods BZip, LZMA, PPMd, Jpeg and Wavpack. The last 2 are applied to appropriate file types when "Best method" compression is selected. In April 2010, ISO/IEC JTC 1 initiated

SECTION 60

#1732787385312

7254-578: The PKZIP AppNote.txt specification, and can be read by compliant zip tools or libraries. This property of the .ZIP format, and of the JAR format which is a variant of ZIP, can be exploited to hide rogue content (such as harmful Java classes) inside a seemingly harmless file, such as a GIF image uploaded to the web. This so-called GIFAR exploit has been demonstrated as an effective attack against web applications such as Facebook. The minimum size of

7371-622: The ZIP File Format Specification since version 5.2. A WinZip -developed AES-based open standard ("AE-x" in APPNOTE) is used also by 7-Zip and Xceed , but some vendors use other formats. PKWARE SecureZIP (SES, proprietary) also supports RC2, RC4, DES, Triple DES encryption methods, Digital Certificate-based encryption and authentication ( X.509 ), and archive header encryption. It is, however, patented (see § Strong encryption controversy ). File name encryption

7488-402: The ZIP file, pointing to the actual entry data. This allows a file listing of the archive to be performed relatively quickly, as the entire archive does not have to be read to see the list of files. The entries within the ZIP file also include this information, for redundancy, in a local file header . Because ZIP files may be appended to, only files specified in the central directory at the end of

7605-507: The ZIP so start with "MZ"; self-extracting ZIPs for other operating systems may similarly be preceded by executable code for extracting the archive's content on that platform.) The .ZIP specification also supports spreading archives across multiple file-system files. Originally intended for storage of large ZIP files across multiple floppy disks , this feature is now used for sending ZIP archives in parts over email, or over other transports or removable media. The FAT filesystem of DOS has

7722-540: The basis of the OS/2 1.0 kernel. This version of DOS is distinct from the widely released PC DOS 4.0 which was developed by IBM and based upon DOS 3.3. Digital Research attempted to regain the market lost from CP/M-86, initially with Concurrent DOS , FlexOS and DOS Plus (both compatible with both MS-DOS and CP/M-86 software), later with Multiuser DOS (compatible with both MS-DOS and CP/M-86 software) and DR DOS (compatible with MS-DOS software). Digital Research

7839-411: The boot sector is DR DOS compatible already. In PC DOS and DR DOS 5.0 and above, the DOS system files are named IBMBIO.COM instead of IO.SYS and IBMDOS.COM instead of MSDOS.SYS . Older versions of DR DOS used DRBIOS.SYS and DRBDOS.SYS instead. Starting with MS-DOS 7.0 the binary system files IO.SYS and MSDOS.SYS were combined into a single file IO.SYS whilst MSDOS.SYS became

7956-419: The central directory specifies where a file chunk starts and that it has not been deleted. Scanning could lead to false positives, as the format does not forbid other data to be between chunks, nor file data streams from containing such signatures. However, tools that attempt to recover data from damaged ZIP archives will most likely scan the archive for local file header signatures; this is made more difficult by

8073-429: 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 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

8190-483: The classic LOC or CDFH records. To signal that the actual values are stored in ZIP64 extra fields, they are set to 0xFFFF or 0xFFFFFFFF in the corresponding LOC or CDFH record. If one entry does not fit into the classic LOC or CDFH record, only that entry is required to be moved into a ZIP64 extra field. The other entries may stay in the classic record. Therefore, not all entries shown in the following table might be stored in

8307-404: The corresponding load drive whenever an application starts. There are reserved device names in DOS that cannot be used as filenames regardless of extension as they are occupied by built-in character devices. These restrictions also affect several Windows versions, in some cases causing crashes and security vulnerabilities. The reserved names are: In Windows 95 and Windows 98 , typing in

8424-499: The default OS kernel , though the MS-DOS component remained for compatibility. With Windows 95 and 98, but not ME, the MS-DOS component could be run without starting Windows. With DOS no longer required to use Windows, the majority of users stopped using it directly. As of 2024 , available compatible systems are FreeDOS , ROM-DOS , PTS-DOS , RxDOS and REAL/32 . Some computer manufacturers, including Dell and HP , sell computers with FreeDOS as an OEM operating system. And

8541-512: 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 umsdos filesystem driver to incorporate any changes made to files and directories by Windows into its private data structures in its --LINUX-.--- file. By default,

8658-547: 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. The key advantage to umsdos out of

8775-424: The ditto command shipped with Mac OS will unzip ZIP64 files. More recent versions of Mac OS ship with info-zip's zip and unzip command line tools which do support Zip64: to verify run zip -v and look for "ZIP64_SUPPORT". The .ZIP file format allows for a comment containing up to 65,535 (2 −1) bytes of data to occur at the end of the file after the central directory. Also, because the central directory specifies

8892-464: The end of the alphabet. Because DOS applications use these drive letters directly (unlike the /dev directory in Unix-like systems), they can be disrupted by adding new hardware that needs a drive letter. An example is the addition of a new hard drive having a primary partition where a pre-existing hard drive contains logical drives in extended partitions; the new drive will be assigned a letter that

9009-479: The fact that the compressed size of a file chunk may be stored after the file chunk, making sequential processing difficult. Most of the signatures end with the short integer 0x4b50, which is stored in little-endian ordering. Viewed as an ASCII string this reads "PK", the initials of the inventor Phil Katz. Thus, when a ZIP file is viewed in a text editor the first two bytes of the file are usually "PK". (DOS, OS/2 and Windows self-extracting ZIPs have an EXE before

9126-589: The fields to safely skip them. Header IDs 0–31 are reserved for use by PKWARE. The remaining IDs can be used by third-party vendors for proprietary usage. DOS DOS ( / d ɒ s / , / d ɔː s / ) 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 systems from other manufacturers include DR-DOS (1988), ROM-DOS (1989), PTS-DOS (1993), and FreeDOS (1998). MS-DOS dominated

9243-403: The file are valid. Scanning a ZIP file for local file headers is invalid (except in the case of corrupted archives), as the central directory may declare that some files have been deleted and other files have been updated. For example, we may start with a ZIP file that contains files A, B and C. File B is then deleted and C updated. This may be achieved by just appending a new file C to the end of

9360-470: The file both before and after the ZIP archive data, and for the archive to still be read by a ZIP application. A side-effect of this is that it is possible to author a file that is both a working ZIP archive and another format, provided that the other format tolerates arbitrary data at its end, beginning, or middle. Self-extracting archives (SFX), of the form supported by WinZip, take advantage of this, in that they are executable ( .exe ) files that conform to

9477-630: 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 or linld is used to then bootstrap Linux from DOS. The convention for such an installation is for the Linux root directory 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 umsdos filesystem driver automatically prepends

9594-400: The hardware directly, usually resulting in each application having its own set of device drivers for each hardware peripheral. Hardware manufacturers would release specifications to ensure device drivers for popular applications were available. The DOS system files loaded by the boot sector must be contiguous and be the first two directory entries . As such, removing and adding this file

9711-580: The introduction of Xenix . The company planned to improve MS-DOS over time, so it would be almost indistinguishable from single-user Xenix, or XEDOS , which would also run on the Motorola 68000 , Zilog Z-8000 , and LSI-11 ; they would be upwardly compatible with Xenix, which BYTE in 1983 described as "the multi-user MS-DOS of the future". IBM, however, did not want to replace DOS. After AT&T began selling Unix, Microsoft and IBM began developing OS/2 as an alternative. The two companies later had

9828-458: The location of the reserved name (such as CON/CON, AUX/AUX, or PRN/PRN) crashes the operating system, of which Microsoft has provided a security fix for the issue. In Windows XP , the name of the file or folder using a reserved name silently reverts to its previous name, with no notification or error message. In Windows Vista and later, attempting to use a reserved name for a file or folder brings up an error message saying "The specified device name

9945-399: The manufacturers of major DOS systems began to include their own environment managers. MS-DOS/IBM DOS 4 included DOS Shell ; DR DOS 5.0, released the following year, included ViewMAX , based upon GEM. Although DOS is not a multitasking operating system, it does provide a terminate-and-stay-resident (TSR) function which allows programs to remain resident in memory. These programs can hook

10062-441: The maximum size is 18,446,744,073,709,551,615 bytes (2 −1 bytes, or 16 EB minus 1 byte). A Seek-Optimized ZIP file (SOZip) profile has been proposed for the ZIP format. Such file contains one or several Deflate-compressed files that are organized and annotated such that a SOZip-aware reader can perform very fast random access (seek) within a compressed file. SOZip makes it possible to access large compressed files directly from

10179-672: The name to "PC DOS". Digital Research founder Gary Kildall refused, and IBM withdrew. IBM again approached Bill Gates. Gates in turn approached Seattle Computer Products . There, programmer Tim Paterson had developed a variant of CP/M-80 , intended as an internal product for testing SCP's new 16-bit Intel 8086 CPU card for the S-100 bus . The system was initially named QDOS (Quick and Dirty Operating System), before being made commercially available as 86-DOS . Microsoft purchased 86-DOS, allegedly for US$ 50,000. This became Microsoft Disk Operating System, MS-DOS, introduced in 1981. Within

10296-403: The offset of each file in the archive with respect to the start, it is possible for the first file entry to start at an offset other than zero, although some tools might not process archive files that do not start with a file entry at offset zero. The program gzip , for example, happens to be able to extract an entry from a .ZIP file if it is at offset zero. This allows arbitrary data to occur in

10413-416: The old central directory, append the new files then append an updated central directory. The order of the file entries in the central directory need not coincide with the order of file entries in the archive. Each entry stored in a ZIP archive is introduced by a local file header with information about the file such as the comment, file size and file name, followed by optional "extra" data fields, and then

10530-418: The original ZIP file and adding a new central directory that only lists file A and the new file C. When ZIP was first designed, transferring files by floppy disk was common, yet writing to disks was very time-consuming. If you had a large zip file, possibly spanning multiple disks, and only needed to update a few files, rather than reading and re-writing all the files, it would be substantially faster to just read

10647-495: The possibly compressed, possibly encrypted file data. The "Extra" data fields are the key to the extensibility of the ZIP format. "Extra" fields are exploited to support the ZIP64 format, WinZip-compatible AES encryption, file attributes, and higher-resolution NTFS or Unix file timestamps. Other extensions are possible via the "Extra" field. ZIP tools are required by the specification to ignore Extra fields they do not recognize. The ZIP format uses specific 4-byte "signatures" to denote

10764-530: The program code to a ZIP archive and marking the file as executable. Storing the catalog at the end also makes possible to hide a zipped file by appending it to an innocuous file, such as a GIF image file. The .ZIP format uses a 32-bit CRC algorithm and includes two copies of each entry metadata to provide greater protection against data loss. The CRC-32 algorithm was contributed by David Schwaderer and can be found in his book "C Programmers Guide to NetBIOS" published by Howard W. Sams & Co. Inc. A ZIP file

10881-400: The same archive to be compressed using different methods. Because the files in a ZIP archive are compressed individually, it is possible to extract them, or add new ones, without applying compression or decompression to the entire archive. This contrasts with the format of compressed tar files, for which such random-access processing is not easily possible. A directory is placed at the end of

10998-501: The same name that IBM insisted upon for CP/M), and threatened legal action. IBM responded by offering an agreement: they would give PC consumers a choice of PC DOS or CP/M-86 , Kildall's 8086 version. Side-by-side, CP/M cost US$ 200 more than PC DOS, and sales were low. CP/M faded, with MS-DOS and PC DOS becoming the marketed operating system for PCs and PC compatibles. Microsoft originally sold MS-DOS only to original equipment manufacturers (OEMs). One major reason for this

11115-505: The separately sold MS-DOS ) and its predecessor, 86-DOS , ran on Intel 8086 16-bit processors. It was developed to be similar to Digital Research 's CP/M —the dominant disk operating system for 8-bit Intel 8080 and Zilog Z80 microcomputers—in order to simplify porting CP/M applications to MS-DOS. When IBM introduced the IBM PC , built with the Intel 8088 microprocessor, they needed an operating system. Chairman John Opel had

11232-506: The system calls are passed through to the OS/2 windowing services. DOS programs run in their own environment, the bulk of the DOS utilities are provided by bound DOS / OS2 applications in the \OS2 directory. OS/2 can run Windows 3.1 applications by using a modified copy of Windows (Win-OS/2). The modifications allow Windows 3.1 programs to run seamlessly on the OS/2 desktop, or one can start a WinOS/2 desktop, similar to starting Windows from DOS. OS/2 allows for 'DOS from Drive A:', (VMDISK). This

11349-606: The system timer or keyboard interrupts to allow themselves to run tasks in the background or to be invoked at any time, preempting the current running program and effectively implementing a simple form of multitasking on a program-specific basis. The DOS PRINT command does this to implement background print spooling. Borland Sidekick , a popup personal information manager (PIM), also uses this technique. Terminate-and-stay-resident programs are also used to provide additional features not available by default. Programs like CED and DOSKEY provide command-line editing facilities beyond what

11466-425: 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. Further, unless

11583-403: 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. 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

11700-690: The use of available upper memory blocks via the DOS=UMB statement in CONFIG.SYS. The DOS emulation in OS/2 and Windows runs in much the same way as native applications do. They can access all of the drives and services, and can even use the host's clipboard services. Because the drivers for file systems and such forth reside in the host system, the DOS emulation needs only provide a DOS API translation layer which converts DOS calls to OS/2 or Windows system calls. The translation layer generally also converts BIOS calls and virtualizes common I/O port accesses which many DOS programs commonly use. In Windows 3.1 and 9x,

11817-417: The user changes them. Under DOS, this problem can be worked around by defining a SUBST drive and installing the DOS program into this logical drive. The assignment of this drive would then be changed in a batch job whenever the application starts. Under some versions of Concurrent DOS , as well as under Multiuser DOS , System Manager and REAL/32 , the reserved drive letter L: will automatically be assigned to

11934-515: The utility programs that form the mtools utility suite. Like the vfat FAT filesystem driver, mountlo provides long filename support using the same disc data structures that Microsoft Windows uses. Alternately, one of the FUSE filesystem drivers may be used—FatFuse, FuseFat or mountlo. A modern equivalent of UMSDOS is POSIX Overlay Filesystem (posixovl). It works in FUSE. ZIP file ZIP

12051-462: The various structures in the file. Each file entry is marked by a specific signature. The end of central directory record is indicated with its specific signature, and each entry in the central directory starts with the 4-byte central file header signature . There is no BOF or EOF marker in the ZIP specification. Conventionally the first thing in a ZIP file is a ZIP entry, which can be identified easily by its local file header signature . However, this

12168-473: The version numbers for the PKZIP tool, especially with PKZIP 6 or later. At various times, PKWARE has added preliminary features that allow PKZIP products to extract archives using advanced features, but PKZIP products that create such archives are not made available until the next major release. Other companies or organizations support the PKWARE specifications at their own pace. The .ZIP file format specification

12285-416: Was bought by Novell , and DR DOS became PalmDOS and Novell DOS ; later, it was part of Caldera (under the names OpenDOS and DR-DOS 7.02 / 7.03 ), Lineo , and DeviceLogics . Gordon Letwin wrote in 1995 that "DOS was, when we first wrote it, a one-time throw-away product intended to keep IBM happy so that they'd buy our languages." Microsoft expected that it would be an interim solution before

12402-470: Was created after Systems Enhancement Associates (SEA) filed a lawsuit against PKWARE claiming that the latter's archiving products, named PKARC, were derivatives of SEA's ARC archiving system. The name "zip" (meaning "move at high speed") was suggested by Katz's friend, Robert Mahoney. They wanted to imply that their product would be faster than ARC and other compression formats of the time. The earliest known version of .ZIP File Format Specification

12519-513: Was derived from DOS/NT for the Motorola 68000 series of CPUs in the early 1990s. While these systems loosely resembled the DOS architecture, applications were not binary compatible due to the incompatible instruction sets of these non-x86-CPUs. However, applications written in high-level languages could be ported easily. DOS is a single-user, single-tasking operating system with basic kernel functions that are non-reentrant : only one program at

12636-560: Was first published as part of PKZIP 0.9 package under the file APPNOTE.TXT in 1989. By distributing the zip file format within APPNOTE.TXT, compatibility with the zip file format proliferated widely on the public Internet during the 1990s. PKWARE and Infinity Design Concepts made a joint press release on February 14, 1989, releasing the .ZIP file format into the public domain . The .ZIP File Format Specification has its own version number, which does not necessarily correspond to

12753-496: Was never added. The word Implode is overused by PKWARE: the DCL/TERSE Implode is distinct from the old PKZIP Implode, a predecessor to Deflate. The DCL Implode is undocumented partially due to its proprietary nature held by IBM, but Mark Adler has nevertheless provided a decompressor called "blast" alongside zlib. ZIP supports a simple password -based symmetric encryption system generally known as ZipCrypto. It

12870-464: Was previously assigned to one of the extended partition logical drives. Moreover, even adding a new hard drive having only logical drives in an extended partition would still disrupt the letters of RAM disks and optical drives. This problem persisted through Microsoft's DOS-based 9x versions of Windows until they were replaced by versions based on the NT line, which preserves the letters of existing drives until

12987-401: Was published which states that "Document container files are conforming Zip files". It requires the following main restrictions of the ZIP file format: .ZIP files are archives that store multiple files. ZIP allows contained files to be compressed using many different methods, as well as simply storing a file without compressing it. Each file is stored separately, allowing different files in

13104-467: Was reconfigurable as well. Filenames ended with a colon ( : ) such as NUL: conventionally indicate device names, but the colon is not actually a part of the name of the built-in device drivers. Colons are not necessary to be typed in some cases, for example: It is still possible to create files or directories using these reserved device names, such as through direct editing of directory data structures in disk sectors. Such naming, such as starting

13221-543: Was released on 3 September 2006. Made available under the GNU General Public License (GPL), FreeDOS does not require license fees or royalties. Early versions of Microsoft Windows ran on MS-DOS. By the early 1990s, the Windows graphical shell saw heavy use on new DOS systems. In 1995, Windows 95 was bundled as a standalone operating system that did not require a separate DOS license. Windows 95 (and Windows 98 and ME, that followed it) took over as

13338-578: 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. All of

13455-415: Was that not all early PCs were 100% IBM PC compatible . DOS was structured such that there was a separation between the system specific device driver code ( IO.SYS ) and the DOS kernel ( MSDOS.SYS ). Microsoft provided an OEM Adaptation Kit (OAK) which allowed OEMs to customize the device driver code to their particular system. By the early 1990s, most PCs adhered to IBM PC standards so Microsoft began selling

13572-669: Was then quickly supported by many software utilities other than PKZIP. Microsoft has included built-in ZIP support (under the name "compressed folders") in versions of Microsoft Windows since 1998 via the "Plus! 98" addon for Windows 98. Native support was added as of the year 2000 in Windows ME. Apple has included built-in ZIP support in Mac ;OS X 10.3 (via BOMArchiveHelper, now Archive Utility ) and later. Most free operating systems have built in support for ZIP in similar manners to Windows and macOS. ZIP files generally use

13689-518: Was unused and removed in DOS 5.0. DOS also supported Block Devices ("Disk Drive" devices) loaded from CONFIG.SYS that could be used under the DOS file system to support network devices. In DOS, drives are referred to by identifying letters. Standard practice is to reserve "A" and "B" for floppy drives . On systems with only one floppy drive DOS assigns both letters to the drive, prompting the user to swap disks as programs alternate access between them. This facilitates copying from floppy to floppy or having

#311688