Hard Drive Formatting: Linux Style · Sep 29, 12:28 AM by Dylan Doxey
When you've done about all of your hard drive formatting in Linux via the installer wizard, you might discover that you don't even know what we call the Linux file system. At least this is the case for me. I think if anyone ever asked me how my hard drive is formatted, I might have just said, "Linux".
Recently the occasion came up that I wanted to purge an old USB drive and "repurpose" it. I sat there starting at the command prompt like a novelist with writers block. So, a little googling around for formatting external USB drives kept leading me back to mkdosfs, for creating a FAT16/32 file system. Heck, I even found quite a bit of material describing how to make external USBs bootable.
Ultimately I got the answer I was looking for by turning to IRC. I logged into #xubuntu and got a tip from "zoredache".
[22:58]really all you need to do is run the command "mkfs.ext3 /dev/nnn" where nnn is the device name for your drive
And for anyone wondering, how the heck can I be sure what "nnn" is?
Here's a hint:
dylan@AM2-Xubuntu:$ fdisk -l Disk /dev/sdb: 10.0 GB, 10056130560 bytes 255 heads, 63 sectors/track, 1222 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x90209020 Device Boot Start End Blocks Id System /dev/sdb1 * 1 1222 9815683+ 7 HPFS/NTFS
Lessons learned:
- Use fdisk -l to get a snapshot of the types of file systems attached to your machine.
- You can't format a mounted hard drive.
- Formatting is, naturally, an administrative user operation.
- The relevant command for formatting in Linux is mkfs.
- Linux file systems are generally ext3, and ext2.
Well, here's a screen capture which of me doing my first Linux file system format procedure.
( Note: If you're wondering why the volume label was visible without remounting the drive, it's because I remounted via Thunar before executing ls again. )
More information:
http://en.wikipedia.org/wiki/Ext3

Commenting is closed for this article.
Automatic Network Setup Domain Collecting: Not Just For Nerds
