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...

Correlation Between Finger Length and Aggression/Success/Homosexuality

I came across an interesting article on BBC (Finger length 'key to aggression' ) today and The Economist has a similar article ( Neuroeconomics: Digitally enhanced ). They report a positive correlation between the length of mens' ring fingers and their success in high-stress securities trading. Actually, the more correct comparison s between the ratio of the ring to index finger and success/aggression. In women, the ring and index fingers are comparable, however the ring finger is significantly longer than the index finger in men. In this study, the researchers only looked at men's fingers. Apparently the level of testerone in a fetus is exposed to during pregnancy affects length of fingers as well as the level of aggression. More aggressive traders tend to have longer ring fingers and they happen to be more successful, after factoring out the effect of experience. They also reached a similar conclusion when looking at college students. Having a short ring finger...

Online Storage Solutions

Problem: I often need to have some files readily available online so that I can access them from any computer. There are many ways to go about solving this problem and each comes with its set of shortcomings: Yahoo! Briefcase - 30MB limit Online storage services like Box.net, Xdrive, MediaMax - usually cost money; signing up is cumbersome Email to myself as an attachment - enough said there It's time to find a home-made solution. The solution I am about to suggest is intended for -- A *NIX user someone with access to a *NIX web server Solution: I am a linux user and I have user level access to a web server. The web server is configured such that the public does not have access to directory structure. So, I would need to write a script that copies my files to the web server and creates an index listing my files. Password protection of the storage would follow after that. Client Side: Use the following script to transfer file to server, make the file readable by public and execu...