# IDE Zip drive, devfs and ide-floppy

## TGL

Hi, 

I've got an IDE Zip drive, and I can't make it work with devfs: 

 - if I boot with a disk in the drive, then hdd and hdd4 are created, everything is fine.

 - else, I have no hdd/hdd4 device, and don't know what to do.

I've got an ide-floppy module, but loading it at boot time doesn't change anything. I think I just need to add something in my devfs config file to monitor the drive, but I really don't know what (gentoo is my first devfs distrib). And the ZIP-Drive-HOWTO didn't help. 

Thanks for your help,

----------

## smtanner

I would like to know the solution to this as well.  Seems this is a bug with devfs.  I tried using scsi emulation with my zip drive to see if that would work as well but it had the same problem, the device sda4 would not be created by devfs unless there was a zip disk in the zip drive during boot.

----------

## delta407

No, this is not a bug with devfs, this is a problem with the IDE floppy driver.

From the Linux IDE-Floppy Driver Homepage:

 *Quote:*   

> Devfs support is proving to be harder than we anticipated as the necessary work impact several subsystems all of which are under active development. Watch this space, or join in on the devfs mailing list. For now, if you are having problems with devfs (this is left blank)
> 
> Test DEVFS support is available here . You need the previous patch below applied first. These will both apply to 2.4.14 to 2.4.16 kernels.

 Last edited by delta407 on Wed Jun 19, 2002 9:42 pm; edited 1 time in total

----------

## TGL

Yet another web page to monitor, until they find a solution. Thank you, delta407, for your reply.

----------

## brian33x51

Ha!

Found a way to get my ide zip 100 drive to work with autofs.

Here's what I did:

1.) Build in scsi emulation into your kernel.  Add "hd?=ide-scsi" to the grub kernel line.  Mine is "hdd=ide-scsi".  I also have an internal dvd and a firewire burner all using the scsi driver.

2.) Download the program "scsiadd" from http://llg.cubic.org/tools/

(I'll work on getting an ebuild for this thing).

3.) Find out which scsi device it.  I fgured out that mine's on "/dev/scsi/host0/bus0/target0/lun0/"

4.) Run "./scsiadd -r scsi/host0/bus0/target0/lun0/" to remove device (not sure if this is necessary, i'm tyring to fix my automounter timeout)

5.) Run "./scsiadd -a scsi/host0/bus0/target0/lun0/".  The partition /dev/sda4 should be available.

----------

## smtanner

I though this might be an ide bug, that is why I tried scsi emulation.  I expected that would solve the problem if it was do to an ide driver problem.  Mandrake uses devfs and there is now problem with zip disks when using mandrake 8.2.  I notices that for zip drives, mandrake uses scsi emulation.

----------

## TGL

brian33x51: thanks a lot, it works! The only problem is I have to put a disk in the drive before using "scsiadd", so I can't put it in an init script. But no matter, that's really better than rebooting  :Smile: 

smtanner: I'm curious to know how they do on Mandrake. Did you mean you still have it on your box? I would really like to see their devfs.conf file...

----------

## overshoot

Add the kernel parameter

hd?=ide-floppy

(in my case hda)

Works for me.

----------

## smtanner

Okay, I had to revive this thread because I found a decent solution ala Mandrake. Using scsi emulation (hd?=ide-scsi) will solve the problem is /etc/fstab is set up right.

If scsi emulation is used and a disc is not inserted during boot, the link /dev/sda4 is still not created but you can access the zip drive through /dev/scsi/host0/bus0/target0/lun0/part4 (that is what is is for me it may be a different target depending on what other scsi or scsi emulation you have) which will be created when a disc is inserted.  This works even if the zip disc was not in the drive during boot.

----------

## wilbertnl

I added the following lines in /etc/devfs.conf

# Create /dev/discs/hde

LOOKUP          ^hde$           CFUNCTION GLOBAL mksymlink ide/host2/bus0/target0/lun0/disc hde

REGISTER        ^ide/host2/bus0/target0/lun0/disc$ CFUNCTION GLOBAL mksymlink $devname hde

UNREGISTER      ^ide/host2/bus0/target0/lun0/disc$ CFUNCTION GLOBAL unlink $devname hde

# Create /dev/discs/hde1

LOOKUP          ^hde1$           CFUNCTION GLOBAL mksymlink ide/host2/bus0/target0/lun0/part1 hde1

