ATAPI (internal) ZIP drive
I need help! I upgraded my system to a new MLB and a faster CPU. With the new board, I can't read or write to my ZIP drive (under Linux). I have a SCSI system, with an Adaptec 78xx controller, an Adaptec RW CDROM (also ATAPI), and the ZIP drive. Kernel: 2.4.10 Under ATAPI, I've checked only use SCSI emulation and under SCSI I've checked SCSI CDROM. My board has both conventional ATA connectors and PROMISE ATA100 connectors. The CDROM is attached to the conventional primary controller as master and the ZIP is attached to the secondary controller as master. The drives are being supported as ide-scsi devices. Parameters passed in at boot time include hda=scsi and hdc=scsi Anyone have any ideas? Thanks, Skip
Skip> I upgraded my system to a new MLB and a faster CPU. With the new Skip> board, I can't read or write to my ZIP drive (under Linux). I Skip> have a SCSI system, with an Adaptec 78xx controller, an Adaptec Skip> RW CDROM (also ATAPI), and the ZIP drive. Skip> Kernel: 2.4.10 I'd probably not use 2.4.10, it's got quite a few problems. Either 2.4.11-pre[45] or use the 2.4.10-acX kernels, they're more stable at this point. Skip> Under ATAPI, I've checked only use SCSI emulation and under SCSI Skip> I've checked SCSI CDROM. Is it compiled into the kernel or is it modules? Skip> My board has both conventional ATA connectors and PROMISE ATA100 Skip> connectors. The CDROM is attached to the conventional primary Skip> controller as master and the ZIP is attached to the secondary Skip> controller as master. What does dmesg say? Does it even see the device? Can you access the CDROM properly? Skip> The drives are being supported as ide-scsi devices. Parameters Skip> passed in at boot time include hda=scsi and hdc=scsi We need more info really. John John Stoffel - Senior Unix Systems Administrator - Lucent Technologies stoffel@lucent.com - http://www.lucent.com - 978-952-7548
Thanks, John. I didn't know what info would be useful, so I threw in the kitchen sink. I'll answer the questions below. On Monday 08 October 2001 11:24 am, you wrote:
Skip> I upgraded my system to a new MLB and a faster CPU. With the new Skip> board, I can't read or write to my ZIP drive (under Linux). I Skip> have a SCSI system, with an Adaptec 78xx controller, an Adaptec Skip> RW CDROM (also ATAPI), and the ZIP drive.
Skip> Kernel: 2.4.10
I'd probably not use 2.4.10, it's got quite a few problems. Either 2.4.11-pre[45] or use the 2.4.10-acX kernels, they're more stable at this point.
Skip> Under ATAPI, I've checked only use SCSI emulation and under SCSI Skip> I've checked SCSI CDROM.
Is it compiled into the kernel or is it modules?
I've tried it both ways. I was thinking of trying to build a Linux distro on my Zip drive so I could use the partition for my home directory. I can see the drive and fdisk it. When I try to do a mke2fs /dev/sdc4 the process hangs up when it tries to write out the accounting information.
Skip> My board has both conventional ATA connectors and PROMISE ATA100 Skip> connectors. The CDROM is attached to the conventional primary Skip> controller as master and the ZIP is attached to the secondary Skip> controller as master.
What does dmesg say? Does it even see the device? Can you access the CDROM properly?
CDROM is working for playing audio and for reading data. I've installed cdrecord, and I can see the device when I do a scanbus /dev/sr0:1,1,0 so I think it's OK. Here's the current dmesg output: ========================================================= Uniform Multi-Platform E-IDE driver Revision: 6.31 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx VP_IDE: IDE controller on PCI bus 00 dev 21 VP_IDE: chipset revision 6 VP_IDE: not 100% native mode: will probe irqs later VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:04.1 ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:pio, hdd:pio PDC20265: IDE controller on PCI bus 00 dev 88 PCI: Found IRQ 10 for device 00:11.0 PDC20265: chipset revision 2 PDC20265: not 100% native mode: will probe irqs later PDC20265: (U)DMA Burst Bit ENABLED Primary PCI Mode Secondary PCI Mode. ide2: BM-DMA at 0x8000-0x8007, BIOS settings: hde:pio, hdf:pio ide3: BM-DMA at 0x8008-0x800f, BIOS settings: hdg:pio, hdh:pio hda: Hewlett-Packard CD-Writer Plus 9100b, ATAPI CD/DVD-ROM drive hdc: IOMEGA ZIP 100 ATAPI Floppy, ATAPI FLOPPY drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ide1 at 0x170-0x177,0x376 on irq 15 Partition check: hdc:<3>ide-scsi: hdc: unsupported command in request queue (0) end_request: I/O error, dev 16:00 (hdc), sector 0 unable to read partition table ========================================================= At this point, I had the media in the drive, but it did not have a valid filesystem on it. More output from dmesg: ====================================================== SCSI subsystem driver Revision: 1.00 PCI: Found IRQ 3 for device 00:0a.0 PCI: Sharing IRQ 3 with 00:04.5 scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.1 <Adaptec 2940 Ultra SCSI adapter> aic7880: Ultra Wide Channel A, SCSI Id=7, 16/255 SCBs (scsi0:A:0:0): Target Initiated PPR Vendor: COMPAQPC Model: MAG3182MP Rev: 1806 Type: Direct-Access ANSI SCSI revision: 02 (scsi0:A:0): 20.000MB/s transfers (10.000MHz, offset 8, 16bit) Vendor: COMPAQ Model: BD009222BB Rev: 3B07 Type: Direct-Access ANSI SCSI revision: 02 (scsi0:A:1): 20.000MB/s transfers (10.000MHz, offset 8, 16bit) Vendor: SONY Model: SDT-5000 Rev: 3.30 Type: Sequential-Access ANSI SCSI revision: 02 (scsi0:A:2): 5.000MB/s transfers (5.000MHz, offset 8) Vendor: HP Model: C5110A Rev: 3638 Type: Processor ANSI SCSI revision: 02 scsi0:0:0:0: Tagged Queuing enabled. Depth 253 scsi0:0:1:0: Tagged Queuing enabled. Depth 253 scsi1 : SCSI host adapter emulation for IDE ATAPI devices Vendor: IOMEGA Model: ZIP 100 Rev: 14.A Type: Direct-Access ANSI SCSI revision: 00 Vendor: HP Model: CD-Writer+ 9100b Rev: 1.06 Type: CD-ROM ANSI SCSI revision: 02 st: Version 20010812, bufsize 32768, wrt 30720, max init. bufs 4, s/g segs 16 Attached scsi tape st0 at scsi0, channel 0, id 2, lun 0 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 Attached scsi disk sdb at scsi0, channel 0, id 1, lun 0 Attached scsi removable disk sdc at scsi1, channel 0, id 0, lun 0 SCSI device sda: 35566000 512-byte hdwr sectors (18210 MB) sda: sda1 sda2 < sda5 sda6 > SCSI device sdb: 17773524 512-byte hdwr sectors (9100 MB) sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 sdb8 sdb9 > SCSI device sdc: 196576 512-byte hdwr sectors (101 MB) sdc: Write Protect is off sdc: sdc4 Attached scsi CD-ROM sr0 at scsi1, channel 0, id 1, lun 0 sr0: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray Uniform CD-ROM driver Revision: 3.12 Attached scsi generic sg3 at scsi0, channel 0, id 5, lun 0, type 3 ====================================================== The sg3 device is a Scanner.
Skip> I've tried it both ways. I was thinking of trying to build a Skip> Linux distro on my Zip drive so I could use the partition for my Skip> home directory. I can see the drive and fdisk it. When I try to Skip> do a mke2fs /dev/sdc4 the process hangs up when it tries to Skip> write out the accounting information. I think this might be the kicker here. For 2.4.10 Linus merged in some changes to move stuff from the block cache to the page cache, unfortunately not everything was merged properl and there are problems. I'd really suggest you try 2.4.10-acX or 2.4.11-preX where X is the highest number you can find. Then you should be all set. Also, try the suggestions the other guy made about accessing the Zip via IDE first, and if that works, try the ide-scsi stuff. John
On Monday 08 October 2001 02:40 pm, John Stoffel wrote:
Skip> I've tried it both ways. I was thinking of trying to build a Skip> Linux distro on my Zip drive so I could use the partition for my Skip> home directory. I can see the drive and fdisk it. When I try to Skip> do a mke2fs /dev/sdc4 the process hangs up when it tries to Skip> write out the accounting information.
I think this might be the kicker here. For 2.4.10 Linus merged in some changes to move stuff from the block cache to the page cache, unfortunately not everything was merged properl and there are problems.
I'd really suggest you try 2.4.10-acX or 2.4.11-preX where X is the highest number you can find. Then you should be all set.
Hi John, I'm still stumped. I have a "spare" partition into which I can install a standard distro, and I dropped back to a Mandrake 8.0 distro I downloaded a few months ago. The distro is based on the 2.4.3 kernel. After rebooting into Mandrake, I find I'm still unable to read or format the Zip drive. I also have a BSD 4.3 CD here as well, but I think it must be something obvious we are overlooking. The Mandrake passes the Zip drive off to ide-floppy and the CDRW off to ide-scsi. What's a body to do? --Skip
Skip> I'm still stumped. I have a "spare" partition into which I can Skip> install a standard distro, and I dropped back to a Mandrake 8.0 Skip> distro I downloaded a few months ago. The distro is based on the Skip> 2.4.3 kernel. After rebooting into Mandrake, I find I'm still Skip> unable to read or format the Zip drive. I also have a BSD 4.3 CD Skip> here as well, but I think it must be something obvious we are Skip> overlooking. You don't need to drop distributions to use a new kernel, you can just download it and compile it, update /etc/lilo.conf to see the new kernel images and reboot. Skip> The Mandrake passes the Zip drive off to ide-floppy and the CDRW Skip> off to ide-scsi. Skip> What's a body to do? Just stay with ide-floppy for the Zip drive? That should work just fine. Or are you set on having a totally SCSI looking system? It's hard for me to help since I don't have a Zip drive of my own to play with. John x27548
On Monday 08 October 2001 02:40 pm, John Stoffel wrote:
Skip> I've tried it both ways. I was thinking of trying to build a Skip> Linux distro on my Zip drive so I could use the partition for my Skip> home directory. I can see the drive and fdisk it. When I try to Skip> do a mke2fs /dev/sdc4 the process hangs up when it tries to Skip> write out the accounting information.
I think this might be the kicker here. For 2.4.10 Linus merged in some changes to move stuff from the block cache to the page cache, unfortunately not everything was merged properl and there are problems.
I'd really suggest you try 2.4.10-acX or 2.4.11-preX where X is the highest number you can find. Then you should be all set.
Hi John, I'm still stumped. I have a "spare" partition into which I can install a standard distro, and I dropped back to a Mandrake 8.0 distro I downloaded a few months ago. The distro is based on the 2.4.3 kernel. After rebooting into Mandrake, I find I'm still unable to read or format the Zip drive. I also have a BSD 4.3 CD here as well, but I think it must be something obvious we are overlooking. The Mandrake passes the Zip drive off to ide-floppy and the CDRW off to ide-scsi. What's a body to do? --Skip
On Mon, Oct 08, 2001 at 10:51:02AM -0400, Skip Gaede wrote:
The drives are being supported as ide-scsi devices. Parameters passed in at boot time include hda=scsi and hdc=scsi
I can't imagine that working! :) The kernel still has to access the drives using IDE. The SCSI emulation is just a hack to make the devices look like SCSI to the user layer. Just start the system normally using the ide support, and make sure you can access your devices with IDE. (Using the ide-cd module. You ARE using modules for everything, right??? :) ) If that works, then unload ide-cd, and install ide-scsi and sr_mod (and whatver dependencies, etc...) You should now be able to access your cdrom drive with sr0, sr1 or whatever. I don't know how it will work for the Zip drive, but the idea should be the same. However, I don't know if you'll be able to support it using SCSI emu without building more kernel modules. I don't think there's any compelling reason to use SCSI emu on it anyway, since you can just use direct IDE ATAPI support for the Zip drive. (I did this many years ago with an ATAPI Zip drive and kernel 2.0 without a hitch.) -Chuck
On Monday 08 October 2001 10:51 am, skip gaede wrote:
I need help!
I've made some progress, actually. The biggest help was actuall a pointer to the following web page: http://www.win.tue.nl/~aeb/linux/zip/zip-1.html In there, I learned that Windows wants to see the drive as a big floppy, with no partition table. To do that, there are multiple ways to hide the first track on the drive: there is a jumper on the back of the drive, and my bios actually allows one to select whether the first track is hidden or not. I have compiled the ide-scsi and ide-floppy drivers as modules, and depending on what I put on the command line as boot options (hdc=scsi or hdc=ide-floppy), the drive will be handled accordingly. As a floppy, the drive is dealt with as hdc or sdc depending on which way it's setup. I'm able to read a zip disk created under windows. It's a big floppy, and has the umsdos filesystem. I still haven't gotten the disk formatted with ext2. I suspect it has to do with the fact that mke2fs wants to see a partition table. I don't have the support compiled for formatting a umsdos filesystem. Iomegaware has a smal program "iw" that's supposed to allow you to make an ext2 fs on the disk, but that isn't working either. Progress, however, is being made! --Skip
From: Skip Gaede <sgaede@mediaone.net>
I still haven't gotten the disk formatted with ext2. I suspect it has to do with the fact that mke2fs wants to see a partition table. I don't have the support compiled for formatting a umsdos filesystem. Iomegaware has a smal program "iw" that's supposed to allow you to make an ext2 fs on the disk, but man fdisk
-- -- Keith Wright <kwright@free-comp-shop.com> Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com> --- Food, Shelter, Source code. ---
On Monday 08 October 2001 10:51 am, Skip Gaede wrote:
I need help!
I upgraded my system to a new MLB and a faster CPU. With the new board, I can't read or write to my ZIP drive (under Linux). I have a SCSI system, with an Adaptec 78xx controller, an Adaptec RW CDROM (also ATAPI), and the ZIP drive.
Kernel: 2.4.10
More progress! The drive is best handled by the ide-floppy driver, and it works best when the BIOS is setup to present the drive as a mini-hard drive, as opposed to a big floppy. The driver, at least as far as formatting goes, stinks. doing a mke2fs -b 1024 -v /dev/hdc1 took a paltry 2 hours to complete, as compared with about 2 minutes for a complete format under WinNT. or 10 minutes using the Iomega software. During the two hour format, I got over 100 lost interrupts, which were interpreted as bad blocks. The driver is being worked on, and this one is at rev 0.97.sv. It uses packet writing technology. There are a number of settings I can tweak under /proc/ide/hdc/settings, but I've not found documentation on the params: name value min max mode ---- ----- --- --- ---- bios_cyl 96 0 1023 rw bios_head 64 0 255 rw bios_sect 32 0 63 rw breada_readahead 4 0 127 rw current_speed 8 0 69 rw file_readahead 0 0 2097151 rw ide_scsi 0 0 1 rw init_speed 8 0 69 rw io_32bit 1 0 3 rw keepsettings 0 0 1 rw max_kb_per_request 127 1 127 rw nice1 1 0 1 rw number 2 0 3 rw pio_mode write-only 0 255 w slow 0 0 1 rw unmaskirq 1 0 1 rw using_dma 0 0 1 rw Clearly the driver and the current settings leave something to be desired. I'm now investigating leaving the drive formatted vfat and creating a rescue disk using the loopback device to mount a couple of files on the drive. Does anyone know of any up-to-date references on making a loopback root filesystem under the 2.4 kernel? The most recent document I've found on Linuxdoc is by Andrew Bishop dated Sept 24, 1999. Thanks, Skip
On Monday 08 October 2001 10:51 am, Skip Gaede wrote:
I need help!
I upgraded my system to a new MLB and a faster CPU. With the new board, I can't read or write to my ZIP drive (under Linux). I have a SCSI system, with an Adaptec 78xx controller, an Adaptec RW CDROM (also ATAPI), and the ZIP drive.
Kernel: 2.4.10
Under ATAPI, I've checked only use SCSI emulation and under SCSI I've checked SCSI CDROM.
My board has both conventional ATA connectors and PROMISE ATA100 connectors. The CDROM is attached to the conventional primary controller as master and the ZIP is attached to the secondary controller as master.
The drives are being supported as ide-scsi devices. Parameters passed in at boot time include hda=scsi and hdc=scsi
Anyone have any ideas?
Folks, It's taken a while, and I actually learned a lot about device drivers and the ide device drivers in particular. To sum it up, there was a bug in both the ide-floppy and ide-scsi drivers, which I was able to fix. The problem, at least on my system, was that the Zip drive issued an interrupt stating it was ready to receive a packet command somewhere in the vicinity of 30 msec before it was ready to actually receive the packet. My initial fix was not elegant. It involved sitting in a wait loop inside an interrupt service routine. Gadi Oxman, the original author, pointed out the error of my ways, and suggested that I implement it using the timer queue in the ide driver. The original fix used 70% of the cpu waiting on the timer. The revised fix uses < 1%. Later, Skip
participants (4)
-
Chuck Homic
-
John Stoffel
-
Keith Wright
-
Skip Gaede