Subject: Re: Creating CDs with mkisofs/cdrecord: need help
To: None <netbsd-help@NetBSD.org>
From: Mike M. Volokhov <mishka@apk.od.ua>
List: netbsd-help
Date: 09/03/2005 19:59:02
On Sat, 03 Sep 2005 08:06:18 +0100
Dieter <netbsd@sopwith.solgatos.com> wrote:

[snip]
> Is this with a disk written using rcd0d ?

Yes.

> Is the drive
> 
> 	a PATA drive connected directly to a
> 	PATA controller?
> 
> 	a PATA drive connected via a PATA-to-USB
> 	adapter?
> 
> 	something else? (SATA, SCSI, ...)

I have two machines, desktop (custom build, TEAC CD-W512EB) and laptop
(Samsung V30, Samsung SN-324F). Both PATA:

mishka@nostromo:59> dmesg | grep -e piixide -e atabus -e cd0
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DB IDE Controller (ICH4) (rev. 0x02)
piixide0: bus-master DMA support present
piixide0: primary channel wired to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel wired to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
wd0 at atabus0 drive 0: <ST330013A>
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <CD-W512EB, , 2.0K> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
mishka@nostromo:60> uname -a
NetBSD nostromo.holding.local 3.99.3 NetBSD 3.99.3 (GENERIC) #0: Sat Apr  9 02:07:43 EEST 2005  mishka@nostromo.holding.local:/build/netbsd/obj-08042005/sys/arch/i386/compile/GENERIC i386

v30: {8} dmesg | grep -e piixide -e atabus -e cd0
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x03)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
wd0 at atabus0 drive 0: <IC25N040ATMR04-0>
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <SAMSUNG CDRW/DVD SN-324F, , U200> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
v30: {9} uname -a
NetBSD v30.holding.local 3.0_BETA NetBSD 3.0_BETA (GENERIC) #0: Thu Sep  1 23:36:19 EEST 2005  mishka@nostromo.holding.local:/build/netbsd/cbo2005/obj-i386/sys/arch/i386/compile/GENERIC i386

> Have you tried writing a disk using
> 
> 	growisofs -Z /dev/rcd0d=test.iso


On laptop installed CDRW/DVD-ROM, and I have a lot of troubles
determine media type (possible because this is DVD/CDRW combo). Thus
let me show output for operations with TEAC only:

nostromo# growisofs -Z /dev/rcd0d=test.iso 
:-[ GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h]: Operation not supported by device
:-( non-MMC unit?
nostromo# growisofs -Z /dev/cd0d=test.iso 
:-) you most likely want to use /dev/rcd0d instead!
WARNING: /dev/cd0d already carries isofs!
About to execute 'builtin_dd if=test.iso of=/dev/cd0d obs=32k seek=0'
builtin_dd: 48*2KB out @ average infx1385KBps

Hmm... Not MMC?

nostromo# cdrecord dev=/dev/rcd0d -checkdrive
Cdrecord 2.00.3 (i386-unknown-netbsd3.99.3) Copyright (C) 1995-2002 Jörg Schilling
scsidev: '/dev/rcd0d'
devname: '/dev/rcd0d'
scsibus: -2 target: -2 lun: -2
Using libscg version 'schily-0.7'
cdrecord: Warning: using inofficial libscg transport code version (frueauf-scsi-bsd.c-1.41nb1 '@(#)scsi-bsd.c   1.41 02/10/19 Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'TEAC    '
Identifikation : 'CD-W512EB       '
Revision       : '2.0K'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : MMC SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

> Then check with
> 
> 	dd if=/dev/rcd0d of=/var/tmp/some_filename bs=2k count=48

Hmmm... Interesting behaviour. rcd0d becomes readable with bs=2k, but
still produce errors when I do not pass count argument. Otherwise works
just like a charm.

nostromo# dd if=/dev/rcd0d of=/var/tmp/some_filename bs=2k count=48
48+0 records in
48+0 records out
98304 bytes transferred in 0.085 secs (1156517 bytes/sec)
nostromo# cmp test.iso /var/tmp/some_filename
nostromo# 

> Are you using media that is recommended for your
> make & model of drive?

There are TDK CD-R (52x, 700M), TDK CD-RW (10x, 700M), Esperanza CD-RW
(12x, 210M), and Acer CD-RW (2x, 650M).

There are also some additional info about all these (Greg, thanks for
advice!):

mishka@nostromo:1> dd if=/dev/cd0d of=/dev/null bs=2048
dd: /dev/cd0d: Input/output error
301+0 records in
301+0 records out
616448 bytes transferred in 6.747 secs (91366 bytes/sec)

mishka@nostromo:2> cdrecord dev=/dev/rcd0d -toc
[snip]
first: 1 last 1
track:   1 lba:         0 (        0) 00:02:00 adr: 1 control: 4 mode: 1
track:lout lba:       302 (     1208) 00:06:02 adr: 1 control: 4 mode: -1

Please note difference between stored blocks and blocks have been read:
302/301, i.e. 2048 bytes.

Should I try yet another drive? :-/

--
Mishka.