The Haus

ATAPI Zip Drives in Linux

February 6, 2000 -- by A.T. Hun

Please Note! I did this in Red Hat 6.0 and 6.1. It should work very similarly on other variants of Linux. As always, make sure you backup your files before editing them! When I say to type a command, you obviously need to hit enter to execute it--but you knew that already, didn't you :)

First, a little bit about the way Linux handles IDE drives. Most systems have two IDE channels to which two devices each can be attached. Here are the names Linux assigns to the various devices:

On my system, I have a 17.2G hard drive devoted to Windows 98 (hda) and a 4.3G drive devoted to Linux (hdb) on the primary channel. On the secondary channel I have my CD-ROM drive (hdc) and my Zip drive (hdd). Iomega recommends you put the Zip drive on a different channel than your hard drive and that you make it a slave to any other device with which it shares a channel. Thus your Zip drive will be either hdc or hdd, depending on whether it is alone or a slave.

For some reason, Linux considers Zip disks with the default formatting to have all its information on partiton 4. Don't ask me why. I have heard that some Zip disks have everything on partition 1, but I believe that only happens if you format it again with a non-Win95/98 operating system.

Log in as root and type cd /mnt. Then type mkdir zip. This will create the mounting location for your zip drive. (You can actually create the /zip directory anywhere you want, but I know I'll always remember where it is if it is under /mnt.)

Next type cd /etc. Use your favorite text editor to open up the fstab file (don't use pico, its word-wrapping will mess up the file). At the end of the file add this line:

/dev/hdx4 /mnt/zip vfat noauto,user 0 0

Make sure to replace the x in /dev/hdx4 with the actual letter for your drive (in my case, it is /dev/hdd4). This tells Linux what to do when you mount the drive. It tells it to mount the Zip device (/dev/hdd4) to the /mnt/zip directory. vfat tells Linux that the disks will be in Win95/98 format (the default format for store-bought Zip disks). noauto instructs Linux not to mount the device on boot-up (auto-mounting is not a good idea with removable media). user gives any user permission to mount the device (normally, only the root user can mount a device). Explaining what the 0 0 are for would take too much time for too little good. If you really want to know, type man fstab for all the details.

To use the Zip drive, insert a formatted disk and type mount /mnt/zip. To see the contents of your disk, type ls /mnt/zip. Before you remove a disk, make sure to unmount the device first by typing umount /mnt/zip.

If you don't want to mess with your fstab file, you don't have to. If you want to mount a Zip drive, type mount -t vfat /dev/hdx4 /mnt/zip (once again, replace the x in /dev/hdx4 with the actual letter for your drive). This is, of course, a lot more typing and only the root user can mount/unmount a device. The choice in yours. Enjoy!