JAZ-drive mini-HOWTO Bob Willmot, bwillmot@cnct.com v1.3, 05 August 1996 This HOWTO covers the configuration and use of the Iomega Jaz drive under Linux and software tools available for the drive. 1. Introduction The Iomega Jaz drive is a removable media disk drive whose disks have a capacity of 1021 megabytes. It is currently available in internal and external SCSI configurations. Iomega plans to release an internal IDE version. This document describes how to use the Jaz drive with Linux. Since this is a SCSI device, it is important for you to read the Drew Eckhardt's SCSI HOWTO as well. http://sunsite.unc.edu/pub/Linux/docs/HOWTO/SCSI-HOWTO I'd like to thank the following people for their contributions and info they've provived. * Grant Gunther, grant@torque.net * Tom Poindexter, tpoindex@nyx.net * Todd Woods, woods@cs.uiowa.edu If you have any comments/suggestions/corrections please send them to: Bob Willmot, bwillmot@cnct.com 2. The Jaz disks The Jaz disks (cartridges) resemble a stack of three 3.5" floppy disks that hold 1GB of data. The drive has a motorized mechanism that can eject the disk via a pushbutton on the from of the drive or through software (see below on info about the jaztools Linux software) 2.1. The Jaz Jet host adapter Iomega markets a SCSI host adapter under the name Jaz Jet. Aparently there are currently two versions of this controller available, based on two difference SCSI chipsets. One is based on the Adaptec 7800 family of adapters, and is compatible with the 2930/2940 host adapters. Linux 2.0 supports this adapter with the aic7xxx driver. (this driver was introduced in the 1.3.? version of the kernel). The other adapter is based on the Advanced Systems chipset. At boot time the board gives a message like Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996 Compile the kernel with the CONFIG_SCSI_ADVANSYS variable set. 3. Configuring a kernel for the Jaz drive To use the Jaz drive with Linux, you must have a kernel configured for you SCSI adapter. Info on building the kernel can be found in the /usr/src/linux/README file, or in /usr/src/linux/Documentation/ directory for the 2.x kernels. Also check out Brian Ward's Kernel-HOWTO http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Kernel-HOWTO 4. Identifying the drive at boot time When your system boots it should display information about your adapter, and any disks that arre attaced to the drive. Boot messages will vary depending on your SCSI adapter and are logged to the /var/log/messages (or /var/adm/messages) file. You can also 'replay' these messages from the command prompt with the dmesg command. Here's the kernel booting output from a 2.0.10 kernel with an Adaptec 2940 controller: aic7xxx: BurstLen = 8 DWDs, Latency Timer = 64 PCLKS aic7xxx: AHA-2940 Ultra Rev B. aic7xxx: devconfig = 0x580. aic7xxx: Reading SEEPROM...done. aic7xxx: Extended translation enabled. aic7xxx: Using 16 SCB's after checking for SCB memory. AHA-2940 Ultra (PCI-bus): irq 11 bus release time 40 bclks data fifo threshold 100% SCSI CHANNEL A: scsi id 7 scsi selection timeout 256 ms scsi bus reset at power-on enabled scsi bus parity enabled scsi bus termination (low byte) enabled aic7xxx: Downloading sequencer code...done. aic7xxx: Resetting the SCSI bus...done. scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 3.2/3.1/3.0 scsi : 1 host. aic7xxx: Scanning channel A for devices. aic7xxx: Target 4, channel A, now synchronous at 10.0MHz, offset(0xf). Vendor: iomega Model: jaz 1GB Rev: G.60 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0 scsi : detected 1 SCSI disk total. SCSI device sda: hdwr sector= 512 bytes. Sectors= 2091050 [1021 MB] [1.0 GB ] sda: Write Protect is off In the above log note the raw scsi device name (sda,sdb, etc). You'll need to use this to access the disk later. If these lines do not appear, then something is misconfigured in your hardware or in the kernel. If the scsi0: line does not appear, then you have not configured your host adapter and its driver correctly. Some drivers will give you a hint about what is wrong. If your drive is not detected, you probably have a cable problem. If a drive name is not assigned, you probably forgot to include SCSI disk support when you built the kernel. Check the README files in drivers/scsi and the SCSI HOWTO for other debugging hints. 4.2. Fdisk, mke2fs, mount, etc. Once you know the drive name for your Jaz drive, you are set. You can manipulate the drive with the normal Linux disk management commands, fdisk, mke2fs, mount etc. Refer to the manual pages for these programs. 4.2.1. An existing DOS formatted disk Disks factory formatted from Iomega are partitioned with a single partition (for some unknown reason they use the 4th partition). You can mount this disk (assuming your jaz disk is the raw SCSI device sda) with the commands mkdir /jaz mount -t msdos /dev/sda4 /jaz Or if you are using the 2.0 kernels and have compiled the kernel with support for the Win95 VFAT support you can mount it with mkdir /jaz mount -t vfat /dev/sda4 /jaz (this will allow you to read/write long filenames) Files from the disk will appear in /jaz. While the disk is mounted, you will not be able to eject it. To unmount the drive you can issue the command: umount /dev/sda4 Once you've made the /jaz mount point - you don't need to do it again, (also make sure your not in the /jaz dir when you try to umount the drive) 4.2.2. Re-format as a native Linux disk If you want to erase a Jaz disk and make a Linux native file system on it. you should use fdisk on the entire disk: fdisk /dev/sda and delete any existing partitions (with the d command). Then create a new partition with the n command, make it primary partition number 1, use w to write the partition table to disk, and quit with q. Format the partition mke2fs /dev/sda1 (The 1 is the number that you gave this partition in fdisk). Now you can mount the disk: mount -t ext2 /dev/sda1 /jaz (re-using that mount point we created before). 4.2.3. The Jaz Tools disk There is some extra work to be done if you want to use the disk that comes with the Jaz 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. 5. jaztools A native Linux program to support some of Iomega's special features (including software controlled ejection and write protection) is available at http://www.cnct.com/~bwillmot/jaztool/ There should be a new version of jaztool available shortly that will contain a GUI interface and support drive scanning and automated mounting and unmounting of disks. 6. Frequently asked questions 6.1. The Jaz locks my system after it spins down ? People have reported problems with 1.2 (and early 1.3) kernels that when the Jaz disk spun down it would lock their system, or just produce a mess of SCSI error messages. I have not had any problems with the 2.0.x kernels and spindown of the Jaz. If you are having problems try the latest 2.0.x kernel available from http://sunsite.unc.edu/pub/Linux/kernel/v2.0/ 6.2. Can I boot from the Jaz drive ? This depends on what you are using for a host adapter. If your host adapter has a BIOS ROM with code that can boot from target 5 or 6, then yes, you can boot from the Jaz drive. 6.3. Why does Iomega use partition number 4 ? I have no idea? Any clues? 6.4. How can I have the disk mounted at boot time ? All you need to do is to add a line to your /etc/fstab file. For instance, if you will always have a DOS disk in the drive when you boot, you could put /dev/sda4 /jaz msdos defaults 0 0 in the fstab. Depending on your distribution, the initialization scripts might try to run fsck on partitions listed in your fstab. Be aware that this could cause problems if you forget to put the disk in the drive when you boot, or have the wrong disk there. 6.5. What happens if there is no disk inserted when I boot ? The kernel will try to read the partition table, but the operation will (eventually) time out. When you change disks, it is a good idea always to use fsck to check the partition structure on the new disk. The BIOS on some SCSI host adapters will attempt to read the partition table on your disk during the system boot. If you cannot disable this check, you may be forced always to boot with a disk in the drive. 7. Getting more current information The most up-to-date version of this mini-HOWTO can be found at: http://www.cnct.com/~bwillmot/jaztool/ Iomega's web pages are at http://www.iomega.com/