Getting your Maxtor OneTouch External Hard Drive working in Fedora Core GNU/Linux
(This isn't really hard drive or distribution dependent, though.)
Obligatory Disclaimer
- The content of this page, and the opinions expressed within, may or may not be representative of my own ideas. They do not, however, reflect the views of the University of Michigan in any way.
- I am not nearly an authority on any of this. So all the information that follows can be outright wrong. Use any of it at your own risk. I am not responsible for any resulting damages. If this scares you, stop reading.
The Instructions
- Boot into Fedora, as usual.
- Unpack your Maxtor OneTouch External Hard Drive, plug it into the nearest power socket and connect it to the computer using the given USB cable. (I didn't try the FireWire option, yet).
- You can "feel" that your computer recognizes something else is in its presence.
-
Just to make sure anyway, you run
[hnarayan@localhost hnarayan]$ dmesg | tail scsi0 : SCSI emulation for USB Mass Storage devices Vendor: Maxtor Model: OneTouch Rev: 0201 Type: Direct-Access ANSI SCSI revision: 02 USB Mass Storage device found at 2 usbcore: registered new driver usb-storage USB Mass Storage support registered. SCSI device sda: 490232832 512-byte hdwr sectors (250999 MB) sda: assuming drive cache: write through sda: sda1 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0Voila! It sees it and all looks well. If you get a different output, don't panic yet, just type[hnarayan@localhost hnarayan]$ dmesg | grep Maxtor Vendor: Maxtor Model: OneTouch Rev: 0201If you see this, just run the dmesg command on its own and scroll through looking carefully to where a section similar to the one above shows up. If nothing of this sort shows up, unplug, plug back in, and repeat the command. If it still doesn't show up, you're probably screwed. Or you're doing something stupid, like not turning on the power somewhere.
-
In the previous step, note what it says in the second last line, sda: sda1. This just means the new hard disk is going to be referred to as /dev/sda1 in computer-speak. Good, so you then type (replacing sda1 below with what it told you in your output)
[hnarayan@localhost hnarayan]$ su Password: [root@localhost hnarayan]# /sbin/fdisk /dev/sda1
Warning: I've just been informed that you ought to work with /dev/sda rather than /dev/sda1 when using fdisk, otherwise it results in partitions named sda1p1 and so on if you're creating multiple partitions, which don't have nodes. And that's not pleasant.
And you're in fdisk. There are a lot of things one could possibly do in fdisk (type 'm' followed by enter to see different options), but we'll stick to the basics. -
First, we print the existing partition table ('p') to get this wonderful output.
Device Boot Start End Blocks Id System /dev/sda1p1 ? 120513 235786 925929529+ 68 Unknown Partition 1 does not end on cylinder boundary. /dev/sda1p2 ? 82801 116350 269488144 79 Unknown Partition 2 does not end on cylinder boundary. /dev/sda1p3 ? 33551 120595 699181456 53 OnTrack DM6 Aux3 Partition 3 does not end on cylinder boundary. /dev/sda1p4 ? 86812 86813 10668+ 49 Unknown Partition 4 does not end on cylinder boundary.For reasons best known to them, drive manufacturers seem to like to pre-partition drives in these and other different sorts of ways. Anyway, all we're going to do is delete them with the 'd' key. So you go 'd', delete partition 1, 'd' delete partition '2' and so on, until you've removed all 4. Now if you hit 'p', you get the nice blank output below.Device Boot Start End Blocks Id System
-
Good, now that this is an empty drive, we say 'n' and create a new primary partition. Just hit enter when it asks you about start and end blocks, as it will pick the defaults and fill the drive. Which is what I want. It will also default it to a "Linux partition" (83), and then hitting 'p' to verify this yields the output that follows.
Device Boot Start End Blocks Id System /dev/sda1p1 1 30514 245103673+ 83 Linux
-
Everything seems in order. Now we hit 'w' to write this partition table to the drive. When I did this, it complained about not being able to write this cleanly in memory, or something. No matter, shut down the machine, remove the drive and reboot as usual. Plug it in, and then do the dmesg thing again for good measure, if you're the careful sorts. Anyway, you then run (as root)
[root@localhost hnarayan]# /sbin/mkfs -t ext2 -j /dev/sda1 mke2fs 1.35 (28-Feb-2004) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 30654464 inodes, 61277926 blocks 3063896 blocks (5.00%) reserved for the super user First data block=0 1871 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 23 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.And grab yourself a cup of coffee (or two) while you're idling waiting for it to finish formatting the drive with a spanking new ext3 partition.
-
Back so soon? Now that it's done, we proceed to mount the drive to some nice sounding location (/mnt/external/) to be able to use it in the future.
[root@localhost hnarayan]# mkdir /mnt/external [root@localhost hnarayan]# mount /dev/sda1 /mnt/external
-
Again, just for good measure, we type
[hnarayan@localhost hnarayan]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/hda3 6.0G 5.6G 126M 98% / none 253M 0 253M 0% /dev/shm /dev/hda2 49G 48G 1003M 98% /mnt/windows /dev/sda1 231G 33M 219G 1% /mnt/externalThat's it, you can now use /mnt/external/ as any other directory.
-
The only thing to remember here is, upto now we've not done anything to get it to 'automount' on the next and subsequent boots (if you're keeping the external drive plugged in at all times) or mount it when it is plugged in. For this, you add the last line in the following to your /etc/fstab.
LABEL=/ / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/hda5 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 /dev/hda2 /mnt/windows ntfs ro,umask=0222 /dev/sda1 /mnt/external ext3 rw,noauto,user 1 0With this, it's set up so that, when you plug the drive in, you can mount (and later unmount) by typing the following.[hnarayan@localhost hnarayan]$ mount /mnt/external/ [hnarayan@localhost hnarayan]$ umount /mnt/external/And that's it, for real. I guess.