,,, Type mkfs.ext2 /dev/hdxy where you change the ext2 by the filetype you want (e.g. ext2, ext3, reiserfs,...) and the x by the letter of your drive and y by the number of the partition you want to format. (e.g. /dev/hda1, /dev/hdc32,...). Using the -j option (mke2fs -j) will create the ext3 (or journaled) file system that is much more resistant to the unexpected power loss.(Under Linux, you can also format the hard drive in FAT file system that is readable from Windows (use mkfs.vfat instead of mkfs.ext2). However such partition cannot store the root of the Linux operating system).
Boot from a live CD

,Open a terminal window (usually something like xterm or konsole)

,Log in as root by typing su or sudo -i

,
Enter the code.
{"src": "wikihow-all_test", "title": "How to Format a Hard Drive5"}