Tectips: Hidden FDISK(32) Options
Total Page:16
File Type:pdf, Size:1020Kb
WHITE PAPER TecTips: Hidden FDISK(32) Options Guide Previously Undocumented Options of the FDISK Utility Released Under Microsoft Windows95™ OSR2 or Later Abstract 2 Document Conventions 2 Read This First 3 Best-Case Scenario 3 Windows Startup Disk 3 How to apply these options 3 FDISK(32) Options 4 Informational Options 4 Behavioral Options 5 Functional Options 6 February, 2000 Content ©1999 StorageSoft Corporation, all rights reserved Authored by Doug Hassell, In-house Technical Writer StorageSoft White Paper page 2 FDISK(32) Command Line Options Abstract Anyone that remembers setting-up Windows 3.x or the first Win95 release surely knows of the text-based utility, fdisk.exe. Some of those may even be aware of the few, documented switches, such as /status, /x or even the commonly referenced /mbr. Even fewer would be aware of the large table of undocumented command-line options - including automated creation, reboot behavior, and other modifiers - which we will divulge in this document. Note that all options given here are not fully tested, nor are they guaranteed to work in all scenarios, all commands referenced apply to the contemporary release of Win95 (OSR2 - version “B” - or later, including Win98 and the up-and-coming Millennium™ edition). For our recommendation on how to use these swtiches, please refer to the “Read This First” section. Document Conventions In this document are certain references that deserve special recognition. This is done through special text- formatting conventions, described here… v Words and phrases of particular importance will stand-out. Each occurrence of this style will generally indicate a critical condition or pitfall that deserves specific attention. v The instructions to follow will include descriptions of DOS commands. Since such commands are very explicit in nature, each will be presented on a separate line in a bold, mono-space style to better communicate the exact characters that need to be typed. Also, when the command should be entered at a specific location, the default DOS prompt text will also be shown, but in normal type. The following example shows the command that will quickly format (erase) a previously-used diskette in the A: drive... C:\> format a: /q /u v This document contains references to certain files by name. The names of these files will appear in lowercase and in boldface (e.g., open the readme.txt file for more information). Filenames will always include the file-extension, however the file-extension is not always visible in environments such as Windows Explorer. Refer to the Windows Help Topics for information on making file-extensions visible. Disclaimer This document makes references to trademarks owned by third parties. The first occurrence of said trademarks will show the trademark symbol (™) and directly indicate ownership, where all rights are presumed to be reserved. Subsequent occurrences of the same trademarks will presume implicit ownership (no ™ symbol), both to enhance readability and to eliminate elements that might detract from context. Linguistic variants of a trademark will not be indicated in any way, and are presumed to be “common use” terms. The information presented in this document is to be considered the “best advice” our organization has to offer, however there is no warranty - implied or otherwise - that the given information will give predictable results under any conditions. By applying the information presented here, the reader is making an agreement to accept any and all responsibility of actions taken, based upon said information. The reader also agrees to hold StorageSoft Corporation, as well as its agents, representatives, partners and affiliates, harmless in the event that applying said information results in manifest damages of a real or conceptual nature. StorageSoft White Paper page 3 FDISK(32) Command Line Options Read This First As many will already know, FDISK is not a tool to be used lightly. If the intended drive is not already erased, use of FDISK can likely result in complete data-loss. Applying any of the options presented in this document constitutes an understanding of this possibility, as well as acceptance and responsibility on the part of the reader for all resulting consequences. Best-Case Scenario FDISK is not a cutting-edge tool, by any means. It is still the “low level”, basic functionality tool of professionals and amateurs alike, offering a simplified interface for simple partitioning functions. As most are already aware, FDISK will directly modify the system-level data structures on a hard drive, often without regard for existing contents. This also means that FDISK works best when the active system is not dependent upon the hard-drive in any way (i.e., system was not booted from the hard-drive). Windows Startup Disk Since the context of this paper revolves around recent Win95/Win98 versions, a prudent measure before applying any of these commands would be to create a Windows Startup Disk. To make one, simply boot a Win9x machine normally, navigate into Control Panel | Add/Remove Programs, and select the tab labeled Startup Disk. Click the button that reads Create Disk and provide a regular, 3.5”/1.44MB diskette when prompted. (The Win9x Installation CD, or at least the Setup Files from the CD, will be necessary). The purpose of the Startup Disk is as a “backup” for booting the system. While this disk includes the FDISK utility, it should not be modified for use with any of the options described herein. Use this disk only in an emergency, when it is critical to start the system in a standardized environment, or when attempting to recover data. How to apply these options For the options that follow, make a diskette with simply the DOS Mode system files, and the fdisk.exe program. This is done most-easily by using the Windows Format Disk applet (right-click on a Floppy Drive icon - A: or B: - and select Format...), then copying the fdisk.exe program-file (in the \windows\system\command folder, right-click on fdisk.exe and select Send To | [Floppy Drive]). After the diskette is made, the options described herein can be manifested as a batch program; either included in the autoexec.bat file, or as a stand-alone batch script. Use Windows Notepad, or a similar text- editor application, and save the file with the .bat extension (be sure to select File Type of “All Files”). Whichever method is chosen, always boot from diskette when using these FDISK options! StorageSoft White Paper page 4FDISK(32) Command Line Options FDISK(32) Options The options that follow have been sorted into three categories... Informational Such options have no real effects, but rather display important information Behavioral These options only change how FDISK behaves, and do not make any significant changes on their own Functional These options will have real results, the hard-disk system area will be changed With careful planning and execution, this information can help one to become a powerful master of the FDISK tool, and may even make setting-up the next hard-drive a quick and efficient task. Informational Options Actually, there is really only one option that qualifies in this category: Display Status /status Displays the partition-table in its current state, and in a practical format. The tabulated headings are as follows... Disk The number representing the order of the installed hard-drive(s). (e.g., the first hard-disk appears as disk 1) Drv This column shows which partitions have been assigned as DOS Logical drives (drive-letters). Any rows that do not show anything under Disk or Drv represent partitions that can not be read by DOS or Windows (only the size is shown). Mbytes The size of the disk/partition in MB. At the bottom of the screen, FDISK also shows the value used for Mbytes (not exactly 1 million). Free If the hard-disk is not fully allocated, the amount of free space (also in Mbytes) is shown here. On a drive that is fully allocated, this column will appear blank. Note that this column does not reflect free space within any of the partitions, only space on the hard-disk that is not allocated. Usage Only applies to rows for the hard-disk(s), not partitions, this value displays the percentage of allocated space over total capacity. On a fully-allocated hard-disk, this value would be 100%. Use of this option has no effect on the partition table, and can even be safely used within the Windows environment at a DOS prompt. This means that it is not only appropriate in a batch program, but may also be used as the command-line in a Windows Shortcut. StorageSoft White Paper page 5 FDISK(32) Command Line Options Behavioral Options Each of the following four options has a specific purpose, especially when used in combination with the Functional Options in the following section. Careful review of these options is recommended before applying any of the Functional Options. In short, FDISK already uses an automated system when creating new partitions and/or volumes. These options will over-ride such behavior, often in a manner that would reflect the behavior of older (Win95 “original retail”, or MS-DOS) versions. Prompt for FAT16/32 on each partition /FPRMT By default, FDISK prompts for “Large Disk Support” whenever a hard-disk of >512MB is detected. This selection, however, will only enable FDISK to use FAT32 partition-types when the partition-size is also >512MB. Using this option, FDISK will prompt to use FAT16 or FAT32 types for each partition or volume that is created during that session, regardless of size. Because of the option to over-ride the >512MB convention, use of this option can give unpredictable results.