Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CD-R with NetBSD-1.3?

0 views
Skip to first unread message

Chris Jones

unread,
Jan 9, 1998, 3:00:00 AM1/9/98
to

I noticed that people were talking about CD-R's earlier on this list, so
maybe somebody out there has gone through this and can help me out:

I've got an HP 4020i CD-R drive, and I can't write CD's with it. I'm
using cdrecord from the pkg system, compiled a couple days ago, and a
kernel I compiled from the 1.3 sources on ftp.netbsd.org. SCSI controller
is an AIC-6360, and I've unplugged all other SCSI devices from it. This
is an i386, BTW.

I linked /dev/scgx -> /dev/cd0d (cd0 is successfully attached at boot
time, and I can use the drive as a normal CD-ROM via this).

Cdrecord can successfully inquire (-inq) and identify (-checkdrive), but
it won't actually write anything. It sits for a few minutes, then it says
"CD-Recorder not ready." Any help would be greatly appreciated.

Script started on Thu Jan 8 14:01:41 1998
# cdrecord -v -V -dummy dev=3D2,0 speed=3D2 /usr/cdimage.iso
Cdrecord release 1.5 Copyright (C) 1995-1997 J=F6rg Schilling
TOC Type: 1 =3D CD-ROM
scsidev: '2,0'
scsibus: 0 target: 2 lun: 0

Executing 'test unit ready' command on Bus 0 Target 2, Lun 0 timeout 20s
CDB: 00 00 00 00 00 00
cdrecord: Undefined error: 0. test unit ready: scsi sendcmd: no error
status: 0x2 (CHECK CONDITION)
Sense Bytes:
Sense Key: 0xFFFFFFFF [], Segment 0
Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
Sense flags: Blk 0 (not valid)=20

[previous 9 lines repeated approx. eleventy-billion times]

cdrecord: CD-Recorder not ready.
#=20
Script done on Thu Jan 8 14:10:40 1998

Chris

---------------------------------------------------------------------------=
----
Chris Jones cjo...@rupert.oscs.montana=
=2Eedu
Mad scientist in training...
"Is this going to be a stand-up programming session, sir, or another bug hu=
nt?"


Brian Buhrow

unread,
Jan 9, 1998, 3:00:00 AM1/9/98
to

It looks like you're using cdrecord 1.5. I wonder if the 1.6 cdrecord
might not work better? I remember something in the release notes about
some cd players working better, especially with timing, between 1.5 and
1.6. I don't remember, however, which players they were.
I've got cdrecord 1.6B6 compiled for I386/NetBSD 1.2G (libc version
12.17) if you want to give that a try. (That's direct from the European
distribution site.)
-Brian

On Jan 8, 2:24pm, Chris Jones wrote:
} Subject: CD-R with NetBSD-1.3?

>-- End of excerpt from Chris Jones

Chris Jones

unread,
Jan 10, 1998, 3:00:00 AM1/10/98
to

On Thu, 8 Jan 1998, Brian Buhrow wrote:
> It looks like you're using cdrecord 1.5. I wonder if the 1.6 cdrecord
> might not work better? I remember something in the release notes about
> some cd players working better, especially with timing, between 1.5 and
> 1.6. I don't remember, however, which players they were.

Well, 1.6 didn't behave any differently than 1.5 did. Anybody else have
any ideas? For that matter, is there anybody who's gotten cdrecord to
work with NetBSD-1.3?

Chris

-------------------------------------------------------------------------------
Chris Jones cjo...@rupert.oscs.montana.edu
Mad scientist in training...
"Is this going to be a stand-up programming session, sir, or another bug hunt?"


Phil Nelson

unread,
Jan 10, 1998, 3:00:00 AM1/10/98
to

>any ideas? For that matter, is there anybody who's gotten cdrecord to
>work with NetBSD-1.3?

Yes. I have cdrecord working with NetBSD-1.3. Hardware is:

cd0 at scsibus0 targ 4 lun 0: <HP, CD-Writer 6020, 1.07> SCSI2 5/cdrom removable

