1This is mtools.info, produced by makeinfo version 6.5 from mtools.texi. 2 3This manual is for Mtools (version 4.0.26, November 2020), which is a 4collection of tools to allow Unix systems to manipulate MS-DOS files. 5 6 Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright 7(C) 1996-2005,2007-2011,2013 Alain Knaff. 8 9 Permission is granted to copy, distribute and/or modify this 10 document under the terms of the GNU Free Documentation License, 11 Version 1.3 or any later version published by the Free Software 12 Foundation; with no Invariant Sections, with no Front-Cover Texts, 13 and with no Back-Cover Texts. A copy of the license is included in 14 the section entitled "GNU Free Documentation License". 15INFO-DIR-SECTION DOS 16START-INFO-DIR-ENTRY 17* Mtools: (mtools). Mtools: utilities to access DOS disks in Unix. 18END-INFO-DIR-ENTRY 19 20 21File: mtools.info, Node: Top, Next: Location, Prev: (dir), Up: (dir) 22 23Mtools doc 24********** 25 26This is mtools' documentation. 27 28* Menu: 29 30* Location:: 31* Common features:: 32* Configuration:: 33* Commands:: 34* Compiling mtools:: 35* Porting mtools:: 36* Command Index:: 37* Variable Index:: 38* Concept Index:: 39 40Introduction 41************ 42 43Mtools is a collection of tools to allow Unix systems to manipulate 44MS-DOS files: read, write, and move around files on an MS-DOS file 45system (typically a floppy disk). Where reasonable, each program 46attempts to emulate the MS-DOS equivalent command. However, unnecessary 47restrictions and oddities of DOS are not emulated. For instance, it is 48possible to move subdirectories from one subdirectory to another. 49 50 Mtools is sufficient to give access to MS-DOS file systems. For 51instance, commands such as 'mdir a:' work on the 'a:' floppy without any 52preliminary mounting or initialization (assuming the default 53'/etc/mtools.conf' works on your machine). With mtools, one can change 54floppies too without unmounting and mounting. 55 56 This manual is for Mtools (version 4.0.26, November 2020), which is a 57collection of tools to allow Unix systems to manipulate MS-DOS files. 58 59 Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright 60(C) 1996-2005,2007-2011,2013 Alain Knaff. 61 62 Permission is granted to copy, distribute and/or modify this 63 document under the terms of the GNU Free Documentation License, 64 Version 1.3 or any later version published by the Free Software 65 Foundation; with no Invariant Sections, with no Front-Cover Texts, 66 and with no Back-Cover Texts. A copy of the license is included in 67 the section entitled "GNU Free Documentation License". 68 69* Menu: 70 71* Location:: Where to find mtools and early bug fixes 72* Common features:: Common features of all mtools commands 73* Configuration:: How to configure mtools for your environment 74* Commands:: The available mtools commands 75* Compiling mtools:: Architecture specific compilation flags 76* Porting mtools:: Porting mtools to architectures which are not 77 yet supported 78 79* Command Index:: Command Index 80* Variable Index:: Variable Index 81* Concept Index:: Concept Index 82 83 84File: mtools.info, Node: Location, Next: Common features, Prev: Top, Up: Top 85 861 Where to get mtools 87********************* 88 89Mtools can be found at the following places (and their mirrors): 90 http://ftp.gnu.org/gnu/mtools/mtools-4.0.26.tar.gz 91 92 These patches are named 'mtools-'VERSION'-'DDMM'.taz', where version 93stands for the base version, DD for the day and MM for the month. Due 94to a lack of space, I usually leave only the most recent patch. 95 96 There is an mtools mailing list at info-mtools @ gnu.org . Please 97send all bug reports to this list. You may subscribe to the list at 98https://lists.gnu.org/mailman/listinfo/info-mtools. (N.B. Please remove 99the spaces around the "@". I left them there in order to fool 100spambots.) Announcements of new mtools versions will also be sent to 101the list, in addition to the Linux announce newsgroups. The mailing 102list is archived at http://lists.gnu.org/pipermail/info-mtools/ 103 104 105File: mtools.info, Node: Common features, Next: Configuration, Prev: Location, Up: Top 106 1072 Common features of all mtools commands 108**************************************** 109 110* Menu: 111 112* arguments:: What the command line parameters of mtools 113 mean 114* drive letters:: Which drives are defined by default 115* directory:: Current working directory 116* long names:: VFAT-style long filenames 117* name clashes:: Name clash handling, and associated command 118 line options 119* case sensitivity:: Case sensitivity 120* high capacity formats:: How to fit more data on your floppies 121* exit codes:: Exit codes 122* bugs:: Happens to everybody 123 124 125File: mtools.info, Node: arguments, Next: drive letters, Prev: Common features, Up: Common features 126 1272.1 Options and filenames 128========================= 129 130MS-DOS filenames are composed of a drive letter followed by a colon, a 131subdirectory, and a filename. Only the filename part is mandatory, the 132drive letter and the subdirectory are optional. Filenames without a 133drive letter refer to Unix files. Subdirectory names can use either the 134''/'' or ''\'' separator. The use of the ''\'' separator or wildcards 135requires the names to be enclosed in quotes to protect them from the 136shell. However, wildcards in Unix filenames should not be enclosed in 137quotes, because here we *want* the shell to expand them. 138 139 The regular expression "pattern matching" routines follow the 140Unix-style rules. For example, ''*'' matches all MS-DOS files in lieu 141of ''*.*''. The archive, hidden, read-only and system attribute bits 142are ignored during pattern matching. 143 144 All options use the '-' (minus) as their first character, not '/' as 145you'd expect in MS-DOS. 146 147 Most mtools commands allow multiple filename parameters, which 148doesn't follow MS-DOS conventions, but which is more user-friendly. 149 150 Most mtools commands allow options that instruct them how to handle 151file name clashes. *Note name clashes::, for more details on these. 152All commands accept the '-V' flags which prints the version, and most 153accept the '-v' flag, which switches on verbose mode. In verbose mode, 154these commands print out the name of the MS-DOS files upon which they 155act, unless stated otherwise. *Note Commands::, for a description of 156the options which are specific to each command. 157 158 159File: mtools.info, Node: drive letters, Next: directory, Prev: arguments, Up: Common features 160 1612.2 Drive letters 162================= 163 164The meaning of the drive letters depends on the target architectures. 165However, on most target architectures, drive A is the first floppy 166drive, drive B is the second floppy drive (if available), drive J is a 167Jaz drive (if available), and drive Z is a Zip drive (if available). On 168those systems where the device name is derived from the SCSI id, the Jaz 169drive is assumed to be at SCSI target 4, and the Zip at SCSI target 5 170(factory default settings). On Linux, both drives are assumed to be the 171second drive on the SCSI bus (/dev/sdb). The default settings can be 172changes using a configuration file (*note Configuration::). 173 174 The drive letter : (colon) has a special meaning. It is used to 175access image files which are directly specified on the command line 176using the '-i' options. 177 178 Example: 179 mcopy -i my-image-file.bin ::file1 ::file2 . 180 181 This copies 'file1' and 'file2' from the image file 182('my-image-file.bin') to the '/tmp' directory. 183 184 You can also supply an offset within the image file by including 185'@@'OFFSET into the file name. 186 187 Example: 188 mcopy -i my-image-file.bin@@1M ::file1 ::file2 . 189 190 This looks for the image at the offset of 1M in the file, rather than 191at its beginning. 192 193 194File: mtools.info, Node: directory, Next: long names, Prev: drive letters, Up: Common features 195 1962.3 Current working directory 197============================= 198 199The 'mcd' command (*note mcd::) is used to establish the device and the 200current working directory (relative to the MS-DOS file system), 201otherwise the default is assumed to be 'A:/'. However, unlike MS-DOS, 202there is only one working directory for all drives, and not one per 203drive. 204 205 206File: mtools.info, Node: long names, Next: name clashes, Prev: directory, Up: Common features 207 2082.4 VFAT-style long file names 209============================== 210 211This version of mtools supports VFAT style long filenames. If a Unix 212filename is too long to fit in a short DOS name, it is stored as a VFAT 213long name, and a companion short name is generated. This short name is 214what you see when you examine the disk with a pre-7.0 version of DOS. 215The following table shows some examples of short names: 216 217 Long name MS-DOS name Reason for the change 218 --------- ---------- --------------------- 219 thisisatest THISIS~1 filename too long 220 alain.knaff ALAIN~1.KNA extension too long 221 prn.txt PRN~1.TXT PRN is a device name 222 .abc ABC~1 null filename 223 hot+cold HOT_CO~1 illegal character 224 225 As you see, the following transformations happen to derive a short 226name: 227 * Illegal characters are replaced by underscores. The illegal 228 characters are ';+=[]',\"*\\<>/?:|'. 229 * Extra dots, which cannot be interpreted as a main name/extension 230 separator are removed 231 * A '~'N number is generated, 232 * The name is shortened so as to fit in the 8+3 limitation 233 234 The initial Unix-style file name (whether long or short) is also 235called the "primary" name, and the derived short name is also called the 236"secondary" name. 237 238 Example: 239 mcopy /etc/motd a:Reallylongname 240 Mtools creates a VFAT entry for Reallylongname, and uses REALLYLO as 241a short name. Reallylongname is the primary name, and REALLYLO is the 242secondary name. 243 mcopy /etc/motd a:motd 244 Motd fits into the DOS filename limits. Mtools doesn't need to 245derivate another name. Motd is the primary name, and there is no 246secondary name. 247 248 In a nutshell: The primary name is the long name, if one exists, or 249the short name if there is no long name. 250 251 Although VFAT is much more flexible than FAT, there are still names 252that are not acceptable, even in VFAT. There are still some illegal 253characters left ('\"*\\<>/?:|'), and device names are still reserved. 254 255 Unix name Long name Reason for the change 256 --------- ---------- --------------------- 257 prn prn-1 PRN is a device name 258 ab:c ab_c-1 illegal character 259 260 As you see, the following transformations happen if a long name is 261illegal: 262 * Illegal characters are replaces by underscores, 263 * A '-'N number is generated, 264 265 266File: mtools.info, Node: name clashes, Next: case sensitivity, Prev: long names, Up: Common features 267 2682.5 Name clashes 269================ 270 271When writing a file to disk, its long name or short name may collide 272with an already existing file or directory. This may happen for all 273commands which create new directory entries, such as 'mcopy', 'mmd', 274'mren', 'mmove'. When a name clash happens, mtools asks you what it 275should do. It offers several choices: 276 277'overwrite' 278 Overwrites the existing file. It is not possible to overwrite a 279 directory with a file. 280'rename' 281 Renames the newly created file. Mtools prompts for the new 282 filename 283'autorename' 284 Renames the newly created file. Mtools chooses a name by itself, 285 without prompting 286'skip' 287 Gives up on this file, and moves on to the next (if any) 288 289 To chose one of these actions, type its first letter at the prompt. 290If you use a lower case letter, the action only applies for this file 291only, if you use an upper case letter, the action applies to all files, 292and you won't be prompted again. 293 294 You may also chose actions (for all files) on the command line, when 295invoking mtools: 296 297'-D o' 298 Overwrites primary names by default. 299'-D O' 300 Overwrites secondary names by default. 301'-D r' 302 Renames primary name by default. 303'-D R' 304 Renames secondary name by default. 305'-D a' 306 Autorenames primary name by default. 307'-D A' 308 Autorenames secondary name by default. 309'-D s' 310 Skip primary name by default. 311'-D S' 312 Skip secondary name by default. 313'-D m' 314 Ask user what to do with primary name. 315'-D M' 316 Ask user what to do with secondary name. 317 318 Note that for command line switches lower/upper differentiates 319between primary/secondary name whereas for interactive choices, 320lower/upper differentiates between just-this-time/always. 321 322 The primary name is the name as displayed in Windows 95 or Windows 323NT: i.e. the long name if it exists, and the short name otherwise. The 324secondary name is the "hidden" name, i.e. the short name if a long name 325exists. 326 327 By default, the user is prompted if the primary name clashes, and the 328secondary name is autorenamed. 329 330 If a name clash occurs in a Unix directory, mtools only asks whether 331to overwrite the file, or to skip it. 332 333 334File: mtools.info, Node: case sensitivity, Next: high capacity formats, Prev: name clashes, Up: Common features 335 3362.6 Case sensitivity of the VFAT file system 337============================================ 338 339The VFAT file system is able to remember the case of the filenames. 340However, filenames which differ only in case are not allowed to coexist 341in the same directory. For example if you store a file called 342LongFileName on a VFAT file system, mdir shows this file as 343LongFileName, and not as Longfilename. However, if you then try to add 344LongFilename to the same directory, it is refused, because case is 345ignored for clash checks. 346 347 The VFAT file system allows you to store the case of a filename in 348the attribute byte, if all letters of the filename are the same case, 349and if all letters of the extension are the same case too. Mtools uses 350this information when displaying the files, and also to generate the 351Unix filename when mcopying to a Unix directory. This may have 352unexpected results when applied to files written using an pre-7.0 353version of DOS: Indeed, the old style filenames map to all upper case. 354This is different from the behavior of the old version of mtools which 355used to generate lower case Unix filenames. 356 357 358File: mtools.info, Node: high capacity formats, Next: exit codes, Prev: case sensitivity, Up: Common features 359 3602.7 high capacity formats 361========================= 362 363Mtools supports a number of formats which allow storage of more data on 364disk than usual. Due to different operating system abilities, these 365formats are not supported on all operating systems. Mtools recognizes 366these formats transparently where supported. 367 368 In order to format these disks, you need to use an operating system 369specific tool. For Linux, suitable floppy tools can be found in the 370'fdutils' package at the following locations~: 371 http://www.fdutils.linux.lu/. 372 373 See the manual pages included in that package for further detail: Use 374'superformat' to format all formats except XDF, and use 'xdfcopy' to 375format XDF. 376 377* Menu: 378 379* more sectors:: Putting more sectors per track on the disk 380* bigger sectors:: Use bigger sectors to save header space 381* 2m:: Use a standard first track 382* XDF:: OS/2's eXtended density format 383 384 385File: mtools.info, Node: more sectors, Next: bigger sectors, Prev: high capacity formats, Up: high capacity formats 386 3872.7.1 More sectors 388------------------ 389 390The oldest method of fitting more data on a disk is to use more sectors 391and more cylinders. Although the standard format uses 80 cylinders and 39218 sectors (on a 3 1/2 high density disk), it is possible to use up to 39383 cylinders (on most drives) and up to 21 sectors. This method allows 394to store up to 1743K on a 3 1/2 HD disk. However, 21 sector disks are 395twice as slow as the standard 18 sector disks because the sectors are 396packed so close together that we need to interleave them. This problem 397doesn't exist for 20 sector formats. 398 399 These formats are supported by numerous DOS shareware utilities such 400as 'fdformat' and 'vgacopy'. In his infinite hubris, Bill Gate$ 401believed that he invented this, and called it 'DMF disks', or 'Windows 402formatted disks'. But in reality, it has already existed years before! 403Mtools supports these formats on Linux, on SunOS and on the DELL Unix 404PC. 405 406 407File: mtools.info, Node: bigger sectors, Next: 2m, Prev: more sectors, Up: high capacity formats 408 4092.7.2 Bigger sectors 410-------------------- 411 412By using bigger sectors it is possible to go beyond the capacity which 413can be obtained by the standard 512-byte sectors. This is because of 414the sector header. The sector header has the same size, regardless of 415how many data bytes are in the sector. Thus, we save some space by 416using _fewer_, but bigger sectors. For example, 1 sector of 4K only 417takes up header space once, whereas 8 sectors of 512 bytes have also 8 418headers, for the same amount of useful data. 419 420 This method permits storage of up to 1992K on a 3 1/2 HD disk. 421 422 Mtools supports these formats only on Linux. 423 424 425File: mtools.info, Node: 2m, Next: XDF, Prev: bigger sectors, Up: high capacity formats 426 4272.7.3 2m 428-------- 429 430The 2m format was originally invented by Ciriaco Garcia de Celis. It 431also uses bigger sectors than usual in order to fit more data on the 432disk. However, it uses the standard format (18 sectors of 512 bytes 433each) on the first cylinder, in order to make these disks easier to 434handle by DOS. Indeed this method allows you to have a standard sized 435boot sector, which contains a description of how the rest of the disk 436should be read. 437 438 However, the drawback of this is that the first cylinder can hold 439less data than the others. Unfortunately, DOS can only handle disks 440where each track contains the same amount of data. Thus 2m hides the 441fact that the first track contains less data by using a "shadow FAT". 442(Usually, DOS stores the FAT in two identical copies, for additional 443safety. XDF stores only one copy, but tells DOS that it stores two. 444Thus the space that would be taken up by the second FAT copy is saved.) 445This also means that you should *never use a 2m disk to store anything 446else than a DOS file system*. 447 448 Mtools supports these formats only on Linux. 449 450 451File: mtools.info, Node: XDF, Prev: 2m, Up: high capacity formats 452 4532.7.4 XDF 454--------- 455 456XDF is a high capacity format used by OS/2. It can hold 1840 K per 457disk. That's lower than the best 2m formats, but its main advantage is 458that it is fast: 600 milliseconds per track. That's faster than the 21 459sector format, and almost as fast as the standard 18 sector format. In 460order to access these disks, make sure mtools has been compiled with XDF 461support, and set the 'use_xdf' variable for the drive in the 462configuration file. *Note Compiling mtools::, and *note miscellaneous 463variables::, for details on how to do this. Fast XDF access is only 464available for Linux kernels which are more recent than 1.1.34. 465 466 Mtools supports this format only on Linux. 467 468 *Caution / Attention distributors*: If mtools is compiled on a Linux 469kernel more recent than 1.3.34, it won't run on an older kernel. 470However, if it has been compiled on an older kernel, it still runs on a 471newer kernel, except that XDF access is slower. It is recommended that 472distribution authors only include mtools binaries compiled on kernels 473older than 1.3.34 until 2.0 comes out. When 2.0 will be out, mtools 474binaries compiled on newer kernels may (and should) be distributed. 475Mtools binaries compiled on kernels older than 1.3.34 won't run on any 4762.1 kernel or later. 477 478 479File: mtools.info, Node: exit codes, Next: bugs, Prev: high capacity formats, Up: Common features 480 4812.8 Exit codes 482============== 483 484All the Mtools commands return 0 on success, 1 on utter failure, or 2 on 485partial failure. All the Mtools commands perform a few sanity checks 486before going ahead, to make sure that the disk is indeed an MS-DOS disk 487(as opposed to, say an ext2 or MINIX disk). These checks may reject 488partially corrupted disks, which might otherwise still be readable. To 489avoid these checks, set the MTOOLS_SKIP_CHECK environmental variable or 490the corresponding configuration file variable (*note global variables::) 491 492 493File: mtools.info, Node: bugs, Prev: exit codes, Up: Common features 494 4952.9 Bugs 496======== 497 498An unfortunate side effect of not guessing the proper device (when 499multiple disk capacities are supported) is an occasional error message 500from the device driver. These can be safely ignored. 501 502 The fat checking code chokes on 1.72 Mb disks mformatted with 503pre-2.0.7 mtools. Set the environmental variable 504MTOOLS_FAT_COMPATIBILITY (or the corresponding configuration file 505variable, *note global variables::) to bypass the fat checking. 506 507 508File: mtools.info, Node: Configuration, Next: Commands, Prev: Common features, Up: Top 509 5103 How to configure mtools for your environment 511********************************************** 512 513* Menu: 514 515* configuration file location:: 516* default values:: 517* global variables:: 518* per drive variables:: 519* parsing order:: 520* old style configuration:: 521 5223.1 Description 523=============== 524 525This sections explains the syntax of the configurations files for 526mtools. The configuration files are called '/etc/mtools.conf' and 527'~/.mtoolsrc'. If the environmental variable 'MTOOLSRC' is set, its 528contents is used as the filename for a third configuration file. These 529configuration files describe the following items: 530 531 * Global configuration flags and variables 532 * Per drive flags and variables 533 534* Menu: 535 536* configuration file location:: Where mtools looks for its configuration files 537* general syntax:: The layout of the configuration files 538* default values:: Why you don't need a configuration file in most cases 539* global variables:: Variables that are independent of the drive 540* per drive variables:: Variables that are specific to a given drive 541* parsing order:: Location of configuration files and parsing order 542* old style configuration:: Backwards compatibility 543 544 545File: mtools.info, Node: configuration file location, Next: general syntax, Prev: Configuration, Up: Configuration 546 5473.2 Location of the configuration files 548======================================= 549 550'/etc/mtools.conf' is the system-wide configuration file, and 551'~/.mtoolsrc' is the user's private configuration file. 552 553 On some systems, the system-wide configuration file is called 554'/etc/default/mtools.conf' instead. 555 556* Menu: 557 558* general syntax:: 559 560 561File: mtools.info, Node: general syntax, Next: default values, Prev: configuration file location, Up: Configuration 562 5633.2.1 General configuration file syntax 564--------------------------------------- 565 566The configuration files is made up of sections. Each section starts 567with a keyword identifying the section followed by a colon. Then follow 568variable assignments and flags. Variable assignments take the following 569form: 570 name=value 571 Flags are lone keywords without an equal sign and value following 572them. A section either ends at the end of the file or where the next 573section begins. 574 575 Lines starting with a hash ('#') are comments. Newline characters 576are equivalent to whitespace (except where ending a comment). The 577configuration file is case insensitive, except for item enclosed in 578quotes (such as filenames). 579 580 581File: mtools.info, Node: default values, Next: global variables, Prev: general syntax, Up: Configuration 582 5833.3 Default values 584================== 585 586For most platforms, mtools contains reasonable compiled-in defaults for 587physical floppy drives. Thus, you usually don't need to bother with the 588configuration file, if all you want to do with mtools is to access your 589floppy drives. On the other hand, the configuration file is needed if 590you also want to use mtools to access your hard disk partitions and 591DOSEMU image files. 592 593 594File: mtools.info, Node: global variables, Next: per drive variables, Prev: default values, Up: Configuration 595 5963.4 Global variables 597==================== 598 599Global flags may be set to 1 or to 0. 600 601 The following global flags are recognized: 602 603'MTOOLS_SKIP_CHECK' 604 If this is set to 1, mtools skips most of its sanity checks. This 605 is needed to read some Atari disks which have been made with the 606 earlier ROMs, and which would not be recognized otherwise. 607'MTOOLS_FAT_COMPATIBILITY' 608 If this is set to 1, mtools skips the fat size checks. Some disks 609 have a bigger FAT than they really need to. These are rejected if 610 this option is not set. 611'MTOOLS_LOWER_CASE' 612 If this is set to 1, mtools displays all-upper-case short filenames 613 as lowercase. This has been done to allow a behavior which is 614 consistent with older versions of mtools which didn't know about 615 the case bits. 616'MTOOLS_NO_VFAT' 617 If this is set to 1, mtools won't generate VFAT entries for 618 filenames which are mixed-case, but otherwise legal dos filenames. 619 This is useful when working with DOS versions which can't grok VFAT 620 long names, such as FreeDOS. 621'MTOOLS_DOTTED_DIR' 622 In a wide directory, prints the short name with a dot instead of 623 spaces separating the basename and the extension. 624'MTOOLS_NAME_NUMERIC_TAIL' 625 If this is set to one (default), generate numeric tails for all 626 long names (~1). If set to zero, only generate numeric tails if 627 otherwise a clash would have happened. 628'MTOOLS_TWENTY_FOUR_HOUR_CLOCK' 629 If 1, uses the European notation for times (twenty four hour 630 clock), else uses the UK/US notation (am/pm) 631'MTOOLS_LOCK_TIMEOUT' 632 How long, in seconds, to wait for a locked device to become free. 633 Defaults to 30. 634 635 Example: Inserting the following line into your configuration file 636instructs mtools to skip the sanity checks: 637 MTOOLS_SKIP_CHECK=1 638 639 Global variables may also be set via the environment: 640 export MTOOLS_SKIP_CHECK=1 641 642 Global string variables may be set to any value: 643'MTOOLS_DATE_STRING' 644 The format used for printing dates of files. By default, is 645 dd-mm-yyyy. 646 647 648File: mtools.info, Node: per drive variables, Next: parsing order, Prev: global variables, Up: Configuration 649 6503.5 Per drive flags and variables 651================================= 652 653* Menu: 654 655* general information:: What a drive description looks like 656* location information:: Where is the drive data physically stored 657* geometry description:: Describes the physical characteristics of 658 the media 659* open flags:: Flags passed to the open system call when the 660 device is opened 661* miscellaneous variables:: Variables which don't fit in either category 662* miscellaneous flags:: Switch variables, which can be enabled or disabled 663* multiple descriptions:: How to supply several descriptions for a 664 drive, to be tried one after the other. 665 666 667File: mtools.info, Node: general information, Next: location information, Prev: per drive variables, Up: per drive variables 668 6693.5.1 General information 670------------------------- 671 672Per drive flags and values may be described in a drive section. A drive 673section starts with 'drive' "DRIVELETTER" : 674 675 Then follow variable-value pairs and flags. 676 677 This is a sample drive description: 678 drive a: 679 file="/dev/fd0" use_xdf=1 680 681 682File: mtools.info, Node: location information, Next: geometry description, Prev: general information, Up: per drive variables 683 6843.5.2 Location information 685-------------------------- 686 687For each drive, you need to describe where its data is physically stored 688(image file, physical device, partition, offset). 689 690'file' 691 The name of the file or device holding the disk image. This is 692 mandatory. The file name should be enclosed in quotes. 693 694'partition' 695 Tells mtools to treat the drive as a partitioned device, and to use 696 the given partition. Only primary partitions are accessible using 697 this method, and they are numbered from 1 to 4. For logical 698 partitions, use the more general 'offset' variable. The 699 'partition' variable is intended for removable media such as 700 Syquest disks, ZIP drives, and magneto-optical disks. Although 701 traditional DOS sees Syquest disks and magneto-optical disks as 702 'giant floppy disks' which are unpartitioned, OS/2 and Windows NT 703 treat them like hard disks, i.e. partitioned devices. The 704 'partition' flag is also useful DOSEMU hdimages. It is not 705 recommended for hard disks for which direct access to partitions is 706 available through mounting. 707 708'offset' 709 Describes where in the file the MS-DOS file system starts. This is 710 useful for logical partitions in DOSEMU hdimages, and for ATARI ram 711 disks. By default, this is zero, meaning that the file system 712 starts right at the beginning of the device or file. 713 714 715File: mtools.info, Node: geometry description, Next: open flags, Prev: location information, Up: per drive variables 716 7173.5.3 Disk Geometry Configuration 718--------------------------------- 719 720Geometry information describes the physical characteristics about the 721disk. Its has three purposes: 722 723formatting 724 The geometry information is written into the boot sector of the 725 newly made disk. However, you may also describe the geometry 726 information on the command line. *Note mformat::, for details. 727filtering 728 On some Unixes there are device nodes which only support one 729 physical geometry. For instance, you might need a different node 730 to access a disk as high density or as low density. The geometry 731 is compared to the actual geometry stored on the boot sector to 732 make sure that this device node is able to correctly read the disk. 733 If the geometry doesn't match, this drive entry fails, and the next 734 drive entry bearing the same drive letter is tried. *Note multiple 735 descriptions::, for more details on supplying several descriptions 736 for one drive letter. 737 738 If no geometry information is supplied in the configuration file, 739 all disks are accepted. On Linux (and on SPARC) there exist device 740 nodes with configurable geometry ('/dev/fd0', '/dev/fd1' etc), and 741 thus filtering is not needed (and ignored) for disk drives. 742 (Mtools still does do filtering on plain files (disk images) in 743 Linux: this is mainly intended for test purposes, as I don't have 744 access to a Unix which would actually need filtering). 745 746 If you do not need filtering, but want still a default geometry for 747 mformatting, you may switch off filtering using the 'mformat_only' 748 flag. 749 750 If you want filtering, you should supply the 'filter' flag. If you 751 supply a geometry, you must supply one of both flags. 752 753initial geometry 754 On devices that support it (usually floppy devices), the geometry 755 information is also used to set the initial geometry. This initial 756 geometry is applied while reading the boot sector, which contains 757 the real geometry. If no geometry information is supplied in the 758 configuration file, or if the 'mformat_only' flag is supplied, no 759 initial configuration is done. 760 761 On Linux, initial geometry is not really needed, as the 762 configurable devices are able to auto-detect the disk type 763 accurately enough (for most common formats) to read the boot 764 sector. 765 766 Wrong geometry information may lead to very bizarre errors. That's 767why I strongly recommend that you add the 'mformat_only' flag to your 768drive description, unless you really need filtering or initial geometry. 769 770 The following geometry related variables are available: 771 772'cylinders' 773'tracks' 774 The number of cylinders. ('cylinders' is the preferred form, 775 'tracks' is considered obsolete) 776'heads' 777 The number of heads (sides). 778'sectors' 779 The number of sectors per track. 780 781 Example: the following drive section describes a 1.44M drive: 782 783 drive a: 784 file="/dev/fd0H1440" 785 fat_bits=12 786 cylinders=80 heads=2 sectors=18 787 mformat_only 788 789 The following shorthand geometry descriptions are available: 790 791'1.44m' 792 high density 3 1/2 disk. Equivalent to: 'fat_bits=12 cylinders=80 793 heads=2 sectors=18' 794'1.2m' 795 high density 5 1/4 disk. Equivalent to: 'fat_bits=12 cylinders=80 796 heads=2 sectors=15' 797'720k' 798 double density 3 1/2 disk. Equivalent to: 'fat_bits=12 799 cylinders=80 heads=2 sectors=9' 800'360k' 801 double density 5 1/4 disk. Equivalent to: 'fat_bits=12 802 cylinders=40 heads=2 sectors=9' 803 804 The shorthand format descriptions may be amended. For example, '360k 805sectors=8' describes a 320k disk and is equivalent to: 'fat_bits=12 806cylinders=40 heads=2 sectors=8' 807 808 809File: mtools.info, Node: open flags, Next: miscellaneous variables, Prev: geometry description, Up: per drive variables 810 8113.5.4 Open Flags 812---------------- 813 814Moreover, the following flags are available: 815 816'sync' 817 All i/o operations are done synchronously 818'nodelay' 819 The device or file is opened with the O_NDELAY flag. This is 820 needed on some non-Linux architectures. 821'exclusive' 822 The device or file is opened with the O_EXCL flag. On Linux, this 823 ensures exclusive access to the floppy drive. On most other 824 architectures, and for plain files it has no effect at all. 825 826 827File: mtools.info, Node: miscellaneous variables, Next: miscellaneous flags, Prev: open flags, Up: per drive variables 828 8293.5.5 General Purpose Drive Variables 830------------------------------------- 831 832The following general purpose drive variables are available. Depending 833to their type, these variables can be set to a string (precmd) or an 834integer (all others) 835 836'fat_bits' 837 The number of FAT bits. This may be 12 or 16. This is very rarely 838 needed, as it can almost always be deduced from information in the 839 boot sector. On the contrary, describing the number of fat bits 840 may actually be harmful if you get it wrong. You should only use 841 it if mtools gets the auto-detected number of fat bits wrong, or if 842 you want to mformat a disk with a weird number of fat bits. 843'codepage' 844 Describes the DOS code page used for short filenames. This is a 845 number between 1 and 999. By default, code page 850 is used. The 846 reason for this is because this code page contains most of the 847 characters that are also available in ISO-Latin-1. You may also 848 specify a global code page for all drives by using the global 849 'default_codepage' parameter (outside of any drive description). 850 This parameters exists starting at version 4.0.0 851'precmd' 852 On some variants of Solaris, it is necessary to call 'volcheck -v' 853 before opening a floppy device, in order for the system to notice 854 that there is indeed a disk in the drive. 'precmd="volcheck -v"' 855 in the drive clause establishes the desired behavior. 856 857'blocksize' 858 This parameter represents a default block size to be always used on 859 this device. All I/O is done with multiples of this block size, 860 independently of the sector size registered in the file system's 861 boot sector. This is useful for character devices whose sector 862 size is not 512, such as for example CD-ROM drives on Solaris. 863 864 Only the 'file' variable is mandatory. The other parameters may be 865left out. In that case a default value or an auto-detected value is 866used. 867 868 869File: mtools.info, Node: miscellaneous flags, Next: multiple descriptions, Prev: miscellaneous variables, Up: per drive variables 870 8713.5.6 General Purpose Drive Flags 872--------------------------------- 873 874A flag can either be set to 1 (enabled) or 0 (disabled). If the value 875is omitted, it is enabled. For example, 'scsi' is equivalent to 876'scsi=1' 877 878'nolock' 879 Instruct mtools to not use locking on this drive. This is needed 880 on systems with buggy locking semantics. However, enabling this 881 makes operation less safe in cases where several users may access 882 the same drive at the same time. 883 884'scsi' 885 When set to 1, this option tells mtools to use raw SCSI I/O instead 886 of the standard read/write calls to access the device. Currently, 887 this is supported on HP-UX, Solaris and SunOS. This is needed 888 because on some architectures, such as SunOS or Solaris, PC media 889 can't be accessed using the 'read' and 'write' system calls, 890 because the OS expects them to contain a Sun specific "disk label". 891 892 As raw SCSI access always uses the whole device, you need to 893 specify the "partition" flag in addition 894 895 On some architectures, such as Solaris, mtools needs root 896 privileges to be able to use the 'scsi' option. Thus mtools should 897 be installed setuid root on Solaris if you want to access Zip/Jaz 898 drives. Thus, if the 'scsi' flag is given, 'privileged' is 899 automatically implied, unless explicitly disabled by 'privileged=0' 900 901 Mtools uses its root privileges to open the device, and to issue 902 the actual SCSI I/O calls. Moreover, root privileges are only used 903 for drives described in a system-wide configuration file such as 904 '/etc/mtools.conf', and not for those described in '~/.mtoolsrc' or 905 '$MTOOLSRC'. 906 907'privileged' 908 When set to 1, this instructs mtools to use its setuid and setgid 909 privileges for opening the given drive. This option is only valid 910 for drives described in the system-wide configuration files (such 911 as '/etc/mtools.conf', not '~/.mtoolsrc' or '$MTOOLSRC'). 912 Obviously, this option is also a no op if mtools is not installed 913 setuid or setgid. This option is implied by 'scsi=1', but again 914 only for drives defined in system-wide configuration files. 915 Privileged may also be set explicitly to 0, in order to tell mtools 916 not to use its privileges for a given drive even if 'scsi=1' is 917 set. 918 919 Mtools only needs to be installed setuid if you use the 920 'privileged' or 'scsi' drive variables. If you do not use these 921 options, mtools works perfectly well even when not installed setuid 922 root. 923 924'vold' 925 926 Instructs mtools to interpret the device name as a vold identifier 927 rather than as a filename. The vold identifier is translated into 928 a real filename using the 'media_findname()' and 929 'media_oldaliases()' functions of the 'volmgt' library. This flag 930 is only available if you configured mtools with the 931 '--enable-new-vold' option before compilation. 932 933'swap' 934 935 Consider the media as a word-swapped Atari disk. 936 937'use_xdf' 938 If this is set to a non-zero value, mtools also tries to access 939 this disk as an XDF disk. XDF is a high capacity format used by 940 OS/2. This is off by default. *Note XDF::, for more details. 941'mformat_only' 942 Tells mtools to use the geometry for this drive only for 943 mformatting and not for filtering. 944 945'filter' 946 Tells mtools to use the geometry for this drive both for 947 mformatting and filtering. 948 949'remote' 950 Tells mtools to connect to floppyd (*note floppyd::). 951 952 953File: mtools.info, Node: multiple descriptions, Prev: miscellaneous flags, Up: per drive variables 954 9553.5.7 Supplying multiple descriptions for a drive 956------------------------------------------------- 957 958It is possible to supply multiple descriptions for a drive. In that 959case, the descriptions are tried in order until one is found that fits. 960Descriptions may fail for several reasons: 961 962 1. because the geometry is not appropriate, 963 2. because there is no disk in the drive, 964 3. or because of other problems. 965 966 Multiple definitions are useful when using physical devices which are 967only able to support one single disk geometry. Example: 968 drive a: file="/dev/fd0H1440" 1.44m 969 drive a: file="/dev/fd0H720" 720k 970 971 This instructs mtools to use /dev/fd0H1440 for 1.44m (high density) 972disks and /dev/fd0H720 for 720k (double density) disks. On Linux, this 973feature is not really needed, as the /dev/fd0 device is able to handle 974any geometry. 975 976 You may also use multiple drive descriptions to access both of your 977physical drives through one drive letter: 978 979 drive z: file="/dev/fd0" 980 drive z: file="/dev/fd1" 981 982 With this description, 'mdir z:' accesses your first physical drive 983if it contains a disk. If the first drive doesn't contain a disk, 984mtools checks the second drive. 985 986 When using multiple configuration files, drive descriptions in the 987files parsed last override descriptions for the same drive in earlier 988files. In order to avoid this, use the 'drive+' or '+drive' keywords 989instead of 'drive'. The first adds a description to the end of the list 990(i.e. it will be tried last), and the first adds it to the start of the 991list. 992 993 994File: mtools.info, Node: parsing order, Next: old style configuration, Prev: per drive variables, Up: Configuration 995 9963.6 Location of configuration files and parsing order 997===================================================== 998 999The configuration files are parsed in the following order: 1000 1. compiled-in defaults 1001 2. '/etc/mtools.conf' 1002 3. '~/.mtoolsrc'. 1003 4. '$MTOOLSRC' (file pointed by the 'MTOOLSRC' environmental variable) 1004 1005 Options described in the later files override those described in the 1006earlier files. Drives defined in earlier files persist if they are not 1007overridden in the later files. For instance, drives A and B may be 1008defined in '/etc/mtools.conf' and drives C and D may be defined in 1009'~/.mtoolsrc' However, if '~/.mtoolsrc' also defines drive A, this new 1010description would override the description of drive A in 1011'/etc/mtools.conf' instead of adding to it. If you want to add a new 1012description to a drive already described in an earlier file, you need to 1013use either the '+drive' or 'drive+' keyword. 1014 1015 1016File: mtools.info, Node: old style configuration, Prev: parsing order, Up: Configuration 1017 10183.7 Backwards compatibility with old configuration file syntax 1019============================================================== 1020 1021The syntax described herein is new for version 'mtools-3.0'. The old 1022line-oriented syntax is still supported. Each line beginning with a 1023single letter is considered to be a drive description using the old 1024syntax. Old style and new style drive sections may be mixed within the 1025same configuration file, in order to make upgrading easier. Support for 1026the old syntax will be phased out eventually, and in order to discourage 1027its use, I purposefully omit its description here. 1028 1029 1030File: mtools.info, Node: Commands, Next: Compiling mtools, Prev: Configuration, Up: Top 1031 10324 Command list 1033************** 1034 1035This section describes the available mtools commands, and the command 1036line parameters that each of them accepts. Options which are common to 1037all mtools commands are not described here, *note arguments:: for a 1038description of those. 1039 1040* Menu: 1041 1042* floppyd:: floppy daemon to run on your X server box 1043* floppyd_installtest:: small utility to check for the presence of floppyd 1044* mattrib:: change MS-DOS file attribute flags 1045* mbadblocks:: tests a floppy disk, and marks the bad blocks in the FAT 1046* mcat:: same as cat. Only useful with floppyd. 1047* mcd:: change MS-DOS directory 1048* mclasserase:: erase memory card 1049* mcopy:: copy MS-DOS files to/from Unix 1050* mdel:: delete an MS-DOS file 1051* mdeltree:: recursively delete an MS-DOS directory 1052* mdir:: display an MS-DOS directory 1053* mdu:: list space occupied by directory and its contents 1054* mformat:: add an MS-DOS file system to a low-level formatted floppy disk 1055* minfo:: get information about an MS-DOS file system. 1056* mlabel:: make an MS-DOS volume label 1057* mkmanifest:: makes a list of short name equivalents 1058* mmd:: make an MS-DOS subdirectory 1059* mmount:: mount an MS-DOS disk 1060* mpartition:: create an MS-DOS as a partition 1061* mrd:: remove an MS-DOS subdirectory 1062* mmove:: move or rename an MS-DOS file or subdirectory 1063* mren:: rename an existing MS-DOS file 1064* mshortname:: shows the short name of a file 1065* mshowfat:: shows the FAT map of a file 1066* mtoolstest:: tests and displays the configuration 1067* mtype:: display contents of an MS-DOS file 1068* mzip:: zip disk specific commands 1069 1070 1071File: mtools.info, Node: floppyd, Next: floppyd_installtest, Prev: Commands, Up: Commands 1072 10734.1 Floppyd 1074=========== 1075 1076'Floppyd' is used as a server to grant access to the floppy drive to 1077clients running on a remote machine, just as an X server grants access 1078to the display to remote clients. It has the following syntax: 1079 1080 'floppyd' ['-d'] ['-l'] ['-s' PORT] ['-r' USER] ['-b' IPADDR] ['-x' 1081DISPLAY] DEVICENAMES 1082 1083 'floppyd' is always associated with an X server. It runs on the same 1084machine as its X server, and listens on port 5703 and above. 1085 10864.1.1 Authentication 1087-------------------- 1088 1089'floppyd' authenticates remote clients using the 'Xauthority' protocol. 1090Xhost authentication is not supported. Each floppyd is associated with 1091an X server. When a remote client attempts to connect to floppyd, it 1092sends floppyd the X authority record corresponding to floppyd's X 1093server. Floppyd in turn then tries to open up a connection to the X 1094server in order to verify the authenticity of the xauth record. If the 1095connection to the X server succeeds, the client is granted access. 1096'DISPLAY'. 1097 1098 *Caution*: In order to make authentication work correctly, the local 1099host should *not* be listed in the 'xhost' list of allowed hosts. 1100Indeed, hosts listed in 'xhost' do not need a correct 'Xauthority' 1101cookie to connect to the X server. As 'floppyd' runs on the same host 1102as the X server, all its probe connection would succeed even for clients 1103who supplied a bad cookie. This means that your floppy drive would be 1104open to the world, i.e. a huge security hole. If your X server does 1105not allow you to remove 'localhost:0' and ':0' from the 'xhost' list, 1106you can prevent floppyd from probing those display names with the '-l' 1107option. 1108 11094.1.2 Command line options 1110-------------------------- 1111 1112'd' 1113 Daemon mode. Floppyd runs its own server loop. Do not supply this 1114 if you start floppyd from 'inetd.conf' 1115's PORT' 1116 Port number for daemon mode. Default is 5703 + DISPLAYNUMBER. 1117 This flag implies daemon mode. For example, for display 1118 'hitchhiker:5', the port would be 5708. 1119'b IPADDR' 1120 Bind address (for multi homed hosts). This flag implies daemon 1121 mode 1122'r USER' 1123 Run the server under as the given user 1124'x DISPLAY' 1125 X display to use for authentication. By default, this is taken 1126 from the 'DISPLAY' variable. If neither the 'x' attribute is 1127 present nor 'DISPLAY' is set, floppyd uses ':0.0'. 1128 1129 DEVICENAMES is a list of device nodes to be opened. Default is 1130'/dev/fd0'. Multiple devices are only supported on mtools versions 1131newer than 3.9.11. 1132 11334.1.3 Connecting to floppyd 1134--------------------------- 1135 1136In order to use floppyd, add the flag 'remote' to the device description 1137in your '~/.mtoolsrc' file. If the flag 'remote' is given, the 'file' 1138parameter of the device description is taken to be a remote address. 1139It's format is the following: 1140HOSTNAME':'DISPLAYNUMBER['/'[BASEPORT]['/'DRIVE]]. When using this 1141entry, mtools connects to port BASEPORT+DISPLAYNUMBER at HOSTNAME. By 1142default BASEPORT is 5703. The drive parameter is to distinguish among 1143multiple drives associated with a single display (only mtools versions 1144more recent than 3.9.11) 1145 11464.1.4 Examples: 1147--------------- 1148 1149The following starts a floppy daemon giving access to '/dev/fd0', 1150listening on the default port 5703, tied to the default X servers: 1151 1152 floppyd -d /dev/fd0 1153 1154 Each of the following starts a floppy daemon giving access to 1155'/dev/fd1', tied to the :1 local X servers, and listening on port 5704. 1156We assume that the local host is named 'hitchhiker'. 1157 1158 floppyd -d /dev/fd0 1159 floppyd -d -x :1 -p 5704 /dev/fd0 1160 1161 If you want to start floppyd by 'inetd' instead of running it as a 1162daemon, insert the following lines into '/etc/services': 1163 # floppy daemon 1164 floppyd-0 5703/tcp # floppy daemon for X server :0 1165 floppyd-1 5704/tcp # floppy daemon for X server :1 1166 1167 And insert the following into '/etc/inetd.conf' (assuming that you 1168have defined a user named floppy in your '/etc/passwd'): 1169 1170 # floppy daemon 1171 floppyd-0 stream tcp wait floppy /usr/sbin/floppyd floppyd /dev/fd0 1172 floppyd-1 stream tcp wait floppy /usr/sbin/floppyd floppyd -x :1 /dev/fd0 1173 1174 Note that you need to supply the X display names for the second 1175floppyd. This is because the port is opened by inetd.conf, and hence 1176floppyd cannot know its number to interfere the display number. 1177 1178 On the client side, insert the following into your '~/.mtoolsrc' to 1179define a drive letter accessing floppy drive in your X terminal: 1180 drive x: file="$DISPLAY" remote 1181 1182 If your X terminal has more than one drive, you may access the 1183additional drives as follows: 1184 drive y: file="$DISPLAY//1" remote 1185 drive z: file="$DISPLAY//2" remote 1186 1187 1188File: mtools.info, Node: floppyd_installtest, Next: mattrib, Prev: floppyd, Up: Commands 1189 11904.2 Floppyd_installtest 1191======================= 1192 1193'Floppyd_installtest' is used to check for the presence of a running 1194floppyd daemon. This is useful, if you have a small front-end script to 1195mtools, which decides whether to use floppyd or not. 1196 1197 'floppyd_installtest' ['-f'] Connect-String 1198 1199 If the '-f' option is specified, 'floppyd_installtest' does a full 1200X-Cookie authentication and complains if this does not work. 1201 1202 The connect-String has the format described in the floppyd-section: 1203HOSTNAME':'DISPLAYNUMBER['/'BASEPORT] 1204 1205 1206File: mtools.info, Node: mattrib, Next: mbadblocks, Prev: floppyd_installtest, Up: Commands 1207 12084.3 Mattrib 1209=========== 1210 1211'Mattrib' is used to change MS-DOS file attribute flags. It has the 1212following syntax: 1213 1214 'mattrib' ['-a|+a'] ['-h|+h'] ['-r|+r'] ['-s|+s'] ['-/'] ['-p'] 1215['-X'] MSDOSFILE [ MSDOSFILES ... ] 1216 1217 'Mattrib' adds attribute flags to an MS-DOS file (with the ''+'' 1218operator) or remove attribute flags (with the ''-'' operator). 1219 1220 'Mattrib' supports the following attribute bits: 1221 1222'a' 1223 Archive bit. Used by some backup programs to indicate a new file. 1224'r' 1225 Read-only bit. Used to indicate a read-only file. Files with this 1226 bit set cannot be erased by 'DEL' nor modified. 1227's' 1228 System bit. Used by MS-DOS to indicate a operating system file. 1229'h' 1230 Hidden bit. Used to make files hidden from 'DIR'. 1231 1232 'Mattrib' supports the following command line flags: 1233'/' 1234 Recursive. Recursively list the attributes of the files in the 1235 subdirectories. 1236'X' 1237 Concise. Prints the attributes without any whitespace padding. If 1238 neither the "/" option is given, nor the MSDOSFILE contains a 1239 wildcard, and there is only one MS-DOS file parameter on the 1240 command line, only the attribute is printed, and not the filename. 1241 This option is convenient for scripts 1242'p' 1243 Replay mode. Outputs a series of 'mformat' commands that will 1244 reproduce the current situation, starting from a situation as left 1245 by untarring the MS-DOS file system. Commands are only output for 1246 attribute settings that differ from the default (archive bit set 1247 for files, unset for directories). This option is intended to be 1248 used in addition to tar. The 'readonly' attribute is not taken 1249 into account, as tar can set that one itself. 1250 1251 1252File: mtools.info, Node: mbadblocks, Next: mcat, Prev: mattrib, Up: Commands 1253 12544.4 Mbadblocks 1255============== 1256 1257The 'mbadblocks' command is used to mark some clusters on an MS-DOS 1258filesystem bad. It has the following syntax: 1259 1260 'mbadblocks' ['-s' SECTORLIST|'-c' CLUSTERLIST|-w] DRIVE':' 1261 1262 If no command line flags are supplied, 'Mbadblocks' scans an MS-DOS 1263filesystem for bad blocks by simply trying to read them and flag them if 1264read fails. All blocks that are unused are scanned, and if detected bad 1265are marked as such in the FAT. 1266 1267 This command is intended to be used right after 'mformat'. It is not 1268intended to salvage data from bad disks. 1269 12704.4.1 Command line options 1271-------------------------- 1272 1273'c FILE' 1274 Use a list of bad clusters, rather than scanning for bad clusters 1275 itself. 1276's FILE' 1277 Use a list of bad sectors (counted from beginning of filesystem), 1278 rather than trying for bad clusters itself. 1279'w' 1280 Write a random pattern to each cluster, then read it back and flag 1281 cluster as bad if mismatch. Only free clusters are tested in such 1282 a way, so any file data is preserved. 1283 12844.4.2 Bugs 1285---------- 1286 1287'Mbadblocks' should (but doesn't yet :-( ) also try to salvage bad 1288blocks which are in use by reading them repeatedly, and then mark them 1289bad. 1290 1291 1292File: mtools.info, Node: mcat, Next: mcd, Prev: mbadblocks, Up: Commands 1293 12944.5 Mcat 1295======== 1296 1297The 'mcat' command is used to copy an entire disk image from or to the 1298floppy device. It uses the following syntax: 1299 1300 'mcat' ['-w'] DRIVE':' 1301 1302 'Mcat' performs the same task as the Unix 'cat' command. It is 1303included into the mtools package, since 'cat' cannot access remote 1304floppy devices offered by the mtools floppy daemon. Now it is possible 1305to create boot floppies remotely. 1306 1307 The default operation is reading. The output is written to stdout. 1308 1309 If the '-w' option is specified, mcat reads a disk-image from stdin 1310and writes it to the given device. *Use this carefully!* Because of 1311the low-level nature of this command, it will happily destroy any data 1312written before on the disk without warning! 1313 1314 1315File: mtools.info, Node: mcd, Next: mclasserase, Prev: mcat, Up: Commands 1316 13174.6 Mcd 1318======= 1319 1320The 'mcd' command is used to change the mtools working directory on the 1321MS-DOS disk. It uses the following syntax: 1322 1323 mcd [MSDOSDIRECTORY] 1324 1325 Without arguments, 'mcd' reports the current device and working 1326directory. Otherwise, 'mcd' changes the current device and current 1327working directory relative to an MS-DOS file system. 1328 1329 The environmental variable 'MCWD' may be used to locate the file 1330where the device and current working directory information is stored. 1331The default is '$HOME/.mcwd'. Information in this file is ignored if 1332the file is more than 6 hours old. 1333 1334 'Mcd' returns 0 on success or 1 on failure. 1335 1336 Unlike MS-DOS versions of 'CD', 'mcd' can be used to change to 1337another device. It may be wise to remove old '.mcwd' files at logout. 1338 1339 1340File: mtools.info, Node: mclasserase, Next: mcopy, Prev: mcd, Up: Commands 1341 13424.7 Mclasserase 1343=============== 1344 1345The 'mclasserase' command is used to wipe memory cards by overwriting it 1346three times: first with '0xff', then with '0x00', then with '0xff' 1347again. The command uses the following syntax: 1348 1349 mclasserase [-d] MSDOSDRIVE 1350 1351 MS-DOS drive is optional, if none is specified, use 'A:'. If more 1352than one drive are specified, all but the last are ignored. 1353 1354 'Mclasserase' accepts the following command line options: 1355 1356'd' 1357 Stop after each erase cycle, for testing purposes 1358'p' 1359 Not yet implemented 1360 1361 'Mclasserase' returns 0 on success or -1 on failure. 1362 1363 1364File: mtools.info, Node: mcopy, Next: mdel, Prev: mclasserase, Up: Commands 1365 13664.8 Mcopy 1367========= 1368 1369The 'mcopy' command is used to copy MS-DOS files to and from Unix. It 1370uses the following syntax: 1371 1372 mcopy [-bspanvmQT] [-D CLASH_OPTION] SOURCEFILE TARGETFILE 1373 mcopy [-bspanvmQT] [-D CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY 1374 mcopy [-tnvm] MSDOSSOURCEFILE 1375 1376 'Mcopy' copies the specified file to the named file, or copies 1377multiple files to the named directory. The source and target can be 1378either MS-DOS or Unix files. 1379 1380 The use of a drive letter designation on the MS-DOS files, 'a:' for 1381example, determines the direction of the transfer. A missing drive 1382designation implies a Unix file whose path starts in the current 1383directory. If a source drive letter is specified with no attached file 1384name (e.g. 'mcopy a: .'), all files are copied from that drive. 1385 1386 If only a single, MS-DOS source parameter is provided (e.g. "mcopy 1387a:foo.exe"), an implied destination of the current directory (''.'') is 1388assumed. 1389 1390 A filename of ''-'' means standard input or standard output, 1391depending on its position on the command line. 1392 1393 'Mcopy' accepts the following command line options: 1394 1395't' 1396 Text file transfer. Mcopy translates incoming carriage return/line 1397 feeds to line feeds when copying from MS-DOS to Unix, and 1398 vice-versa when copying from Unix to MS-DOS. 1399'b' 1400 Batch mode. Optimized for huge recursive copies, but less secure 1401 if a crash happens during the copy. 1402's' 1403 Recursive copy. Also copies directories and their contents 1404'p' 1405 Preserves the attributes of the copied files 1406'Q' 1407 When mcopying multiple files, quits as soon as one copy fails (for 1408 example due to lacking storage space on the target disk) 1409'a' 1410 Text (ASCII) file transfer. 'ASCII' translates incoming carriage 1411 return/line feeds to line feeds. 1412'T' 1413 Text (ASCII) file transfer with character set conversion. Differs 1414 from '-a' in the 'ASCII' also translates incoming PC-8 characters 1415 to ISO-8859-1 equivalents as far as possible. When reading DOS 1416 files, untranslatable characters are replaced by ''#''; when 1417 writing DOS files, untranslatable characters are replaced by ''.''. 1418'n' 1419 No confirmation when overwriting Unix files. 'ASCII' doesn't warn 1420 the user when overwriting an existing Unix file. If the target 1421 file already exists, and the '-n' option is not in effect, 'mcopy' 1422 asks whether to overwrite the file or to rename the new file (see 1423 *note name clashes::) for details). In order to switch off 1424 confirmation for DOS files, use '-o'. 1425'm' 1426 Preserve the file modification time. 1427'v' 1428 Verbose. Displays the name of each file as it is copied. 1429 14304.8.1 Bugs 1431---------- 1432 1433Unlike MS-DOS, the '+' operator (append) from MS-DOS is not supported. 1434However, you may use 'mtype' to produce the same effect: 1435 mtype a:file1 a:file2 a:file3 >unixfile 1436 mtype a:file1 a:file2 a:file3 | mcopy - a:msdosfile 1437 1438 1439File: mtools.info, Node: mdel, Next: mdeltree, Prev: mcopy, Up: Commands 1440 14414.9 Mdel 1442======== 1443 1444The 'mdel' command is used to delete an MS-DOS file. Its syntax is: 1445 1446 'mdel' ['-v'] MSDOSFILE [ MSDOSFILES ... ] 1447 1448 'Mdel' deletes files on an MS-DOS file system. 1449 1450 'Mdel' asks for verification prior to removing a read-only file. 1451 1452 1453File: mtools.info, Node: mdeltree, Next: mdir, Prev: mdel, Up: Commands 1454 14554.10 Mdeltree 1456============= 1457 1458The 'mdeltree' command is used to delete an MS-DOS file. Its syntax is: 1459 1460 'mdeltree' ['-v'] MSDOSDIRECTORY [MSDOSDIRECTORIES...] 1461 1462 'Mdeltree' removes a directory and all the files and subdirectories 1463it contains from an MS-DOS file system. An error occurs if the 1464directory to be removed does not exist. 1465 1466 1467File: mtools.info, Node: mdir, Next: mdu, Prev: mdeltree, Up: Commands 1468 14694.11 Mdir 1470========= 1471 1472The 'mdir' command is used to display an MS-DOS directory. Its syntax 1473is: 1474 1475 'mdir' ['-/'] ['-f'] ['-w'] ['-a'] ['-b'] MSDOSFILE [ MSDOSFILES...] 1476 1477 'Mdir' displays the contents of MS-DOS directories, or the entries 1478for some MS-DOS files. 1479 1480 'Mdir' supports the following command line options: 1481 1482'/' 1483 Recursive output, just like MS-DOS' '-s' option 1484'w' 1485 Wide output. With this option, 'mdir' prints the filenames across 1486 the page without displaying the file size or creation date. 1487'a' 1488 Also list hidden files. 1489'f' 1490 Fast. Do not try to find out free space. On larger disks, finding 1491 out the amount of free space takes up some non trivial amount of 1492 time, as the whole FAT must be read in and scanned. The '-f' flag 1493 bypasses this step. This flag is not needed on FAT32 file systems, 1494 which store the size explicitly. 1495'b' 1496 Concise listing. Lists each directory name or filename, one per 1497 line (including the filename extension). This switch displays no 1498 heading information and no summary. Only a newline separated list 1499 of pathnames is displayed. 1500 1501 An error occurs if a component of the path is not a directory. 1502 1503 1504File: mtools.info, Node: mdu, Next: mformat, Prev: mdir, Up: Commands 1505 15064.12 Mdu 1507======== 1508 1509'Mdu' is used to list the space occupied by a directory, its 1510subdirectories and its files. It is similar to the 'du' command on 1511Unix. The unit used are clusters. Use the minfo command to find out 1512the cluster size. 1513 1514 'mdu' ['-a'] [ MSDOSFILES ... ] 1515 1516'a' 1517 All files. List also the space occupied for individual files. 1518's' 1519 Only list the total space, don't give details for each 1520 subdirectory. 1521 1522 1523File: mtools.info, Node: mformat, Next: mkmanifest, Prev: mdu, Up: Commands 1524 15254.13 Mformat 1526============ 1527 1528The 'mformat' command is used to add an MS-DOS file system to a 1529low-level formatted diskette. Its syntax is: 1530 1531 'mformat' ['-t' CYLINDERS|'-T' TOT_SECTORS] ['-h' HEADS] ['-s' SECTORS] 1532 ['-f' SIZE] ['-1'] ['-4'] ['-8'] 1533 ['-v' VOLUME_LABEL] 1534 ['-F'] ['-S' SIZECODE] 1535 ['-M' SOFTWARE_SECTOR_SIZE] 1536 ['-N' SERIAL_NUMBER] ['-a'] 1537 ['-C'] ['-H' HIDDEN_SECTORS] ['-I' FSVERSION] 1538 ['-r' ROOT_SECTORS] ['-L' FAT_LEN] 1539 ['-B' BOOT_SECTOR] ['-k'] 1540 ['-m' MEDIA_DESCRIPTOR] 1541 ['-K' BACKUP_BOOT] 1542 ['-R' NB_RESERVED_SECTORS] 1543 ['-c' CLUSTERS_PER_SECTOR] 1544 ['-d' FAT_COPIES] 1545 ['-X'] ['-2' SECTORS_ON_TRACK_0] ['-3'] 1546 ['-0' RATE_ON_TRACK_0] ['-A' RATE_ON_OTHER_TRACKS] 1547 DRIVE: 1548 1549 'Mformat' adds a minimal MS-DOS file system (boot sector, FAT, and 1550root directory) to a diskette that has already been formatted by a Unix 1551low-level format. 1552 1553 The following options are supported: (The S, 2, 1 and M options may 1554not exist if this copy of mtools has been compiled without the USE_2M 1555option) 1556 1557 The following options are the same as for MS-DOS's format command: 1558 1559'v' 1560 Specifies the volume label. A volume label identifies the disk and 1561 can be a maximum of 11 characters. If you omit the -v switch, 1562 mformat will assign no label to the disk. 1563'f' 1564 Specifies the size of the DOS file system to format. Only a 1565 certain number of predefined sizes are supported by this flag; for 1566 others use the -h/-t/-s flags. The following sizes are supported: 1567 160 1568 160K, single-sided, 8 sectors per track, 40 cylinders (for 5 1569 1/4 DD) 1570 180 1571 160K, single-sided, 9 sectors per track, 40 cylinders (for 5 1572 1/4 DD) 1573 320 1574 320K, double-sided, 8 sectors per track, 40 cylinders (for 5 1575 1/4 DD) 1576 360 1577 360K, double-sided, 9 sectors per track, 40 cylinders (for 5 1578 1/4 DD) 1579 720 1580 720K, double-sided, 9 sectors per track, 80 cylinders (for 3 1581 1/2 DD) 1582 1200 1583 1200K, double-sided, 15 sectors per track, 80 cylinders (for 5 1584 1/4 HD) 1585 1440 1586 1440K, double-sided, 18 sectors per track, 80 cylinders (for 3 1587 1/2 HD) 1588 2880 1589 2880K, double-sided, 36 sectors per track, 80 cylinders (for 3 1590 1/2 ED) 1591 1592't' 1593 Specifies the number of tracks on the disk. 1594'T' 1595 Specifies the number of total sectors on the disk. Only one of 1596 these 2 options may be specified (tracks or total sectors) 1597'h' 1598 The number of heads (sides). 1599's' 1600 Specifies the number of sectors per track. If the 2m option is 1601 given, number of 512-byte sector equivalents on generic tracks 1602 (i.e. not head 0 track 0). If the 2m option is not given, number 1603 of physical sectors per track (which may be bigger than 512 bytes). 1604 1605'1' 1606 Formats a single side (equivalent to -h 1) 1607 1608'4' 1609 Formats a 360K double-sided disk (equivalent to -f 360). When used 1610 together with -the 1 switch, this switch formats a 180K disk 1611 1612'8' 1613 Formats a disk with 8 sectors per track. 1614 1615 MS-DOS format's 'q', 'u' and 'b' options are not supported, and 's' 1616has a different meaning. 1617 1618 The following options are specific to mtools: 1619 1620'F' 1621 Format the partition as FAT32. 1622 1623'S' 1624 The size code. The size of the sector is 2 ^ (sizecode + 7). 1625'X' 1626 formats the disk as an XDF disk. *Note XDF::, for more details. 1627 The disk has first to be low-level formatted using the xdfcopy 1628 utility included in the fdutils package. XDF disks are used for 1629 instance for OS/2 install disks. 1630'2' 1631 2m format. The parameter to this option describes the number of 1632 sectors on track 0, head 0. This option is recommended for sectors 1633 bigger than normal. 1634'3' 1635 don't use a 2m format, even if the current geometry of the disk is 1636 a 2m geometry. 1637'0' 1638 Data transfer rate on track 0 1639'A' 1640 Data transfer rate on tracks other than 0 1641'M' 1642 software sector size. This parameter describes the sector size in 1643 bytes used by the MS-DOS file system. By default it is the 1644 physical sector size. 1645'N' 1646 Uses the requested serial number, instead of generating one 1647 automatically 1648'a' 1649 If this option is given, an Atari style serial number is generated. 1650 Ataris store their serial number in the OEM label. 1651'C' 1652 creates the disk image file to install the MS-DOS file system on 1653 it. Obviously, this is useless on physical devices such as 1654 floppies and hard disk partitions, but is interesting for image 1655 files. 1656'H' 1657 number of hidden sectors. This parameter is useful for formatting 1658 hard disk partition, which are not aligned on track boundaries 1659 (i.e. first head of first track doesn't belong to the partition, 1660 but contains a partition table). In that case the number of hidden 1661 sectors is in general the number of sectors per cylinder. This is 1662 untested. 1663'I' 1664 Sets the fsVersion id when formatting a FAT32 drive. In order to 1665 find this out, run minfo on an existing FAT32 drive, and mail me 1666 about it, so I can include the correct value in future versions of 1667 mtools. 1668'c' 1669 Sets the size of a cluster (in sectors). If this cluster size 1670 would generate a FAT that too big for its number of bits, mtools 1671 automatically increases the cluster size, until the FAT is small 1672 enough. If no cluster size is specified explicitly, mtools uses a 1673 default value as described in section "Number of sectors per 1674 cluster" below. 1675'd' 1676 Sets the number of FAT copies. Default is 2. This setting can 1677 also be specified using the 'MTOOLS_NFATS' environment variable. 1678'r' 1679 Sets the size of the root directory (in sectors). Only applicable 1680 to 12 and 16 bit FATs. This setting can also be specified using 1681 the 'MTOOLS_DIR_LEN' environment variable. 1682'L' 1683 Sets the length of the FAT. 1684'B' 1685 Use the boot sector stored in the given file or device, instead of 1686 using its own. Only the geometry fields are updated to match the 1687 target disks parameters. 1688'k' 1689 Keep the existing boot sector as much as possible. Only the 1690 geometry fields and other similar file system data are updated to 1691 match the target disks parameters. 1692'K' 1693 Sets the sector number where the backup of the boot sector should 1694 be stored (only relevant on FAT32). 1695'R' 1696 Sets the number of reserved sectors for this filesystem. This must 1697 be at least 1 for non-FAT32 disks, and at least 3 for FAT disks (in 1698 order to accommodate the boot sector, the info sector and the 1699 backup boot sector). 1700 1701'm' 1702 Use a non-standard media descriptor byte for this disk. The media 1703 descriptor is stored at position 21 of the boot sector, and as 1704 first byte in each FAT copy. Using this option may confuse DOS or 1705 older mtools version, and may make the disk unreadable. Only use 1706 if you know what you are doing. 1707 1708 To format a diskette at a density other than the default, you must 1709supply (at least) those command line parameters that are different from 1710the default. 1711 1712 'Mformat' returns 0 on success or 1 on failure. 1713 1714 It doesn't record bad block information to the Fat, use 'mbadblocks' 1715for that. 1716 17174.13.1 Number of sectors per cluster 1718------------------------------------ 1719 1720If the user indicates no cluster size, mformat figures out a default 1721value for it. 1722 1723 For FAT32 it uses the following table to determine the number of 1724sectors per cluster, depending on the total number of sectors on the 1725filesystem. 1726 1727 more than 32*1024*1024*2: 64 sectors 1728between 16*1024*1024*2 and 32*1024*1024*2: 32 sectors 1729between 8*1024*1024*2 and 16*1024*1024*2: 16 sectors 1730between 260*1024*2 and 81024*1024*2: 1 sectors 1731 1732 This is derived from information on page 20 of Microsoft's 1733'fatgen103' document, which currently can be found at the following 1734address: 1735 1736 'https://staff.washington.edu/dittrich/misc/fatgen103.pdf' 1737 1738 For FAT12 and FAT16, mformat uses an iterative approach, where it 1739starts with a set value, which it doubles until it is able to fill up 1740the disk using that cluster size and a number of cluster less than the 1741maximum allowed. 1742 1743 The starting value is 1 for disks with one head or less than 2000 1744sectors, and 2 for disks with more than one head, and more than 2000 1745sectors. 1746 1747 The number of sectors per cluster cannot go beyond 128. 1748 1749 1750File: mtools.info, Node: mkmanifest, Next: minfo, Prev: mformat, Up: Commands 1751 17524.14 Mkmanifest 1753=============== 1754 1755The 'mkmanifest' command is used to create a shell script (packing list) 1756to restore Unix filenames. Its syntax is: 1757 1758 'mkmanifest' [ FILES ] 1759 1760 'Mkmanifest' creates a shell script that aids in the restoration of 1761Unix filenames that got clobbered by the MS-DOS filename restrictions. 1762MS-DOS filenames are restricted to 8 character names, 3 character 1763extensions, upper case only, no device names, and no illegal characters. 1764 1765 The mkmanifest program is compatible with the methods used in 'pcomm, 1766arc,' and 'mtools' to change perfectly good Unix filenames to fit the 1767MS-DOS restrictions. This command is only useful if the target system 1768which will read the diskette cannot handle VFAT long names. 1769 17704.14.1 Example 1771-------------- 1772 1773You want to copy the following Unix files to a MS-DOS diskette (using 1774the 'mcopy' command). 1775 1776 very_long_name 1777 2.many.dots 1778 illegal: 1779 good.c 1780 prn.dev 1781 Capital 1782 1783 'ASCII' converts the names to: 1784 1785 very_lon 1786 2xmany.dot 1787 illegalx 1788 good.c 1789 xprn.dev 1790 capital 1791 1792 The command: 1793 mkmanifest very_long_name 2.many.dots illegal: good.c prn.dev Capital >manifest 1794 would produce the following: 1795 mv very_lon very_long_name 1796 mv 2xmany.dot 2.many.dots 1797 mv illegalx illegal: 1798 mv xprn.dev prn.dev 1799 mv capital Capital 1800 1801 Notice that "good.c" did not require any conversion, so it did not 1802appear in the output. 1803 1804 Suppose I've copied these files from the diskette to another Unix 1805system, and I now want the files back to their original names. If the 1806file "manifest" (the output captured above) was sent along with those 1807files, it could be used to convert the filenames. 1808 18094.14.2 Bugs 1810----------- 1811 1812The short names generated by 'mkmanifest' follow the old convention 1813(from mtools-2.0.7) and not the one from Windows 95 and mtools-3.0. 1814 1815 1816File: mtools.info, Node: minfo, Next: mlabel, Prev: mkmanifest, Up: Commands 1817 18184.15 Minfo 1819========== 1820 1821The 'minfo' command prints the parameters of a MS-DOS file system, such 1822as number of sectors, heads and cylinders. It also prints an mformat 1823command line which can be used to create a similar MS-DOS file system on 1824another media. However, this doesn't work with 2m or XDF media, and 1825with MS-DOS 1.0 file systems 1826 'minfo' DRIVE: 1827 1828 Minfo supports the following option: 1829'v' 1830 Prints a hexdump of the boot sector, in addition to the other 1831 information 1832 1833 1834File: mtools.info, Node: mlabel, Next: mmd, Prev: minfo, Up: Commands 1835 18364.16 Mlabel 1837=========== 1838 1839The 'mlabel' command adds a volume label to a disk. Its syntax is: 1840 'mlabel' ['-vcsn'] ['-N' SERIAL] DRIVE:[NEW_LABEL] 1841 1842 'Mlabel' displays the current volume label, if present. If NEW_LABEL 1843is not given, and if neither the 'c' nor the 's' options are set, it 1844prompts the user for a new volume label. To delete an existing volume 1845label, press return at the prompt. 1846 1847 The label is limited to 11 single-byte characters, e.g. 1848'Name1234567'. 1849 1850 Reasonable care is taken to create a valid MS-DOS volume label. If 1851an invalid label is specified, 'mlabel' changes the label (and displays 1852the new label if the verbose mode is set). 'Mlabel' returns 0 on 1853success or 1 on failure. 1854 1855 Mlabel supports the following options: 1856'c' 1857 Clears an existing label, without prompting the user 1858's' 1859 Shows the existing label, without prompting the user. 1860'n' 1861 Assigns a new (random) serial number to the disk 1862'N SERIAL' 1863 Sets the supplied serial number. The serial number should be 1864 supplied as an 8 digit hexadecimal number, without spaces 1865 1866 1867File: mtools.info, Node: mmd, Next: mmount, Prev: mlabel, Up: Commands 1868 18694.17 Mmd 1870======== 1871 1872The 'mmd' command is used to make an MS-DOS subdirectory. Its syntax 1873is: 1874 1875 'mmd' ['-D' CLASH_OPTION] MSDOSDIRECTORY [ MSDOSDIRECTORIES... ] 1876 1877 'Mmd' makes a new directory on an MS-DOS file system. An error 1878occurs if the directory already exists. 1879 1880 1881File: mtools.info, Node: mmount, Next: mmove, Prev: mmd, Up: Commands 1882 18834.18 Mmount 1884=========== 1885 1886The 'mmount' command is used to mount an MS-DOS disk. It is only 1887available on Linux, as it is only useful if the OS kernel allows 1888configuration of the disk geometry. Its syntax is: 1889 1890 'mmount' MSDOSDRIVE [MOUNTARGS] 1891 1892 'Mmount' reads the boot sector of an MS-DOS disk, configures the 1893drive geometry, and finally mounts it passing 'mountargs' to 'mount. ' 1894If no mount arguments are specified, the name of the device is used. If 1895the disk is write protected, it is automatically mounted read only. 1896 1897 1898File: mtools.info, Node: mmove, Next: mpartition, Prev: mmount, Up: Commands 1899 19004.19 Mmove 1901========== 1902 1903The 'mmove' command is used to move or rename an existing MS-DOS file or 1904subdirectory. 1905 'mmove' ['-v'] ['-D' CLASH_OPTION] SOURCEFILE TARGETFILE 1906 'mmove' ['-v'] ['-D' CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY 1907 'Mmove' moves or renames an existing MS-DOS file or subdirectory. 1908Unlike the MS-DOS version of 'MOVE', 'mmove' is able to move 1909subdirectories. Files or directories can only be moved within one file 1910system. Data cannot be moved from MS-DOS to Unix or vice-versa. If you 1911omit the drive letter from the target file or directory, the same letter 1912as for the source is assumed. If you omit the drive letter from all 1913parameters, drive a: is assumed by default. 1914 1915 1916File: mtools.info, Node: mpartition, Next: mrd, Prev: mmove, Up: Commands 1917 19184.20 Mpartition 1919=============== 1920 1921The 'mpartition' command is used to create MS-DOS file systems as 1922partitions. This is intended to be used on non-Linux systems, i.e. 1923systems where fdisk and easy access to SCSI devices are not available. 1924This command only works on drives whose partition variable is set. 1925 1926 'mpartition' '-p' DRIVE 1927 'mpartition' '-r' DRIVE 1928 'mpartition' '-I' ['-B' BOOTSECTOR] DRIVE 1929 'mpartition' '-a' DRIVE 1930 'mpartition' '-d' DRIVE 1931 'mpartition' '-c' ['-s' SECTORS] ['-h' HEADS] 1932 ['-t' CYLINDERS] ['-v' ['-T' TYPE] ['-b' 1933 BEGIN] ['-l' length] ['-f'] 1934 1935 1936 Mpartition supports the following operations: 1937 1938'p' 1939 Prints a command line to recreate the partition for the drive. 1940 Nothing is printed if the partition for the drive is not defined, 1941 or an inconsistency has been detected. If verbose ('-v') is also 1942 set, prints the current partition table. 1943'r' 1944 Removes the partition described by DRIVE. 1945'I' 1946 Initializes the partition table, and removes all partitions. 1947'c' 1948 Creates the partition described by DRIVE. 1949'a' 1950 "Activates" the partition, i.e. makes it bootable. Only one 1951 partition can be bootable at a time. 1952'd' 1953 "Deactivates" the partition, i.e. makes it unbootable. 1954 1955 If no operation is given, the current settings are printed. 1956 1957 For partition creations, the following options are available: 1958's SECTORS' 1959 The number of sectors per track of the partition (which is also the 1960 number of sectors per track for the whole drive). 1961'h HEADS' 1962 The number of heads of the partition (which is also the number of 1963 heads for the whole drive). By default, the geometry information 1964 (number of sectors and heads) is figured out from neighboring 1965 partition table entries, or guessed from the size. 1966't CYLINDERS' 1967 The number of cylinders of the partition (not the number of 1968 cylinders of the whole drive. 1969'b BEGIN' 1970 The starting offset of the partition, expressed in sectors. If 1971 begin is not given, 'mpartition' lets the partition begin at the 1972 start of the disk (partition number 1), or immediately after the 1973 end of the previous partition. 1974'l LENGTH' 1975 The size (length) of the partition, expressed in sectors. If end 1976 is not given, 'mpartition' figures out the size from the number of 1977 sectors, heads and cylinders. If these are not given either, it 1978 gives the partition the biggest possible size, considering disk 1979 size and start of the next partition. 1980 1981 The following option is available for all operation which modify the 1982partition table: 1983'f' 1984 Usually, before writing back any changes to the partition, 1985 mpartition performs certain consistency checks, such as checking 1986 for overlaps and proper alignment of the partitions. If any of 1987 these checks fails, the partition table is not changed. The '-f' 1988 allows you to override these safeguards. 1989 1990 The following options are available for all operations: 1991'v' 1992 Together with '-p' prints the partition table as it is now (no 1993 change operation), or as it is after it is modified. 1994'vv' 1995 If the verbosity flag is given twice, 'mpartition' will print out a 1996 hexdump of the partition table when reading it from and writing it 1997 to the device. 1998 1999 The following option is available for partition table initialization: 2000'B BOOTSECTOR' 2001 Reads the template master boot record from file BOOTSECTOR. 2002 20034.20.1 Choice of partition type 2004------------------------------- 2005 2006Mpartition proceeds as follows to pick a type for the partition: 2007 2008 - FAT32 partitions are assigned type 0x0C ("'Win95 FAT32, LBA'") 2009 2010 - For all others, if the partition fits entirely within the first 2011 65536 sectors of the disk, assign 0x01 ("'DOS FAT12, CHS'") for 2012 FAT12 partition and 0x04 ("'DOS FAT16, CHS'") for FAT16 partitions 2013 2014 - If not covered by the above, assign 0x06 ("'DOS BIG FAT16 CHS'") if 2015 partition fits entirely within the first 1024 cylinders (CHS mode) 2016 2017 - All remaining cases get 0x0E ("'Win95 BIG FAT16, LBA'") 2018 2019 If number of fat bits is not known (not specified in drive's 2020definition), then FAT12 is assumed for all drives with less than 4096 2021sectors, and FAT16 for those with more than 4096 sectors. 2022 2023 This corresponds more or less to the definitions outlined at 2024'https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs' and 2025'https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc977219(v=technet.10)', 2026with two notable differences: 2027 2028 - If fat bits are unknown, the reference documents consider drives 2029 with less than 32680 sectors to be FAT12. Mtools uses 4096 sectors 2030 as the cutoff point, as older versions of DOS only support FAT12 on 2031 disks with less than 4096 sectors (and these older versions are the 2032 ones which would be most likely to use FAT12 in the first place). 2033 2034 - The reference documents use a 8GB (wikipedia) or a 4GB (Microsoft) 2035 cutoff between 0x06 ('DOS BIG FAT16 CHS') and 0x0E. Mtools uses 2036 1024 cylinders. This is because any partition beyond 1024 2037 cylinders must be LBA and cannot be CHS. 8GB works out to be the 2038 biggest capacity which can be represented as CHS (63 sectors, 255 2039 heads and 1024 cylinders). 4GB is the capacity limit for windows 2040 2000, so it makes sense that a documentation for windows 2000 would 2041 specify this as the upper limit for any partition type. 2042 2043 2044File: mtools.info, Node: mrd, Next: mren, Prev: mpartition, Up: Commands 2045 20464.21 Mrd 2047======== 2048 2049The 'mrd' command is used to remove an MS-DOS subdirectory. Its syntax 2050is: 2051 2052 'mrd' ['-v'] MSDOSDIRECTORY [ MSDOSDIRECTORIES... ] 2053 2054 'Mrd' removes a directory from an MS-DOS file system. An error 2055occurs if the directory does not exist or is not empty. 2056 2057 2058File: mtools.info, Node: mren, Next: mshortname, Prev: mrd, Up: Commands 2059 20604.22 Mren 2061========= 2062 2063The 'mren' command is used to rename or move an existing MS-DOS file or 2064subdirectory. Its syntax is: 2065 2066 'mren' ['-voOsSrRA'] SOURCEFILE TARGETFILE 2067 2068 'Mren' renames an existing file on an MS-DOS file system. 2069 2070 In verbose mode, 'Mren' displays the new filename if the name 2071supplied is invalid. 2072 2073 If the first syntax is used (only one source file), and if the target 2074name doesn't contain any slashes or colons, the file (or subdirectory) 2075is renamed in the same directory, instead of being moved to the current 2076'mcd' directory as would be the case with 'mmove'. Unlike the MS-DOS 2077version of 'REN', 'mren' can be used to rename directories. 2078 2079 2080File: mtools.info, Node: mshortname, Next: mshowfat, Prev: mren, Up: Commands 2081 20824.23 Mshortname 2083=============== 2084 2085The 'mshortname' command is used to display the short name of a file. 2086Syntax: 2087 2088 'mshortname' FILES 2089 2090 The shortname is displayed as it is stored in raw format on disk, 2091without any character set conversion. 2092 2093 2094File: mtools.info, Node: mshowfat, Next: mtoolstest, Prev: mshortname, Up: Commands 2095 20964.24 Mshowfat 2097============= 2098 2099The 'mshowfat' command is used to display the FAT entries for a file. 2100Syntax: 2101 2102 'mshowfat' ['-o' OFFSET] FILES 2103 2104 If no offset is given, a list of all clusters occupied by the file is 2105printed. If an offset is given, only the number of the cluster 2106containing that offset is printed. 2107 2108 2109File: mtools.info, Node: mtoolstest, Next: mtype, Prev: mshowfat, Up: Commands 2110 21114.25 Mtoolstest 2112=============== 2113 2114The 'mtoolstest' command is used to tests the mtools configuration 2115files. To invoke it, just type 'mtoolstest' without any arguments. 2116'Mtoolstest' reads the mtools configuration files, and prints the 2117cumulative configuration to 'stdout'. The output can be used as a 2118configuration file itself (although you might want to remove redundant 2119clauses). You may use this program to convert old-style configuration 2120files into new style configuration files. 2121 2122 2123File: mtools.info, Node: mtype, Next: mzip, Prev: mtoolstest, Up: Commands 2124 21254.26 Mtype 2126========== 2127 2128The 'mtype' command is used to display contents of an MS-DOS file. Its 2129syntax is: 2130 2131 'mtype' ['-ts'] MSDOSFILE [ MSDOSFILES... ] 2132 2133 'Mtype' displays the specified MS-DOS file on the screen. 2134 2135 In addition to the standard options, 'Mtype' allows the following 2136command line options: 2137 2138't' 2139 Text file viewing. 'Mtype' translates incoming carriage 2140 return/line feeds to line feeds. 2141's' 2142 'Mtype' strips the high bit from the data. 2143 2144 The 'mcd' command may be used to establish the device and the current 2145working directory (relative to MS-DOS), otherwise the default is 'A:/'. 2146 2147 'Mtype' returns 0 on success, 1 on utter failure, or 2 on partial 2148failure. 2149 2150 Unlike the MS-DOS version of 'TYPE', 'mtype' allows multiple 2151arguments. 2152 2153 2154File: mtools.info, Node: mzip, Prev: mtype, Up: Commands 2155 21564.27 Mzip 2157========= 2158 2159The 'mzip' command is used to issue ZIP disk specific commands on Linux, 2160Solaris or HP-UX. Its syntax is: 2161 2162 'mzip' ['-epqrwx'] 2163 2164 'Mzip' allows the following command line options: 2165 2166'e' 2167 Ejects the disk. 2168'f' 2169 Force eject even if the disk is mounted (must be given in addition 2170 to '-e'). 2171'r' 2172 Write protect the disk. 2173'w' 2174 Remove write protection. 2175'p' 2176 Password write protect. 2177'x' 2178 Password protect 2179'u' 2180 Temporarily unprotect the disk until it is ejected. The disk 2181 becomes writable, and reverts back to its old state when ejected. 2182'q' 2183 Queries the status 2184 2185 To remove the password, set it to one of the password-less modes '-r' 2186or '-w': mzip will then ask you for the password, and unlock the disk. 2187If you have forgotten the password, you can get rid of it by low-level 2188formatting the disk (using your SCSI adapter's BIOS setup). 2189 2190 The ZipTools disk shipped with the drive is also password protected. 2191On MS-DOS or on a Mac, this password is automatically removed once the 2192ZipTools have been installed. From various articles posted to Usenet, I 2193learned that the password for the tools disk is 'APlaceForYourStuff'(1). 2194Mzip knows about this password, and tries it first, before prompting you 2195for a password. Thus 'mzip -w z:' unlocks the tools disk(2). The tools 2196disk is formatted in a special way so as to be usable both in a PC and 2197in a Mac. On a PC, the Mac file system appears as a hidden file named 2198'partishn.mac'. You may erase it to reclaim the 50 Megs of space taken 2199up by the Mac file system. 2200 22014.27.1 Bugs 2202----------- 2203 2204This command is a big kludge. A proper implementation would take a 2205rework of significant parts of mtools, but unfortunately I don't have 2206the time for this right now. The main downside of this implementation 2207is that it is inefficient on some architectures (several successive 2208calls to mtools, which defeats mtools' caching). 2209 2210 ---------- Footnotes ---------- 2211 2212 (1) To see the articles, search for 'APlaceForYourStuff' using Google 2213Groups 2214 2215 (2) I didn't know about this yet when I bought my own Zip drive. 2216Thus I ended up reformatting my tools disk, and hence I haven't had the 2217opportunity to test the password yet. If anybody still has their tools 2218disk with the original password, could you try it out? Thanks in 2219advance 2220 2221 2222File: mtools.info, Node: Compiling mtools, Next: Porting mtools, Prev: Commands, Up: Top 2223 22245 Architecture specific compilation flags 2225***************************************** 2226 2227To compile mtools, first invoke './configure' before 'make'. In 2228addition to the standard 'autoconfigure' flags, there are two 2229architecture specific flags available. 2230 2231'./configure --enable-xdf' 2232'./configure --disable-xdf' 2233 Enables support for XDF disks. This is on by default. *Note 2234 XDF::, for details. 2235'./configure --enable-vold' 2236'./configure --disable-vold' 2237 Enables support for vold on Solaris. When used in conjunction with 2238 vold, mtools should use different device nodes than for direct 2239 access. 2240 2241'./configure --enable-new-vold' 2242'./configure --disable-new-vold' 2243 Enables new support for vold on Solaris. This is supposed to work 2244 more smoothly than the old support. 2245 2246'./configure --enable-floppyd' 2247'./configure --disable-floppyd' 2248 Enables support for floppyd. By default, floppyd support is 2249 enabled as long as the necessary X includes and libraries are 2250 available. 2251 2252 2253File: mtools.info, Node: Porting mtools, Next: Command Index, Prev: Compiling mtools, Up: Top 2254 22556 Porting mtools to architectures which are not supported yet 2256************************************************************* 2257 2258This chapter is only interesting for those who want to port mtools to an 2259architecture which is not yet supported. For most common systems, 2260default drives are already defined. If you want to add default drives 2261for a still unsupported system, run configuration.guess, to see which 2262identification autoconf uses for that system. This identification is of 2263the form cpu-vendor-os (for example sparc-sun-sunos). The cpu and the 2264OS parts are passed to the compiler as preprocessor flags. The OS part 2265is passed to the compiler in three forms. 2266 1. The complete OS name, with dots replaced by underscores. SCO3.2v2 2267 would yield sco3_2v2 2268 2. The base OS name. SCO3.2v2 would yield Sco 2269 3. The base OS name plus its major version. SCO3.2v2 would yield Sco3 2270 2271 All three versions are passed, if they are different. 2272 2273 To define the devices, use the entries for the systems that are 2274already present as templates. In general, they have the following form: 2275 2276 #if (defined (my_cpu) && defined(my_os)) 2277 #define predefined_devices 2278 struct device devices[] = { 2279 { "/dev/first_drive", 'drive_letter', drive_description}, 2280 ... 2281 { "/dev/last_drive", 'drive_letter', drive_description} 2282 } 2283 #define INIT_NOOP 2284 #endif 2285 2286 "/dev/first_drive" is the name of the device or image file 2287representing the drive. Drive_letter is a letter ranging from a to z 2288giving access to the drive. Drive_description describes the type of the 2289drive: 2290'ED312' 2291 extra density (2.88M) 3 1/2 disk 2292'HD312' 2293 high density 3 1/2 disk 2294'DD312' 2295 double density 3 1/2 disk 2296'HD514' 2297 high density 5 1/4 disk 2298'DD514' 2299 double density 5 1/4 disk 2300'DDsmall' 2301 8 sector double density 5 1/4 disk 2302'SS514' 2303 single sided double density 5 1/4 disk 2304'SSsmall' 2305 single sided 8 sector double density 5 1/4 disk 2306'GENFD' 2307 generic floppy drive (12 bit FAT) 2308'GENHD' 2309 generic hard disk (16 bit FAT) 2310'GEN' 2311 generic device (all parameters match) 2312'ZIPJAZ(flags)' 2313 generic ZIP drive using normal access. This uses partition 4. 2314 'Flags' are any special flags to be passed to open. 2315'RZIPJAZ(flags)' 2316 generic ZIP drive using raw SCSI access. This uses partition 4. 2317 'Flags' are any special flags to be passed to open. 2318'REMOTE' 2319 the remote drive used for floppyd. Unlike the other items, this 2320 macro also includes the file name ($DISPLAY) and the drive letter 2321 (X) 2322 2323 Entries may be described in more detail: 2324 fat_bits,open_flags,cylinders,heads,sectors,DEF_ARG 2325 or, if you need to describe an offset (file system doesn't start at 2326beginning of file system) 2327 fat_bits, open_flags, cylinders, heads, sectors, offset, DEF_ARG0 2328 2329'fat_bits' 2330 is either 12, 16 or 0. 0 means that the device accepts both types 2331 of FAT. 2332'open_flags' 2333 may include flags such as O_NDELAY, or O_RDONLY, which might be 2334 necessary to open the device. 0 means no special flags are needed. 2335'cylinders,heads,sectors' 2336 describe the geometry of the disk. If cylinders is 0, the heads 2337 and sectors parameters are ignored, and the drive accepts any 2338 geometry. 2339'offset' 2340 is used if the DOS file system doesn't begin at the start of the 2341 device or image file. This is mostly useful for Atari Ram disks 2342 (which contain their device driver at the beginning of the file) or 2343 for DOS emulator images (which may represent a partitioned device. 2344 2345 Definition of defaults in the devices file should only be done if 2346these same devices are found on a large number of hosts of this type. 2347In that case, could you also let me know about your new definitions, so 2348that I can include them into the next release. For purely local file, I 2349recommend that you use the '/etc/mtools.conf' and '~/.mtoolsrc' 2350configuration files. 2351 2352 However, the devices files also allows you to supply geometry setting 2353routines. These are necessary if you want to access high capacity 2354disks. 2355 2356 Two routines should be supplied: 2357 2358 1. Reading the current parameters 2359 static inline int get_parameters(int fd, struct generic_floppy_struct *floppy) 2360 2361 This probes the current configured geometry, and return it in the 2362 structure generic_floppy_struct (which must also be declared). Fd 2363 is an open file descriptor for the device, and buf is an already 2364 filled in stat structure, which may be useful. This routine should 2365 return 1 if the probing fails, and 0 otherwise. 2366 2367 2. Setting new parameters 2368 static inline int set_parameters(int fd, struct generic_floppy_struct *floppy) 2369 struct stat *buf) 2370 This configures the geometry contained in floppy on the file 2371 descriptor fd. Buf is the result of a stat call (already filled 2372 in). This should return 1 if the new geometry cannot be 2373 configured, and 0 otherwise. 2374 2375 A certain number of preprocessor macros should also be supplied: 2376 2377'TRACKS(floppy)' 2378 refers to the track field in the floppy structure 2379'HEADS(floppy)' 2380 refers to the heads field in the floppy structure 2381'SECTORS(floppy)' 2382 refers to the sectors per track field in the floppy structure 2383'SECTORS_PER_DISK(floppy)' 2384 refers to the sectors per disk field in the floppy structure (if 2385 applicable, otherwise leave undefined) 2386 2387'BLOCK_MAJOR' 2388 major number of the floppy device, when viewed as a block device 2389 2390'CHAR_MAJOR' 2391 major number of the floppy device, when viewed as a character 2392 device (a.k.a. "raw" device, used for fsck) (leave this undefined, 2393 if your OS doesn't have raw devices) 2394 2395 For the truly high capacity formats (XDF, 2m, etc), there is no clean 2396and documented interface yet. 2397 2398 2399File: mtools.info, Node: Command Index, Next: Variable Index, Prev: Porting mtools, Up: Top 2400 2401Command Index 2402************* 2403 2404 2405File: mtools.info, Node: Variable Index, Next: Concept Index, Prev: Command Index, Up: Top 2406 2407Variable index 2408************** 2409 2410[index] 2411* Menu: 2412 2413* cylinders: geometry description. (line 60) 2414* drive: general information. (line 6) 2415* exclusive: open flags. (line 6) 2416* fat_bits: miscellaneous variables. 2417 (line 11) 2418* file: location information. (line 10) 2419* filter: miscellaneous flags. (line 78) 2420* heads: geometry description. (line 63) 2421* mformat_only: miscellaneous flags. (line 74) 2422* MTOOLSRC: Configuration. (line 18) 2423* MTOOLS_DOTTED_DIR: global variables. (line 6) 2424* MTOOLS_FAT_COMPATIBILITY: global variables. (line 6) 2425* MTOOLS_LOCK_TIMEOUT: global variables. (line 6) 2426* MTOOLS_LOWER_CASE: global variables. (line 6) 2427* MTOOLS_NAME_NUMERIC_TAIL: global variables. (line 6) 2428* MTOOLS_NO_VFAT: global variables. (line 6) 2429* MTOOLS_SKIP_CHECK: global variables. (line 6) 2430* MTOOLS_TWENTY_FOUR_HOUR_CLOCK: global variables. (line 6) 2431* nodelay: open flags. (line 6) 2432* sectors: geometry description. (line 65) 2433* sync: open flags. (line 6) 2434* tracks: geometry description. (line 60) 2435* use_xdf: miscellaneous flags. (line 70) 2436 2437 2438File: mtools.info, Node: Concept Index, Prev: Variable Index, Up: Top 2439 2440Concept index 2441************* 2442 2443[index] 2444* Menu: 2445 2446* 2m: 2m. (line 6) 2447* ALPHA patches: Location. (line 6) 2448* APlaceForYourStuff: mzip. (line 6) 2449* Archive bit: mattrib. (line 6) 2450* Atari: miscellaneous flags. (line 66) 2451* Atari Ram disk: location information. (line 28) 2452* Backwards compatibility: old style configuration. 2453 (line 6) 2454* Bad blocks: mbadblocks. (line 6) 2455* bigger sectors: bigger sectors. (line 6) 2456* blocksize: miscellaneous variables. 2457 (line 32) 2458* bugs: Location. (line 6) 2459* Case sensitivity: case sensitivity. (line 6) 2460* Changing file attributes: mattrib. (line 6) 2461* character devices: miscellaneous variables. 2462 (line 32) 2463* Checking configuration file: mtoolstest. (line 6) 2464* Clusters of a file: mshowfat. (line 6) 2465* Command list: Commands. (line 6) 2466* Compile time configuration: Compiling mtools. (line 6) 2467* Compiled-in defaults: Porting mtools. (line 6) 2468* Concatenating MS-DOS files: mcopy. (line 6) 2469* Configuration file: default values. (line 6) 2470* Configuration file name: configuration file location. 2471 (line 6) 2472* Configuration file name (parsing order): parsing order. (line 6) 2473* Configuration file parsing order: parsing order. (line 6) 2474* Configuration file syntax: general syntax. (line 6) 2475* Configuration file, old syntax: old style configuration. 2476 (line 6) 2477* Configuration files: Configuration. (line 18) 2478* Configuration of disk geometry: geometry description. (line 6) 2479* Copying an entire disk image: mcat. (line 9) 2480* Copying MS-DOS files: mcopy. (line 6) 2481* CR/LF conversions: mcopy. (line 6) 2482* Creating a directory: mmd. (line 6) 2483* Current working directory: directory. (line 6) 2484* Current working directory (changing the): mcd. (line 6) 2485* Default configuration: default values. (line 6) 2486* Default directory: directory. (line 6) 2487* Default directory (changing the): mcd. (line 6) 2488* Default values: default values. (line 6) 2489* Deleting a directory: mrd. (line 6) 2490* deleting an MS-DOS directory recursively: mdeltree. (line 6) 2491* deleting MS-DOS files: mdel. (line 6) 2492* Description of disk geometry: geometry description. (line 6) 2493* diffs: Location. (line 6) 2494* Directory: directory. (line 6) 2495* Directory (changing): mcd. (line 6) 2496* Directory creation: mmd. (line 6) 2497* Directory listing: mdir. (line 6) 2498* Directory removing: mrd. (line 6) 2499* disable locking: miscellaneous flags. (line 11) 2500* Disk Geometry: geometry description. (line 6) 2501* Disk image: mcat. (line 9) 2502* Disk label: mlabel. (line 6) 2503* DMF disks: more sectors. (line 6) 2504* DOSEMU hard disk image: location information. (line 14) 2505* Drive configuration: per drive variables. (line 6) 2506* Drive configuration, example: general information. (line 6) 2507* Drive description: per drive variables. (line 6) 2508* Drive description, example: general information. (line 6) 2509* Drive independent configuration variables: global variables. (line 6) 2510* du: mdu. (line 6) 2511* Duplicate file names: name clashes. (line 6) 2512* Ejecting a Zip/Jaz disk: mzip. (line 6) 2513* Environmental variables: global variables. (line 6) 2514* Erasing a directory: mrd. (line 6) 2515* erasing an MS-DOS directory recursively: mdeltree. (line 6) 2516* erasing MS-DOS files: mdel. (line 6) 2517* exclusive access to a drive: open flags. (line 6) 2518* Executing commands before opening the device: miscellaneous variables. 2519 (line 26) 2520* Fat: mshowfat. (line 6) 2521* fdformat: more sectors. (line 6) 2522* File name of device node: location information. (line 10) 2523* File system creation: mformat. (line 6) 2524* Filenames: arguments. (line 6) 2525* floppyd: floppyd. (line 6) 2526* Floppyd cat: mcat. (line 9) 2527* floppyd_installtest: floppyd_installtest. (line 6) 2528* Format of disk: geometry description. (line 6) 2529* Formats, high capacity: high capacity formats. 2530 (line 6) 2531* Formatting disks: mformat. (line 6) 2532* FreeDOS: global variables. (line 6) 2533* getting parameters of a MS-DOS file system: minfo. (line 6) 2534* Global configuration variables: global variables. (line 6) 2535* Hdimage: location information. (line 6) 2536* Hidden files: mattrib. (line 6) 2537* High capacity formats: high capacity formats. 2538 (line 6) 2539* High capacity formats, mounting: mmount. (line 6) 2540* High density disk: geometry description. (line 6) 2541* Image file: location information. (line 10) 2542* Initializing disks: mformat. (line 6) 2543* Jaz disk (utilities): mzip. (line 6) 2544* Jaz disks (partitioning them): mpartition. (line 6) 2545* Jaz disks (partitions): location information. (line 14) 2546* Jaz disks (raw SCSI access): miscellaneous flags. (line 17) 2547* Labeling a disk: mlabel. (line 6) 2548* Linux enhancements (High Capacity Formats): high capacity formats. 2549 (line 6) 2550* Linux enhancements (mmount): mmount. (line 6) 2551* List of available commands: Commands. (line 6) 2552* Listing a directory: mdir. (line 6) 2553* Listing space occupied by directories and files: mdu. (line 6) 2554* Location of configuration files: configuration file location. 2555 (line 6) 2556* Location of configuration files (parsing order): parsing order. 2557 (line 6) 2558* locking (disabling it): miscellaneous flags. (line 11) 2559* Long file name: long names. (line 6) 2560* Low density disk: geometry description. (line 6) 2561* Magneto-optical disks: location information. (line 14) 2562* mailing list: Location. (line 6) 2563* Making a directory: mmd. (line 6) 2564* Marking blocks as bad: mbadblocks. (line 6) 2565* mattrib: mattrib. (line 6) 2566* mbadblocks: mbadblocks. (line 6) 2567* mcat: mcat. (line 9) 2568* mcd: mcd. (line 6) 2569* mcd (introduction): directory. (line 6) 2570* mclasserase: mclasserase. (line 6) 2571* mcopy: mcopy. (line 6) 2572* Mcwd file: mcd. (line 6) 2573* mdel: mdel. (line 6) 2574* mdeltree: mdeltree. (line 6) 2575* mdir: mdir. (line 6) 2576* mdu: mdu. (line 6) 2577* Memory Card: mclasserase. (line 6) 2578* mformat: mformat. (line 6) 2579* mformat (geometry used for): geometry description. (line 6) 2580* mformat parameters: minfo. (line 6) 2581* minfo: minfo. (line 6) 2582* mkmanifest: mkmanifest. (line 6) 2583* mlabel: mlabel. (line 6) 2584* mmd: mmd. (line 6) 2585* mmount: mmount. (line 6) 2586* mmove: mmove. (line 6) 2587* Mounting a disk: mmount. (line 6) 2588* Moving files (mmove): mmove. (line 6) 2589* Moving files (mren): mren. (line 6) 2590* mpartition: mpartition. (line 6) 2591* mrd: mrd. (line 6) 2592* mren: mren. (line 6) 2593* mshortname: mshortname. (line 6) 2594* mshowfat: mshowfat. (line 6) 2595* mtoolstest: mtoolstest. (line 6) 2596* mzip: mzip. (line 6) 2597* Name clashes: name clashes. (line 6) 2598* Name of configuration files: configuration file location. 2599 (line 6) 2600* Name of configuration files (parsing order): parsing order. (line 6) 2601* Name of device node: location information. (line 10) 2602* Occupation of space by directories and files: mdu. (line 6) 2603* Odd formats: high capacity formats. 2604 (line 6) 2605* Old configuration file syntax: old style configuration. 2606 (line 6) 2607* open flags: open flags. (line 6) 2608* Options: arguments. (line 6) 2609* OS/2 (layout of removable media): location information. (line 14) 2610* OS/2 (XDF disks): XDF. (line 6) 2611* Overwriting files: name clashes. (line 6) 2612* packing list: mkmanifest. (line 6) 2613* Parsing order: parsing order. (line 6) 2614* Partitioned image file: location information. (line 14) 2615* partitions (creating): mpartition. (line 6) 2616* password protected Zip disks: mzip. (line 6) 2617* patches: Location. (line 6) 2618* Physically erase: mclasserase. (line 6) 2619* plain floppy: device xxx busy: miscellaneous flags. (line 11) 2620* Porting: Porting mtools. (line 6) 2621* Primary file name (long names): long names. (line 6) 2622* Primary file name (name clashes): name clashes. (line 6) 2623* Ram disk: location information. (line 28) 2624* raw device: miscellaneous variables. 2625 (line 32) 2626* Read errors: mbadblocks. (line 6) 2627* Read-only files (changing the attribute): mattrib. (line 6) 2628* Read-only files (listing them): mdir. (line 6) 2629* Reading MS-DOS files: mcopy. (line 6) 2630* recursively removing an MS-DOS directory: mdeltree. (line 6) 2631* remote floppy access: floppyd. (line 6) 2632* remote floppy access <1>: floppyd_installtest. (line 6) 2633* Removable media: location information. (line 14) 2634* Removing a directory: mrd. (line 6) 2635* removing an MS-DOS directory recursively: mdeltree. (line 6) 2636* removing MS-DOS files: mdel. (line 6) 2637* Renaming files (mmove): mmove. (line 6) 2638* Renaming files (mren): mren. (line 6) 2639* SCSI devices: miscellaneous flags. (line 17) 2640* Secondary file name (long names): long names. (line 6) 2641* Secondary file name (name clashes): name clashes. (line 6) 2642* setgid installation: miscellaneous flags. (line 40) 2643* setuid installation: miscellaneous flags. (line 40) 2644* setuid installation (needed for raw SCSI I/O): miscellaneous flags. 2645 (line 17) 2646* Solaris (compile time configuration of vold): Compiling mtools. 2647 (line 6) 2648* Solaris (Raw access to SCSI devices such as Zip & Jaz): miscellaneous flags. 2649 (line 17) 2650* Solaris (volcheck): miscellaneous variables. 2651 (line 26) 2652* Solaris (vold): miscellaneous flags. (line 57) 2653* Space occupied by directories and files: mdu. (line 6) 2654* Special formats: high capacity formats. 2655 (line 6) 2656* Subdirectory creation: mmd. (line 6) 2657* Subdirectory removing: mrd. (line 6) 2658* SunOS (Raw access to SCSI devices such as Zip & Jaz): miscellaneous flags. 2659 (line 17) 2660* synchronous writing: open flags. (line 6) 2661* Syntax of the configuration file: general syntax. (line 6) 2662* Syquest disks: location information. (line 14) 2663* Syquest disks (raw SCSI access): miscellaneous flags. (line 17) 2664* System files: mattrib. (line 6) 2665* Testing configuration file for correctness: mtoolstest. (line 6) 2666* Text files: mcopy. (line 6) 2667* Tools disk (Zip and Jaz drives): mzip. (line 6) 2668* Verifying configuration file: mtoolstest. (line 6) 2669* VFAT-style file names: long names. (line 6) 2670* vgacopy: more sectors. (line 6) 2671* Vold (compile time configuration): Compiling mtools. (line 6) 2672* Vold (mediamgr): miscellaneous flags. (line 57) 2673* Weird formats: high capacity formats. 2674 (line 6) 2675* Windows 95 (DMF disks): more sectors. (line 6) 2676* Windows 95-style file names: long names. (line 6) 2677* Windows NT (layout of removable media): location information. 2678 (line 14) 2679* Wordswapped: miscellaneous flags. (line 66) 2680* Working directory: directory. (line 6) 2681* Working directory <1>: mcd. (line 6) 2682* Write protecting a Zip/Jaz disk: mzip. (line 6) 2683* Writing MS-DOS files: mcopy. (line 6) 2684* X terminal: floppyd. (line 6) 2685* X terminal <1>: floppyd_installtest. (line 6) 2686* XDF disks: XDF. (line 6) 2687* XDF disks (compile time configuration): Compiling mtools. (line 6) 2688* XDF disks (how to configure): miscellaneous flags. (line 70) 2689* Zip disk (utilities): mzip. (line 6) 2690* Zip disks (partitioning them): mpartition. (line 6) 2691* Zip disks (partitions): location information. (line 14) 2692* Zip disks (raw SCSI access): miscellaneous flags. (line 17) 2693* ZipTools disk: mzip. (line 6) 2694 2695 2696 2697Tag Table: 2698Node: Top872 2699Node: Location3129 2700Node: Common features4067 2701Node: arguments4831 2702Node: drive letters6492 2703Node: directory7846 2704Node: long names8292 2705Node: name clashes10838 2706Node: case sensitivity13122 2707Node: high capacity formats14359 2708Node: more sectors15404 2709Node: bigger sectors16459 2710Node: 2m17188 2711Node: XDF18374 2712Node: exit codes19717 2713Node: bugs20355 2714Node: Configuration20888 2715Node: configuration file location22177 2716Node: general syntax22630 2717Node: default values23461 2718Node: global variables23989 2719Node: per drive variables26182 2720Node: general information27017 2721Node: location information27459 2722Node: geometry description28988 2723Node: open flags32849 2724Node: miscellaneous variables33449 2725Node: miscellaneous flags35525 2726Node: multiple descriptions39155 2727Node: parsing order40829 2728Node: old style configuration41860 2729Node: Commands42559 2730Node: floppyd44481 2731Node: floppyd_installtest49274 2732Node: mattrib49905 2733Node: mbadblocks51700 2734Node: mcat52994 2735Node: mcd53808 2736Node: mclasserase54669 2737Node: mcopy55345 2738Node: mdel58363 2739Node: mdeltree58702 2740Node: mdir59121 2741Node: mdu60397 2742Node: mformat60903 2743Node: mkmanifest69414 2744Node: minfo71388 2745Node: mlabel71958 2746Node: mmd73111 2747Node: mmount73460 2748Node: mmove74063 2749Node: mpartition74868 2750Node: mrd80394 2751Node: mren80752 2752Node: mshortname81501 2753Node: mshowfat81831 2754Node: mtoolstest82240 2755Node: mtype82812 2756Node: mzip83663 2757Ref: mzip-Footnote-185688 2758Ref: mzip-Footnote-285769 2759Node: Compiling mtools86056 2760Node: Porting mtools87155 2761Node: Command Index93063 2762Node: Variable Index93191 2763Node: Concept Index95014 2764 2765End Tag Table 2766