# How do you get an ide zip drive to work

## robaton

I've been through the forum and applied some of the ideas but none of them work. And here's the weird part, my usual (as in other distros):

mount -t vfat /dev/hdd4 /mnt/zip

Has worked twice in mounting the IDE zip drive in Gentoo but that's it. The device is seen when it boots and is on hdd when you dmesg. 

BTW in windows and other distros including the Knoppix CD it works fine. Also, my floppy drive works every time, no problems

Any ideas as to why my IDE zip drive won't consistently mount in Gentoo? Thanks.

----------

## space_monkey

I am having exactly the same trouble.

With ide-floppy in my grub.conf nothing happens the drive does not even apear apart from an entry in dmesg.

With ide-scsi enabled for the drive it is recognised as sda but if I do not have a disk in the drive when I boot up sda4 it not recognised when I do put a disk in the drive. I can get the disk to mount but I first have to try to mount sda before mounting sda4 as shown here:

```
root@jeff andy # mount -t vfat /dev/sda /mnt/zip

mount: wrong fs type, bad option, bad superblock on /dev/sda,

       or too many mounted file systems

root@jeff andy # mount -t vfat /dev/sda4 /mnt/zip
```

This is a right pain in the arse. Is there any way I can set this up so that I can just mount sda4 every time.

----------

## space_monkey

```
blockdev --rereadpt /dev/sda
```

Also works but I really want to set this up where I just have to issue one command as a user to get it to mount. Its possible for every other device that I use.

----------

## The Mountain Man

I've noticed that Gentoo treats my Zip100 like it's a hard drive, but without a disk in the drive on boot-up, it doesn't know what to do with it so it just leaves the sda* devices out of /dev (I have the parallel port Zip version which shows up in Linux as a SCSI device).  Issuing the "blockdev" command in the previous post should wake it up (make sure you have a disk in the drive). 

As for starting it all automatically, I'm guessing you could write a small shell script such as:

```
blockdev --rereadpt /dev/sda

mount /dev/sda4
```

and save it as "mountzip.sh" so you'd just have to type mountzip and you'd be done, but I don't know much about this sort of thing, and I wouldn't know how to get all the permissions right so that a normal user could run the script.  Maybe someone else could offer additional insight.

One other bit of trivia to keep in mind when working with Zip drives, Zip discs are partitioned.  For whatever reason, Iomega chose to store the information in partitions, so a Windows formatted Zip disk will show up as sda4 while a Mac disk will be sda1 (the different versions are partitioned differently.)

----------

## ronmon

It's been ages since I've had one of these, but it worked very easily for me. As long as ATAPI-floppy was available, either built in or as a module, the drive always showed up as hdd4. I can't remember if there were any fstab tricks.

----------

## space_monkey

Found a better solution. Makes it work like any other removable drive, includeing working with supermount. The problem is it requires fiddling with hardware.

You need to set the drive as a drive A, as described here:

http://www.win.tue.nl/~aeb/linux/zip/zip-1.html

Then using ide-scsi the device used is /dev/sda. Mounting this works like mounting any other drive.

May be a bit of a pain in the butt though, I needed to scrounge a second jumper to set it as master.

----------

## robaton

I'm still looking for a freaking answer to this nightmare.

Update: I was able to use it the other day, the whole day without a single miss, constantly taking out disks and reading and writing to them. Today, I put a zip disk in and nothing.

What in the world is going on with this this thing?

Let me say again, it's never given me a problem in any other OS or distro. Blah!

BTW I tried the command

blockdev --rereadpt

And it didn't do a bit of good. Just no magic there.

----------

## Purrkur

HI Robatron,

Have you tried:

    blockdev --rereadpt /dev/hdd

instead of what you wrote (blockdev --rereadpt)??

----------

## Schnacki

 *robaton wrote:*   

> I'm still looking for a freaking answer to this nightmare.

 

So do I. At least for the times where I forgot to boot with a medium in the drive. Because then it all works just fine. I don't use SCSI-emulation. Is that needed? Because even without SCSI-emulation, I can use the drive as /dev/hdd4 when I have a ZIP-cartridge in the drive when booting.

 *robaton wrote:*   

> Update: I was able to use it the other day, the whole day without a single miss, constantly taking out disks and reading and writing to them. Today, I put a zip disk in and nothing.

 

Did you have the ZIP-cartridge in the drive when you turned your computer on, that day?

Ciao, Jan

----------