--
Phil Nelson NetBSD: http://www.netbsd.org
e-mail: ph...@cs.wwu.edu !gifs: http://www.gnu.org/philosophy/gif.html
http://www.cs.wwu.edu/~phil

Ken Wellsch

unread,
Jan 10, 1998, 3:00:00 AM1/10/98
to

> Well, 1.6 didn't behave any differently than 1.5 did. Anybody else have
> any ideas? For that matter, is there anybody who's gotten cdrecord to
> work with NetBSD-1.3?

Ditto for me; I've successfully used "cdrecord" since last August with
weekly or biweekly -current installs...

uk0 at scsibus0 targ 6 lun 0: <YAMAHA, CDR100, 1.11> SCSI2 4/worm removable

-- Ken

Dave Burgess

unread,
Jan 11, 1998, 3:00:00 AM1/11/98
to

>
>
> >any ideas? For that matter, is there anybody who's gotten cdrecord to
> >work with NetBSD-1.3?
>
> Yes. I have cdrecord working with NetBSD-1.3. Hardware is:
>
> cd0 at scsibus0 targ 4 lun 0: <HP, CD-Writer 6020, 1.07> SCSI2 5/cdrom removable
>

My Sony CD writer will not write a CD if it is connected as a 'cd'
drive. It will only work as a 'uk' drive. I also had to install it as
a WORM drive. When I last looked at it (two months ago), the SCSI/ATAPI
subsystem wasn't ready to do writable CD-ROMs....

uk0 at scsibus0 targ 2 lun 0: <SONY, CD-R CDU926S, 1.1f> SCSI2 4/worm removable
uk0: unknown device
--
Dave Burgess Network Engineer - Nebraska On-Ramp, Inc.
*bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom
"Just because something is stupid doesn't mean there isn't someone that
doesn't want to do it...."

Chris Jones

unread,
Jan 13, 1998, 3:00:00 AM1/13/98
to

On Sat, 10 Jan 1998, Dave Burgess wrote:
> My Sony CD writer will not write a CD if it is connected as a 'cd'
> drive. It will only work as a 'uk' drive. I also had to install it as
> a WORM drive. When I last looked at it (two months ago), the SCSI/ATAPI
> subsystem wasn't ready to do writable CD-ROMs....
>
> uk0 at scsibus0 targ 2 lun 0: <SONY, CD-R CDU926S, 1.1f> SCSI2 4/worm removable
> uk0: unknown device

Still no luck. It now ID's as:

uk0 at scsibus0 targ 2 lun 0: <HP, C4324/C4325, 1.27> SCSI2 5/cdrom removable
uk0: unknown device

I know this drive works, because my friend made it work on a FreeBSD
system. I know my SCSI controller works, because I've been using a tape
drive on it.

When you say you had to install it as a WORM drive, what exactly do you
mean? I noticed that your flags are 4 instead of 5; is that it? If so,
how does one go about changing this? Is it device-specific?

Brian Buhrow

unread,
Jan 13, 1998, 3:00:00 AM1/13/98
to

I believe cdrecord has its own SCSI level driver, so as long as you
can expose the SCSI layer to cdrecord, it should work. This should be true
whether or not the device shows up as a cd or as uk. The advantage of
having it show up as a cd is that you can use the cd driver to actually
read from the cds you burn rather than having to switch them to another cd
player to test them.
My Sony 920S shows up as device type 4 which I guess is WORM. Since
the cd driver doesn't recognize this type of device as something it can
drive, the subsystem doesn't assign it to the cd driver. Thus, I get uk0
at target 5 lun 0.
For ease of use with cdrecord, I symlink /dev/scgx to /dev/uk0. I
suspect that if this thing showed up as a cd, I could symlink /dev/scgx to
/dev/cdxa and it would work. Incidentally, I burned my first cd last night
on the Sony with cdrecord 1.6, NetBSD 1.2G and the uk device. It worked
great.
I suspect your problem is some timing incompatibility between the SCSI
CD-R driver inside cdrecord and your actual device. Is it possible that
the device you have is a different revision than the one used to develop
the driver?
-Brian

On Jan 12, 3:14pm, Chris Jones wrote:
} Subject: Re: CD-R with NetBSD-1.3?

Chris Jones

