Date: Thu, 9 Jan 1997 09:24:07 +0100 (MET) From: Dirk.vanGulik@jrc.it To: Nick Repin <nrepin@digiteyes.com.au> Cc: Rob Hartill <robh@imdb.com>, freebsd-questions@freebsd.org Subject: Re: Jaz drive. How to ? Message-ID: <Pine.SOL.3.91.970109091114.5727A-100000@elect6.jrc.it> In-Reply-To: <2.2.32.19970108210814.0070153c@mail.ozemail.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Jan 1997, Nick Repin wrote:
> At 12:07 PM 8/01/97 +0000, you wrote:
> >
> >Has anyone written a step by step "how to" guide on preparing
> >a jaz drive + cartridge for use under FreeBSD ?
> >
>
On ftp.freebsd.org in incoming you find a handfull of utilities
I wrote to open/close/eject/write-protect the jaz drive, it is
alpfha quality, but might improve :-)
To format a disk; the whole disc on the sd0c slice:
disklabel -w -B sd0c auto
newfs sd0c
mount /dev/sd0c /mnt
(This is assuming it is SCSI device 0 ! ) Sometimes the
disklabel command barfs the first time round; but just
try it a second or third time and all seems to be
all right. If anyone knows why; let me know :-)
One thing for the real hackers; the Jaz/Zip drives are
really easy to recognize; so the sd0 driver could trigger
on them; have the geometry hardcoded in; and thus make live
a bit easier.
This is the lazy way :-) you can also do it neatly and go for
the s1..4 convention; the (preformatted) dos partition usualy
sits on 3; so you can do a
mount -t msdos /dev/sd0s3 /mnt
To get the drive out under _ALL_ circumstances do
something like
#!/bin/sh
# Dirk.vanGulik@jrc.it - will not accept
# any blame :-)
#
# Unlock the door of the drive
scsi -f /dev/rsd0.ctl -c "1e 0 0 0 0 0"
# Spin up the motor; so we can move the arms
scsi -f /dev/rsd0.ctl -c "1b 0 0 0 1 0"
# Push it out
scsi -f /dev/rsd0.ctl -c "1b 0 0 0 2 0"
Or use the jaz package at freebsd; here is the manpage.
One word of warning; it is quite possible; though a bit
hard, to eject a drive while it is mounted... which is
IMHO not a good idea !
The other thing is that you really would like some kind
of write-behind timeout in the sd0 driver :-)
DW.
JAZCTRL(?) LOCAL JAZCTRL(?)
NAME
jazctrl - program to assist with Iomega Jaz devices.
SYNOPSIS
Usage:
jazctrl eject
jazctrl -v status
jazctrl rw sd2
jazctrl ro /dev/rsd2.ctl
jazctrl [-v] [-i] [-f] <eject|ro|rw|up|down> [device]
The device can be symbolic, or absolute; but will always be mapped
to the raw control device.
DESCRIPTION
The jazctrl program is used to send vendor specific SCSI commands to
a
Iomega jazz device. It is also might work with a Zip drive; but i've
nev-
er tried that.
These commands allow you to eject the disc; power it up and down,
and set
the read/write protection bits. The password side of this is
currently
not working.
COMMANDS
eject ejects the frive
up and down will power the drive up and down; mine has a tendency to
be
noisy and vibrates quite irritatingly.
rw will set the drive in read/write mode, and thus cancels the
effect of
ro which sets the drive in a read-only mode.
The catch here is that I've not been able to get the password side of
things to work. My controller (or is it the kernel) just hangs when
I try
to send any ancilarry data. Please let me know if you get it to work.
OPTIONS
-d option turns on debuging; and generate lots of output; just like
its
scsi(8) friend.
-v option does it all verbose.
-i option cause it to ignore any errors or unexpected status
conditions
encountered while excecuting the command. Be carefull with this
one. -h
option will dump the syntax and compiled in defaults.
DEVICE
The device can be specified with its full name, e.g. /dev/rsd0.ctl
but
the programme will make educated guesses (and inform you about them
with
the -v flag) when you use more symbolic names such as sd0 or rsd0.ctl
without the /dev pre- and .ctl postfixes.
If no device is specified (and the RAWJAZDEVICE variable, see below,
is
also not set), the compiled in /dev/rsd0.ctl drive will be oparated
upon.
EXAMPLES
To eject a drive: jazctrl eject
To eject drive 2: jazctrl eject /dev/rsd2.ctl or jazctrl eject sd2
The RAWJAZDEVICE variable can be set to the default device to
operate up-
on.
BUGs
Quite a few; so do'nt try this on your own drives. The password stuff
does not work, and there are some options for detecting different
run-
time names, such as jzeject. But the Makefile does not make those
links.
The program checks quite a few things; such as wether the disk is
mounted
and if it really looks like a Jaz drive. But I would not really rely
on
it; anyway only root can do those things anyway.
Also; I cannot quite see why the drive should spin up; before you can
eject it.
AUTHOR
Dirk-Willem van Gulik, <Dirk.vanGulik@jrc.it> will not take the
blame if
you screw up your drive, machine or life. But I'll appreciate
feedback
nevertheless.
HISTORY
The jazctrl command was developed around Xmas 96, on an 2-Alpha
kernel;
and borrows heavily from a Linux example, some peeking in W'95 object
code and the scsi(8) and libscsi.a example.
a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.91.970109091114.5727A-100000>
