Here is a sample output from cardinal’s dmesg command:

Partition check
hda: hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >
hdb: hdb4
ide-floppy: hdc: I/O error, pc = 5a, key =  5, asc = 24, ascq =  0
ide-floppy: Can't get drive capabilities
hdc: 98304kB, 32/64/96 CHS, 4096 kBps, 512 sector size, 2941 rpm
hdc: The drive reports both 100663296 and 0 bytes as its capacity
VFS: Mounted root (ext2 filesystem) readonly.
hdc: 98304kB, 196608 blocks, 512 sector size

This shows the partitions of the primary harddrive (hda) and the small back-up hard drive (hdb). These are real hard drives. Then is the message regarding the removable media hard drive, the zip which is hdc.

This drive is mounted as follows:

mount -t msdos /dev/hdc4 /mnt/zip

Before you eject the disk, you must:

umount /dev/hdc4

20.10.98 cxe - made an improvement here: Added the zip drive to the /etc/fstab file and created a symbolic link so that this is possible: mount /dev/zip unmount /dev/zip

The CDROM is the same way:

mount /dev/cdrom
unmount /dev/cdrom

And the floppy drive:

mount /dev/floppy
unmount /dev/floppy

Of course, if it is a dos floppy, you still need to do this:

mount -t msdos /dev/floppy /mnt/floppy
unmount /dev/floppy

See notes, "floppyhelp.cxe" for more info on floppies.

How To Use Zip Disks

First, you need to format them. I have one that was Mac formatted which requires an additional step. Since the Mac filesystem in no way, shape of form has anything to do with the MSDOS system, it actually uses a different hard drive partitioning scheme. You must partition the disk yourself using:

# fdisk /dev/hdc

DON’T screw up the device name!!! Use dmesg to check what devices the kernel thinks are what. Also doing "cat /etc/fstab" prints out the current filesystem table that is often helpful in these matters. In fdisk, you want to do "n" to add a new partition (presuming none exist). Start with cylinder 1 as it suggests and have this partition end with cylinder 32 or whatever the maximum happens to be. Use "p" to list the partitions - note the new name of the partition you just made, for example /dev/hdc1. I got some sort of error message from the fdisk "p" listing, but it seemed ok to ignore; I suspect it just isn’t optimised for Zip architecture. Use "w" to write this new scheme to the disk.

Now you need to actually format it with a file system:

# mke2fs -c -v -L "diskname" /dev/hdc1

This checks the disk (-c), prints verbose output (-v) and lables the disk (-L) in addition to formatting it for Linux use. One potential annoyance is that the mke2fs command reserves space for the superuser. This means that you wind up missing 5% of the disk. Use the -m argument with 0 like:

# mke2fs -c -v -m 0 -L "diskname" /dev/hdc1

This gives maximum space (which seems to be about 93 MB - use "df -h" to check). After it is formatted, you then need to mount it to the main filesystem tree:

# mount -t ext2 /dev/hdc1 /mnt/zip/

When you’re done and you want to eject the zip, do this:

umount /mnt/zip