unread,
Jan 15, 1998, 3:00:00 AM1/15/98
to

On Mon, 12 Jan 1998, Brian Buhrow wrote:
> I believe cdrecord has its own SCSI level driver, so as long as you
> can expose the SCSI layer to cdrecord, it should work. This should be true
> whether or not the device shows up as a cd or as uk. The advantage of
> having it show up as a cd is that you can use the cd driver to actually
> read from the cds you burn rather than having to switch them to another cd
> player to test them.

This is my impression, too.

> My Sony 920S shows up as device type 4 which I guess is WORM. Since
> the cd driver doesn't recognize this type of device as something it can
> drive, the subsystem doesn't assign it to the cd driver. Thus, I get uk0
> at target 5 lun 0.

My HP 4020i doesn't appear to have a mechanism allowing it to switch from
type 5 to type 4. Hmmph.

> For ease of use with cdrecord, I symlink /dev/scgx to /dev/uk0. I
> suspect that if this thing showed up as a cd, I could symlink /dev/scgx to
> /dev/cdxa and it would work. Incidentally, I burned my first cd last night
> on the Sony with cdrecord 1.6, NetBSD 1.2G and the uk device. It worked
> great.

Actually, I think you'd need to link it to cd0d. I tried it with cd0a,
and I couldn't even get inquiry info from the CD-R. With cd0d, however,
it works. (That's probably cd0c on other ports.) This guess is supported
by something I saw in one of many man pages I browsed; maybe cd(4).

> I suspect your problem is some timing incompatibility between the SCSI
> CD-R driver inside cdrecord and your actual device. Is it possible that
> the device you have is a different revision than the one used to develop
> the driver?

I sort of doubt it, but it *is* possible. According to the friend I
borrowed this from, this is one of the very first CD-R drives that came
out. I would think that it would, therefore, be more likely to have code
written for it.

Does anybody know if there's any reason why NetBSD doesn't have a WORM (or
CD-R) driver? Would such a thing even be necessary, or do people think
it's a better idea to go with programs like cdrecord, which uses the
generic scsi(4) interface?

Brian Buhrow

unread,
Jan 15, 1998, 3:00:00 AM1/15/98
to

The notes I read in the cdrecord man pages and readmes indicate that
the WORM identity with which older CD-r drives identify themselves is
completely erronious. Since the traditional WORM devices are a far cry
from CD players, we should probably have a separate driver for them. My
solution has ben not to worry about driver support under NetSBD per say and
let cdrecord figure it out. The down side to this is that I cannot
actually read cds on the same drive on which I burn them. To do taht, I'd
have to hack the code that assigns devices to drivers. While that might be
fine for me, I don't think it would be a good idea to try and put code in
the NetBSD tre which would try to go beyond the device type code, which in
this case is WORM (4), and rely on huristics, a quirk table if you will,
which would assign devices to drivers. CD-Rs under Unix are a little
esoterik anyway, and as such, deserve a little higher knowledge on the part
of the user. That said, however, some documentation showing how this stuff
fits together would be nice.
-Brian

On Jan 14, 2:38pm, Chris Jones wrote:
} Subject: Re: CD-R with NetBSD-1.3?

Justin T. Gibbs

unread,
Jan 15, 1998, 3:00:00 AM1/15/98
to

> The notes I read in the cdrecord man pages and readmes indicate that
>the WORM identity with which older CD-r drives identify themselves is
>completely erronious. Since the traditional WORM devices are a far cry
>from CD players, we should probably have a separate driver for them.

You shouldn't limit yourself to thinking that there has to be a 1-1 match
between peripheral drivers and SCSI devices. In the CAM SCSI layer, a
device may be shared between several peripheral drivers. In fact, this is
quite common. If you have the "pass through" device configured in your
kernel, it will attach, in addition to the driver you'd expect, to any
device found. The userland SCSI library uses the pass through driver to
send arbitrary commands to a device. Although the "worm" driver hasn't
been written yet, I expect that for the devices that support CD type
functionality, both the cd and worm drivers will attach to the device and
use the CAM provided locking facilities to ensure exclusive access when
it is required.

--
Justin

0 new messages