How to format a disk drive

From ArticleWorld


In order for software to use a hard drive, it has to be formatted, just like floppy disks. Different operating systems often use different file systems, so formatting the hard drive depends on what operating system you want to use with it. If you plan to use Unix/Linux, Windows 9x or Windows XP, the procedure is as following:

For Windows 9x

  1. Backup any important data you may have.
  2. Boot from a floppy disk. You may have to create a boot floppy disk (or startup floppy) if you do not have one.
  3. When you get to the DOS prompt (usually "A:\>" when booting from a floppy disk), type:
format c:

The operation will take a while, depending on the drive's capacity and your computer's processing power.

For Windows XP

  1. Backup any important data you may have on your hard disk
  2. Boot from your Windows XP CD-ROM, and select the Recovery Console option
  3. At the prompt, type:
format c:

This will format the system using the NTFS file system

For Unix/Linux systems

These systems can use several file systems to boot from. We will only discuss the usage of the ext2 filesystem, since it is the most commonly supported. You may want to check the documentation associated with other file systems if you want to use them.

  1. Boot from a Live CD or a boot disk.
  2. If you are using X, open a terminal window (xterm, Konsole, Gnome Terminal or anything else).
  3. At the login prompt, type su to login as root.
  4. Type:
mkfs.ext2 /dev/hd<>

Change <> according to what drive you need to format. Consult the operating system's documentation if you are unfamiliar with the disk naming scheme.