145 lines
5.1 KiB
HTML
145 lines
5.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Zip Drive Mini-HOWTO: Using the ZIP drive</TITLE>
|
|
<LINK HREF="ZIP-Drive-7.html" REL=next>
|
|
<LINK HREF="ZIP-Drive-5.html" REL=previous>
|
|
<LINK HREF="ZIP-Drive.html#toc6" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="ZIP-Drive-7.html">Next</A>
|
|
<A HREF="ZIP-Drive-5.html">Previous</A>
|
|
<A HREF="ZIP-Drive.html#toc6">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s6">6. Using the ZIP drive</A></H2>
|
|
|
|
<P>If you have built in all the required components, the kernel should
|
|
recognize your adapter and drive at boot time. If you are using a
|
|
loadable module for your driver, the following discussion applies once
|
|
that module is loaded.
|
|
<P>For the most part, the SCSI and parallel versions of the drive behave
|
|
identically, except that the parallel version is somewhat slower.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ss6.1">6.1 Fdisk, mke2fs, mount, etc.</A>
|
|
</H2>
|
|
|
|
<P>Once you know the drive name for your ZIP drive, you are set. You can
|
|
manipulate the drive with the normal Linux disk management commands.
|
|
<CODE>fdisk</CODE> (or perhaps <CODE>cfdisk</CODE>) is used to manipulate the partition tables
|
|
on the disk. <CODE>mke2fs</CODE> can be used to format a partition with the ext2
|
|
filesystem - the one most commonly used in Linux. <CODE>mount</CODE> is used to
|
|
connect a formatted partition into your directory hierarchy.
|
|
<P>You should study the manual pages for these tools if you are not
|
|
familiar with them. Be warned that there are now several quite
|
|
different versions of the <CODE>fdisk</CODE> program - be careful.
|
|
<P>I'll describe two common scenarios.
|
|
<P>
|
|
<H2><A NAME="ss6.2">6.2 An existing DOS formatted disk</A>
|
|
</H2>
|
|
|
|
<P>If you have a ZIP disk with a DOS file structure that was originally
|
|
created by Iomega's tools, the partition scan should say that the disk
|
|
has one partition, <CODE>/dev/sda4</CODE>.
|
|
<P>You should make a place to mount the disk, lets say <CODE>/zip</CODE>, and then
|
|
mount it as an MS-DOS filesystem:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
mkdir /zip
|
|
mount -t vfat /dev/sda4 /zip
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>You could also use msdos instead of vfat. vfat supports long filenames
|
|
where msdos does not.
|
|
Now, the files on the disk should appear in /zip. While the disk is
|
|
mounted, you will not be able to remove it. When you are finished
|
|
with the disk you can umount it to release it and detach it from your
|
|
directory hierarchy.
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
umount /zip
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>Once you've made the /zip mount point - you don't need to do it again,
|
|
so you could come back later and mount something else there.
|
|
<P>
|
|
<H2><A NAME="ss6.3">6.3 Re-format as a native Linux disk</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>If you want to erase a ZIP disk and make a Linux native file system on
|
|
it. You should use fdisk on the entire disk:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
fdisk /dev/sda
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>and delete any existing partitions (with the <CODE>d</CODE> command). Then create
|
|
a new partition with the <CODE>n</CODE> command, make it primary partition number
|
|
1, use <CODE>w</CODE> to write the partition table to disk, and quit with
|
|
<CODE>q</CODE>.
|
|
<P>Format the partition
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
mke2fs /dev/sda1
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>(The 1 is the number that you gave this partition in <CODE>fdisk</CODE>). Now you
|
|
can mount the disk:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
mount -t ext2 /dev/sda1 /zip
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>(re-using that mount point we created before).
|
|
<P>
|
|
<H2><A NAME="ss6.4">6.4 fstab entries</A>
|
|
</H2>
|
|
|
|
<P>The /etc/fstab allows you to configure the mount command. I like to
|
|
be able to mount and write to the zip disk from any login id on the
|
|
system. I added 2 lines to the end of the fstab file that look like this.
|
|
<P>
|
|
<PRE>
|
|
/dev/sda1 /zip ext2 noauto,rw,user,nosuid,sync
|
|
/dev/sda4 /zipdos vfat noauto,rw,user,nosuid,sync,mode=0777
|
|
|
|
</PRE>
|
|
<P>These entries assume that you have a /zip and a /zipdos directory. If
|
|
you want all users ids to read and write, make sure you set the permissions.
|
|
For exmaple <B> chmod 666 /zip </B>. You must do the chmod as root.
|
|
The fstab entries also assume that your dos disks are partitioned as 4
|
|
(sda4 in my case), and the ext2(linux) disks are partitoned as 1 (sda1).
|
|
You can read more about the fstab options with <B>man mount</B>
|
|
<P>With the fstab entries as above you can mount a dos disk with
|
|
<B> mount /zipdos </B>
|
|
If you are using a linux ext2 disk then use the command
|
|
<B> mount /zip </B>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ss6.5">6.5 The ZIP Tools disk</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>There is some extra work to be done if you want to use the disk that
|
|
comes with the ZIP drive. As shipped, the software controlled write
|
|
protection is enabled. Most people have unlocked the disk under DOS
|
|
before ever trying to use it with Linux. Linux cannot access a locked
|
|
disk, and it must be unlocked with Iomega's tools.
|
|
<P>A native Linux program to manage the write protection feature, among
|
|
other things, is expected to be available soon.
|
|
<P>
|
|
<P>
|
|
<HR>
|
|
<A HREF="ZIP-Drive-7.html">Next</A>
|
|
<A HREF="ZIP-Drive-5.html">Previous</A>
|
|
<A HREF="ZIP-Drive.html#toc6">Contents</A>
|
|
</BODY>
|
|
</HTML>
|