## jsinger

 *Quote:*   

>  blockdev --rereadpt /dev/hdd 

 

Same issue here, but issuing this command just gives "/dev/hdd: No such file or directory". As with other people, if a disk is in the drive on bootup /dev/hdd4 is created and works normally.

There must be a simple answer to this -- it works trivially on every other Linux distro I've used.

----------

## Odin

From what I remember, this is a devfs bug.

The solution is to create the device nodes the old fashioned way with mknod... You'll have to find the exact instructions yourself as I don't remember off the top of my head.

----------

## jdgill0

What I did to get my zip drive working:

hdx is wherever your zip drive is located

First:

mknod /dev/hdx b 22 64

mknod /dev/hdx1 b 22 65

mknod /dev/hdx4 b 22 68

Second:

devfs should remember these.  If not, you can add the above files in "First" to:

/etc/conf.d/local.start

Third:

Put hdx = ide - floppy in grub.conf

And put ide-floppy in /etc/modules.autoload

Fourth:

My fstab entry looks like:

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

----------

## jsinger

Thanks, Odin and jdgill! I'll go try that.

 *jdgill0 wrote:*   

> hdx is wherever your zip drive is located
> 
> First:
> 
> mknod /dev/hdx b 22 64
> ...

 

How did you determine those major and minor numbers? Did you just pick arbitrary numbers or are they based on something?

----------

## jdgill0

 *Quote:*   

> 
> 
> hdx is wherever your zip drive is located
> 
> First:
> ...

 

I personally did not pick the major/minor numbers.  These directions are what I found some time ago, and I don't recall the reason for those particular values.  It took me quiet a bit of searching to get the info I needed to make my zip drive work, and fortunately I saved the directions; they have saved me much grief in having to setup a zip drive on a couple occasions.  I hope they have helped.

----------

## daddio

From what i understand 

Major and minor numbers are supposed to be "standard" and have a direct correlation to the

hardware interface. They determine --how-- and --where-- the binary data is routed in the

hardware.  You can't pull numbers out of thin air and expect a device to work.

