So, naturally, I decided to reformat my external hard drive to NTFS. There are certainly other options: HFS for Mac users or EXT3 for Linux users, but I need it to work on Windows 7, Mac, and Linux. After some quick research, it seems NTFS has at least some form of support in all three platforms.
Find the External Hard Drive Device
The first step is finding the hard drive to zero and format. After plugging in the device, the /dev/ directory should list the external device if it was recognized:
cd dev ls s*
sda sda1 sda2 sdb sdb1
Note: For the sake of example, /dev/sdb1 is the path to my external device! This will vary depending on the number of internal and external hard drives on the system.
Before continuing, the target device must not be mounted. To check, simply run this command:
mount | grep /dev/sdb1
umount -l /dev/sdb1
Clearing Partitions and Creating A New Partition
The goal is to have a single partition to hold all of my files. So, using the fdisk tool, partitions can be altered on the device:sudo fdisk /dev/sdb
The following menu should appear:
Command (m for help):
Command (m for help): d Selected partition 1
Command (m for help): n Command action extended primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-121597, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-121597, default 121597): Using default value 121597
Now, let fdisk write the changes:
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
Formatting the New Partition to NTFS
In my particular case, I needed NTFS, but this part applies to any filesystem you desire.A simple way to format a new filesystem is to use mkfs. More information about it can be found here: http://www.linfo.org.
Just execute a simple command:
sudo mkfs.ntfs /dev/sdb1
That's pretty much all! Comment or email if you have any questions/suggestions.
Resources:
mkfs Formatting: http://ubuntuforums.org/showthread.php?t=267869
This post save a lot of my time. Thanks
ReplyDelete