Tuesday, May 18, 2010

"fdisk" Command

Fdisk is one of the more commonly used MS-DOS commands, even today with Windows 95 and Windows 98. Fdisk allows the user to delete and/or create partitions on the hard disk drive. MS-DOS 3.3x and below used and MS-DOS 4.x and above uses fdisk.exe. The fdisk command is an external command that is available in All Versions of MS-DOS, Windows 95, Windows 98 and Windows ME. Windows 2000 and Windows XP users can use diskpart command.

Syntax: FDISK [/STATUS] /X
  • /Status - Displays partition information.
  • /X - Ignores extended disk-access support (will not use LBA support). Use this switch if you receive in symptoms like Unable to access a drive from DOS versions prior to 7, Disk access messages, Stack overflow messages, High amounts of data corruption or Extra drive letters.
Secret Fdisk Switches
  • FDISK /MBR - Command used to rewrite the Master Boot Record.
  • FDISK /CMBR [DISK] - Recreates the Master Boot Record on specified disk. Performs the same functions as FDISK /MBR except can be used on other disk drives.
  • FDISK 1/PRI:100 - Creates a 100 MB DOS partition on the hard drive.
  • FDISK 1/EXT:500 - Creates a 500 MB meg extended DOS partition on the hard drive.
  • FDISK 1/LOG:250 - Creates a 250 MB logical drives on the hard drive.
  • FDISK /Q - Prevents fdisk from booting the system automatically after exiting fdisk.
  • FDISK /STATUS - Shows you the current status of your hard drives.
  • FDISK /ACTOK - Makes FDISK not check the disk integrity allowing the drives to be created faster.
  • FDISK /FPRMT - Will not get the prompt for FAT32 support, in addition allows FDISK to be forced into using FAT32 on drives smaller than 540MB (by default FDISK will not use FAT32 on any drive smaller than 540MB). Finally this command can only be used with FDISK that supports FAT32.
Example: fdisk
  • The first screen will ask if you wish to enable the new FAT, which is FAT32. Enter Y.
  • The below screen is displayed if one or more of the hard drives within your computer is using NTFS. This screen will usually only be displayed if you are dual booting your computer with Windows 95 OSR2 / Windows 98 and Windows NT. Within this screen you have two options to choose from: either Y for Yes, to enable the drives to be treated as large; or N for No, to not treat the drives as being large. These are following options:
    • Creating DOS partition or Logical DOS Drive - Choose this option if you need to create a partition on your computer hard drive. If you are planning to recreate your partition you will first need to choose 3 to delete the partition.
    • Set active partition - If you have created multiple partitions on your hard drive, choose this option to specify which partition you want to be the active partition. This is used to specify which partition the computer is going to look at to boot from. If this partition does not have an operating system you will receive "Non system disk" when booting up your computer. When choosing option 2 to set active partition, you will see a listing of the current partitions; choose the number representing the partition you wish to set active, the default is one. 
    • Delete partition or Logical DOS Drive - This option is used if you need to delete partition(s) from the computer's hard disk drive. 
    • Display partition information - Use this option to look at the current Fixed disk drive partition information. If you have multiple drives, you will need to choose option 5 before being able to display the other hard drive's information. 
    • Change current fixed disk drive - This option will only show if you have multiple drives within the computer. Using this option you will be able to toggle from one fixed drive to another. 
  • Option 1 - Using the options within this screen you will be able to create the various different partitions. These options will only allow you to create FAT16, and FAT32 partitions if supported and you pressed Y for Yes to enable large disk partitions. If you are attempting to create NTFS partitions, use Windows NT Disk Manager.
    • Create Primary DOS Partition - Choosing this option you will be prompted to use maximum space. If you specify yes, this will use up to 2 GB if creating FAT16 partitions, or up to 32 GB if using FAT32. If you choose no you will be able to specify how large you would like the partition to be. NOTE: you will need to create primary partitions before being able to create Extended or Logical DOS partitions. 
    • Create Extended DOS Partition - If you are using FAT16 and have a 2 GB or higher hard drive or have only specified a small portion of the hard drive as the Primary partition, use this option to create the Extended DOS partition(s) (other drive assignments). The Extended DOS partition will be used to hold the Logical DOS drives; therefore, use the maximum space left on the hard drive. 
    • Create Logical DOS Drive(s) in the Extended DOS Partition - This option is used after you have created an Extended DOS partitions. Once the Extended DOS partition has been created you then can specify the sizes of other partitions you wish to create.
