Skip to main content

Getting a Maxtor OneTouch External Hard Drive to Work with Linux

The 60GB disk on my laptop has become a huge limitation recently and instead of having to burn my movies onto DVDs regularly, I opted to shell out a whopping $65 (thanks to a BestBuy sale and $25 coupon) to buy a 120GB external mini-hard drive. It is not only tiny (weighing 7.2 oz) but it does not require an external power source as it can simply plug into my laptop's USB port.

While this hard drive does come with a lot of cool features like one-touch backups and file encryption for Windows and Macs, one would be lucky to just get it to work for Linux. For one, it comes formatted in NTFS format and is not writable initially. I will describe how I got it to work below. For starters, here are some specs of my system:

Pentium M 1.5MHz Banias, 60GB HD, 768MB DDR SDRAM, Linux version 2.6.20-15-generic (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Sun Apr 15 07:36:31 UTC 2007


First, power up the external HD simply by plugging it into your computer. Most recent Linux systems should automatically recognize the external HD and probably auto-mount it. You can check if and where the HD is mounted by looking through the log files (/var/log/messages) or search the kernel logs (dmesg | tail ). For example, 'dmesg | grep -A 10 Maxtor | tail -10' gives:


Eritrea(berhane)% dmesg | grep -A 3 Maxtor | tail -3[ 94.604000] SCSI device sdb: 234441648 512-byte hdwr sectors (120034 MB)
[ 94.604000] sdb: Write Protect is off
[ 94.604000] sdb: Mode Sense: 17 00 00 00



Apparently the 120GB HD is labeled as '/dev/sdb'

There is some junk on the external HD that might be of some use to Windows/Mac users, so we can first copy those items to another location before repartitioning and formatting the disk. So, lets mount the HD and copy stuff off it.



cd /mnt
mkdir externalHD
mkdir /root/Maxtor
mount /dev/sda externalHD
cp -r externalHD/* /root/Maxtor/


Now, lets proceed to looking into the partition table for the external disk and change it into something we want.


fdisk /dev/sdb



Enter 'm' to see list of options if you have not used fdisk before. To see the partition table, enter 'p'. You probably see an NTFS partition if not more than one filesystem. Enter 'd' and delete the existing partitions until there are none left.

Not that the HD is clean, it is time to create new partition(s). I wanted one giant partition I could use for backing up my system, so I entered 'n' to create a new partition,and set the starting block at 0 and ending block to the last(default). I set the partition as primary, since you can have as many as four primary partitions per drive in Linux. The new parition table looks like:


Device Boot Start End Blocks Id System
/dev/sdb 1 14563 117640009+ 83 Linux


Enter 'w' to write the partition table. Thank fdisk and exit out of fdisk mode. Now, it is time to format the filesystem. To do that, enter

mkfs -t ext3 /dev/sdb


This process will probably take a while but it is the last thing you need to do to get the new external HD up and working.

When the external HD is connected, one would usually want the drive to be mounted automatically to a specific directory. To do so, it is necessary to add a line to '/etc/fstab' corresponding to this external HD. My addition looks like this:


/dev/sdb /mnt/externalHD auto users,noauto,atime,rw,dev,exec,suid 0 2


Well, that's it.

Comments

Popular posts from this blog

Distribution of Wealth in the US

The rich get richer and the poor get poorer. I heard this statement quite a bit lately particularly in light of the sub-prime mortgage and general housing crisis in the US. The country has enjoyed significant economic prosperity and both Clinton and Bush boasted economic growth under their reign. Unfortunately, the beneficiaries of the economic boom are not people from all economic backgrounds, but rather the top 10%. To make things worse, Bush gave tax cuts mainly targeting the top 10%. Being more of a numbers guy, I always wanted showing the validity of the-rich-get-richer-n-the-poor-get-poorer statement. Thanks to Wikipedia , I have finally found it!! Both the mean and median net worth of families for the bottom 50% of the population has remained absolutely flat while the 75th-90th percentile see a decent growth and the top 10% enjoy the most appreciation on their net worth. So, if you factor in inflation, the-rich-get-richer-n-the-poor-get-poorer probably holds true. The g...

IPtables, SVN, and NMAP

I reviewed some material on IPtables, SVN, and NMAP just for the sake of keeping my mind busy. Here are some useful notes: IPtables - best resource found at HERE SVN - best, as in the quickest and simplest intro could be found HERE NMAP - I honestly don't see in using it for more than port-scanning in a few instances. Anyway, here are a few other options that might come in handy at some point. nmap -sT/sS/ sX/sF/...[-P0] IPADDRESS(range) == to check which ports are open nmap -sP IPADDRESS(range) == a simple ping scan for availability nmap -sO IPADDRESS(range) == check what IP protocols are available nmap -sV IPADDRESS(range) == a scan with version detection Other useful flags: -O == detects OS, part of -v (verbosity) flag as well -A == detects OS and versions -v == request high verbosity/detail -F == performs a fast scan of only a few common ports Installing Perl modules Perl modules may be installed using the CPAN module or from source. SOURCE...

Reasons to Vote for Barack Obama

Not that I am eligible to vote or anything ... but if I could, I would vote for Barack Obama for the following reasons. He listens to experts . He has assembled a group of smart and practical intellectuals to advise him on all sorts of topics. Hillary has her own agenda and ambition which appears to keep her from entertaining any "elitist" agenda. He is a good manager. The way he hired very intelligent people to run a nearly flawless campaign to beat an established and seemingly unbeatable opponent in Hillary Clinton is commendable. He really knows how to surround himself with a smart group of people who can get things done and that is exactly what this country needs. Hillary hired people on the basis of their loyalty and counted on friends of the Clintons to win her the nomination. Unfortunately, all that influence and political capital could not overcome the grassroots movement Obama initiated. He is not an ideologue . That allows him to make good decisions for this...