REGISTER        ^ide/host2/bus0/target0/lun0/part1$ CFUNCTION GLOBAL mksymlink $devname hde1

UNREGISTER      ^ide/host2/bus0/target0/lun0/part1$ CFUNCTION GLOBAL unlink $devname hde1

# Create /dev/discs/hde4

LOOKUP          ^hde4$           CFUNCTION GLOBAL mksymlink ide/host2/bus0/target0/lun0/part4 hde4

REGISTER        ^ide/host2/bus0/target0/lun0/part4$ CFUNCTION GLOBAL mksymlink $devname hde4

UNREGISTER      ^ide/host2/bus0/target0/lun0/part4$ CFUNCTION GLOBAL unlink $devname hde4

I have an additional Promise Ultra66 pci-card, that explains host2.

Now I can use devfs AND my Iomega zip drive without any trick!

You need to find your own host and lun, but I guess that you will figure that. For me there was no need to do anything else than these lines in /etc/devfs.

My kernels are 2.4.19-rc3/gentoo-r7

Hope this helps,

----------

## TGL

 *wilbertnl wrote:*   

> I added the following lines in /etc/devfs.conf
> 
> [...]
> 
> 

 

That's exactly the kind of solution I was looking for. Now I'm starting to understand a few things about devfs.

 *Quote:*   

> Hope this helps,

 

Yes, really, it does. Many thanks, and sorry for the late answer.

----------

## vlaflip

I have found another workaround for the devfs and ide-floppy problems

it's quite dirty, but it works...  :Twisted Evil: 

I didn't feel like recompiling my kernel for scsi-emulation, wich i don't wan't to use for anything but that ZIP drive of mine...

my zip drive is /dev/hdd, the major an minor numbers where borrowed from an old bootdisk (tom's rtbt version ??, see http://www.toms.net)

this my solution, i've added the following lines to /etc/conf.d/local.start

```
#make old fashioned dev entries for zipdrive

mknod /dev/hdd b 22 64

mknod /dev/hdd1 b 22 65

mknod /dev/hdd4 b 22 68
```

i hope this is helpfull to somebody

----------

## vlaflip

update!!

it not nessesary to put those lines in /etc/conf.d/local.start

it's enough to execute those commands just once, devfs remembers them after reboot (on my system, if it doens't just use the local.start trick)

----------

## TomorrowPlusX

OK, I finally bit the bullet and used hdc=ide-scsi to get my zip250 working. And, amazingly, it works! What amazes me even more, is that if I do an ls on /dev/discs/disc1 without a zip inserted I see just "disc" but after inserting a zip, I see "disc" & "part4". So -- this tells me that auto-insert notification of some sort is working.

Now, what I'd like to know, is wether there is a devfsd.conf setting which will allow for an automount? Given that KDE will automatically show mounted devices on the desktop now, I have this fantasy that two years after ditching BeOS I can once again simply insert a zip disk into my thinkpad and have it magically appear on my desktop.

Any ideas? Or do I have to write a daemon (or just a shell script which runs periodically) which looks for /dev/discs/disc1/part4 and issues "mount /mnt/zip" when it's present.

I'd like this to be as devfs friendly as possible, of course ;)

----------

## Phleg

Have you looked at the automount package? DevFS doesn't handle mounting, only population of the /dev filesystem.

----------

## pheelay

I found that if u have a disk in the drive when u 'modprobe ide-floppy' everything works fine   :Very Happy:   Saves all the SCSI-emulation lark!

pheelay

----------

## Forse

Hi, I thought of bying a ZIP750 drive for my server backups (can't trust anything these sad days) and I have couple of questions about ZIP drives:

How fast is it, Imean the read and write speeds? (I don't to buy it if it has same speed as floppy  :Cool:  )

How long can data preserve on the disk?

Is it secure and wise to have ZIP in server?

 Thnx a lot in advance   :Smile: 

----------

## pheelay

there's Zip 750 now?! nice!

Personally, I dont find Zip disks reliable for storage.  I get endless 'click of death' on both my Zip100 and Zip250 drives,  particularly on large transfers. Dont know how  Linux does a much better recovery job than windows tho   :Very Happy: 

----------

## pheelay

Would CDRs or CDRWs not be a better solution to Zip750 for backups?  The Zip750 disks cost about the price of 30+ CDRs?!!

----------