Example - Steve has a six GB HDD and wishes to divide the HDD into three partitions, each using FAT 16.
  • Step 1 - If prompted to use Large Disk support, press N for no because Bob does not want FAT32, he would like FAT16. 
  • Step 2 - Choose option one to create a Primary partition. Once prompted to use maximum space, press N for no and specify 2 GB as the size of the primary partitions  
  • Step 3 - Once the primary DOS partition has been created, choose option two to create an extended DOS partition. Use the maximum space, which would be four GB because two GB has already been used for the Primary Partition. 
  • Step 4 - Create two logical DOS drives, each being 2 GB. 
  • Step 5 - Reboot the computer and format each of the drives to allow them to be accessible.
Assuming Steve only had one hard drive, doing the above Bob would have
  • Drive C - Partition 1 (Primary) FAT 16 
  • Drive D - Partition 2 (Extended/Logical) FAT16 
  • Drive E - Partition 3 (Extended/Logical) FAT16
  • Option 2 - Once a primary partition has been created please ensure that you set the partition as an active partition. 
  • Option 3 - Within this screen you will have the capability of deleting pre-existing DOS partitions. If you currently have no disk space available on your hard drive and wish to create additional partitions, you must first use this screen to delete the partitions and then you will be able to create partitions. NOTE: if you delete partitions, any information on those partitions will be erased and CANNOT be recovered.
  1. Delete Primary DOS partition - Use this option to delete your main primary partition. However, if you currently have any Extended / Logical DOS partitions, you must delete these partitions before you will be able to delete the Primary DOS partition. 
  2. Delete Extended DOS partition - If you have your computer partitions into more than one drive, use this option to delete the extended dos partition(s). You must delete the Logical DOS Drive(s) before you can delete the Extended DOS partition. 
  3. Delete Logical DOS Drive(s) in the Extended DOS Partition - This option would be used first if you have extended DOS partitions and wish to delete the extended partitions. 
  4. Delete Non-DOS Partition - This option is usually used for partitions that either have been created by third-party applications, such as a DDO or other operating systems such as IBM Warp, Unix, as well as various other operating systems.
Example - Steve has created three partitions on one hard disk drive; however, he would like to delete them all.
  • Step 1 - Delete the two logical DOS drive(s) in the Extended DOS partition with Option number three. 
  • Step 2 - Once the Logical DOS partitions have been deleted, choose option number two to delete the extended DOS partition. 
  • Step 3 - Choose option one to delete the Primary partition. 
  • Step 4 - Reboot the computer to allow above changes to take effect.
  • Option 4 - Within this screen you will be able to see what is currently being used and how your computer hard drive is setup. If you see invalid information such as !, *, &, % as the Volume Label, the Partition, or the Status, it is a good possibility that you may have a VIRUS on the computer. The above picture displays information about Extended DOS partitions; if, however, you only have a Primary DOS partition, your screen would only display the partition information and you will only have the option to Esc out of the screen. Choose option YES.
  • Option 5 - This option is only available if more than one Hard Drive is installed within the computer. In the below picture you can notice that we have 3 hard drives listed within this computer. Disk 1 has two partitions, which are C: and D: The hard drive's total space is 3 GB. Then Disk 2 has three partitions E:, F:, and G: and the hard drive total space is 6668, or 7 GB. As you notice in the below picture, there is also a Disk 3, this is actually an Iomega Zip Drive hooked up to the IDE controller on the Motherboard. Other media that is connected to the IDE controller within your computer will usually be displayed within FDISK; however, this is not a hard drive and does not need to be FDISKed, this is why 95MB is free. An exception to this rule would be a CD-ROM.
Regards ComputerHope

No comments:

Post a Comment