This is one of the major reasons for the creation of devfs:

    You have a limitted number of major-minor numbers (8 bits each I think)

    You have an ever growing hardware library eating up those numbers

        (you can see our zip disk above uses 1 major (out of 255 pssble) and 3 minor

    At some point yu run out of unique combinations and you begin to have the possibility of 

        two or more devices with the same major-minor combination-- a very bad thing

In some ways I wish gentoo had been a little less gung-ho in adopting devfs, its OBVIOUSLY

not ready for the masses yet.  On the other hand, by the time other distro's are grappling with

converting to devfs, we will have already done it, so bring on the headaches i guess.

----------

## dma

You CAN use mtools for zip drives.

like:

```
root@laureate:/var/chroot/bind# mdir z:

 Volume in drive Z is ZIP-100

 Volume Serial Number is 15F9-2C71

Directory for Z:/

ZIP-IDX      <DIR>     03-15-1999   2:18  zip-idx

grep     exe     62464 12-14-1998  11:42

50WAYS   EXE    265728 01-30-1998  15:22  50ways.exe

JS           <DIR>     03-16-1999   1:44  js

netscape hst   2502656 03-15-1999  15:23

...

scanexe  zip     42722 05-03-1999  23:50

getme        <DIR>     05-10-1999  11:14

mci          <DIR>     05-10-1999  11:16

       26 files           6 745 600 bytes

                         10 176 512 bytes free
```

if you are too lazy to mount stuff and feel like using mtools.

It helps to do "modprobe ide-floppy" when there is a disk in the drive.

----------

## jsinger

OK, it turns out that there's a devices.txt file in the Linux source that has the relevant numbers.

So, I've tried all the suggestions and it sort of works -- /dev/hdd4 is created, it mounts fine -- except that when I mount a disk as a vfat filesystem the filenames are all garbled!

Any further suggestions? I'm going to try an ext2 disk to see if I get the same problem, but need to find one that can be safely reformatted.

----------

## Bigun

What does your fstab file look like?

----------

## freak4u

 *jdgill0 wrote:*   

> 
> 
> hdx is wherever your zip drive is located
> 
> First:
> ...

 

check in /usr/src/linux/Documentation/devices.txt because the x makes a big different, hdb is major 3 for instance.  Also, there's a much easier way than mknod.  hda is a symlink to /dev/ide/host0/bus0/target0/lun0/disc and the partitions are same dir /part1 , /part2, etc.  My zip100 is a secondary slave, so all I did was 

```
ln -sf /dev/ide/host1/bus0/target1/lun0/disc /dev/hdd

ln -sf /dev/ide/host1/bus0/target1/lun0/part4 /dev/hdd4
```

Note: I also did it with mknod and they both work fine, symlinking is just a bit easier.  Then just add a line into fstab and you're good.  Also you need to have ide-floppy either compiled in or as a module, I didn't need to do the /dev/hdd=ide-floppy line.

----------

## OldTango

Thanks freak for that feedback, it has cleared up a lot for me.  What would I add to my fstab and do I need to make a mount point for the device. my links are as follows.

```
/dev/hdb > /dev/ide/host0/bus0/target1/lun0/disc

/dev/hdb4 > /dev/ide/host0/bus0/target1/lun0/part4
```

Al my support is built in to the kernel (ie...no modules) and they are all detected just fine.

----------

## LuckySandal

but then I compiled kernel 2.4.25 with ide-scsi support built-in. I still can't get supermount to work correctly with the zip disk.

----------

## brcre

bash-2.05b# dmesg | grep hd

Kernel command line: auto BOOT_IMAGE=gk_linux root=307 root=/dev/hda7 

init=/linuxrc

    ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0x1028-0x102f, BIOS settings: hdc:DMA, hdd:pio

hda: WDC WD1200BB-00CAA0, ATA DISK drive

hdc: HITACHI GD-2000, ATAPI CD/DVD-ROM drive

hdd: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive

hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=14593/255/63, UDMA(33)

hdc: ATAPI 20X DVD-ROM drive, 512kB Cache, DMA

SCSI device sda: 129024 512-byte hdwr sectors (66 MB)

hdd: 98304kB, 196608 blocks, 512 sector size

hdd: 98304kB, 96/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm

#####################################

Things I have tried but did not work:

ln -sf /dev/ide/host1/bus0/target1/lun0/disc /dev/hdd

ln -sf /dev/ide/host1/bus0/target1/lun0/part4 /dev/hdd4

(After I did this I found out that host1 doesn't exist on my computer)

(So I tried using the host0, which does exist......)

ln -sf /dev/ide/host0/bus0/target0/lun0/disc /dev/hdd

ln -sf /dev/ide/host0/bus0/target0/lun0/part4 /dev/hdd4

(This mounts to the windows XP file system)

And as a final note I changed my bios from auto to none for the zip drive.

#######################################

WHAT I DID THAT DID WORK:

ADD HDD=IDE-SCSI TO LILO.CONFIG

#vi /etc/lilo.conf

vga=792

boot=/dev/hda

map=/boot/map

install=/boot/boot.b

prompt

timeout=50

lba32

default=gk_linux

image=/boot/kernel-2.4.20-gaming-r3

     label=gk_linux

     root=/dev/hda7

     initrd=/boot/initrd-2.4.20-gaming-r3

     append="hdd=ide-scsi root=/dev/hda7 init=/linuxrc"

other=/dev/hda1

     label=windows

###################################

ADD IDE-SCSI TO KERNEL-2.4

#vi /etc/modules.autoload.d/kernel-2.4

     ide-scsi

REBOOT THE MACHINE HERE

# mount -t vfat /dev/discs/disc2/part4 /mnt/zip

ADD /DEV/DISCS....... TO THE FSTAB

#vi /etc/fstab

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda5               /boot           ext3            noauto,noatime          1 2

/dev/hda7               /               reiserfs        noatime                 0 1

/dev/hda6               none            swap            sw                      0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro,user          0 0

/dev/discs/disc2/part4  /mnt/zip        vfat            noauto,rw,users         0 0

/dev/sda1               /mnt/usbstick   auto            noauto,user,exec        0 0

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults                0 0

none                    /dev/shm        tmpfs           defaults                0 0

# Windows Drive.

/dev/hda1               /mnt/windows    vfat            rw,user,gid=100,umask=02

########################################

The idea to do the above changes came from reading:

https://forums.gentoo.org/viewtopic.php?t=77712

and stuffle listed a lilo.conf and /etc/modules.autoload.d/kernel-2.4

config

Woo Hoo, now I can move onto my on board sound. Maybe by the time my 1 year anniversary of running Gentoo comes up I'll have all the devices my machine has working. Then I'll do something crazy and buy a new computer so that I can start over!!  :Wink: 

----------

