# Trying to get IDE burner to work with cdrecord

## Abecedarian

So, my IDE dvd burner *did* work... at least I thought it did! I went the other day to burn a CD only to find out that every CD failed time and time again. A few quick commands later and I found that cdrecord -scanbus revealed no targets! I checked and updated, recompiled my kernel - and my situation was improved so that -scanbus now showed at least my SATA hard drive. However, my dvd burner and cd drive (both IDE) remained elusive. I've checked kernel settings a thousand times, and even tried the "append="hdd=ide-scsi" line in grub that has been recommended to others for IDE-SCSI emulation that cdrecord seems to require (even though I didn't need it last time). To no avail.

Help?

I'm not sure what kernel options to quote, so ask away if you need to.

----------

## frostschutz

You don't use ide-scsi anymore in 2.6 kernels.

For cdrecord, make sure you are root and don't use dev=/dev/hdb, but dev=0,1,0 or whatever target your drive is.

Make sure you got IDE/ATAPI support in your kernel, but not IDE-SCSI.

----------

## wynn

Here the situation is

```
ls -l /sys/block

...

0 drwxr-xr-x  5 root root 0 2007-05-02 07:59 hda/

0 drwxr-xr-x  5 root root 0 2007-05-02 07:59 hdb/

...
```

with

```
# cat /proc/ide/ide0/hdb/model

PIONEER DVD-RW DVR-111
```

and, to write CD-Rs

```
# cat /home/root/scripts/write-cdr.sh

#!/bin/bash -x

if [ -z "$1" ]; then

   echo 'Usage: '$0' <iso image>'

   exit 0

fi

cdrecord -v -v -tao fs=16m dev=/dev/hdb -eject gracetime=2 -data $1
```

The driver for both the DVD-ROM and the DVD-RW is "PIIX_IDE" as it is an Intel motherboard.

(Kernel is 2.6.21 but this hasn't changed since 2.6.19)

----------

## Abecedarian

frosts: I can't open with the numerical location, because scanbus won't work, so I don't know what numbers to use. And if scanbus doesn't pick it up then neither will trying to use it regardless.

wynn: My mobo is an a8n-sli and hence I'm using the "AMD and nVidia IDE Support" kernel drivers (Block devices -> ATA/ATAPI/MFM/RLL Support). This allows me to access them normally, it's just cdrecord that doesn't like it - I was indeed able to list the model and make using the method you described. Script or no though, it still fails.

----------

## wynn

This is what I get

```
# cdrecord -scanbus

Cdrecord-ProDVD-Clone 2.01.01a10 (i686-pc-linux-gnu) Copyright (C) 1995-2006 JÃÂ¶rg Schilling

cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.

cdrecord: For possible targets try 'cdrecord -scanbus'.

cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
```

and doing a dummy write as root

```
# cdrecord -dummy -tao fs=16m dev=/dev/hdb -eject gracetime=2 -data install-x86-minimal-2006.1.iso

Cdrecord-ProDVD-Clone 2.01.01a10 (i686-pc-linux-gnu) Copyright (C) 1995-2006 JÃÂ¶rg Schilling

scsidev: '/dev/hdb'

devname: '/dev/hdb'

scsibus: -2 target: -2 lun: -2

Warning: Open by 'devname' is unintentional and not supported.

Linux sg driver version: 3.5.27

Using libscg version 'schily-0.8'.

Device type    : Removable CD-ROM

Version        : 0

Response Format: 2

Capabilities   :

Vendor_info    : 'PIONEER '

Identifikation : 'DVD-RW  DVR-111 '

Revision       : '1.06'

Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).

Driver flags   : MMC-3 SWABAUDIO BURNFREE

Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

Starting to write CD/DVD at speed 40 in dummy TAO mode for single session.

Last chance to quit, starting dummy write    0 seconds. Operation starts.

Track 01: Total bytes read/written: 55887872/55887872 (27289 sectors).

#
```

----------

## Abecedarian

```
ls -l /sys/block | grep hdd

...

0 drwxr-xr-x  5 root root 0 2007-05-02 07:59 hdd/

...
```

```
# cat /proc/ide/ide1/hdd/model

PIONEER DVD-RW DVR-110D
```

```
# cdrecord -scanbus

Cdrecord-ProDVD-Clone 2.01.01a10 (i686-pc-linux-gnu) Copyright (C) 1995-2006 JÃÂ¶rg Schilling

Linux sg driver version: 3.5.34

Using libscg version 'schily-0.8'.

scsibus1:

        1,0,0   100) 'ATA     ' 'WDC WD3000JS-00P' '21.0' Disk

        1,1,0   101) *

        1,2,0   102) *

        1,3,0   103) *

        1,4,0   104) *

        1,5,0   105) *

        1,6,0   106) *

        1,7,0   107) *
```

```
# write-cdr /mnt/storage/cdimage.iso

Last chance to quit, starting dummy write    0 seconds. Operation starts.

Waiting for reader process to fill input buffer ... input buffer ready.

BURN-Free is ON.

Turning BURN-Free off

Starting new track at sector: 0

Track 01:    0 of  628 MB written.cdrecord: Success. write_g1: scsi sendcmd: no error

CDB:  2A 00 00 00 00 1F 00 00 1F 00

status: 0x2 (CHECK CONDITION)

Sense Bytes: 70 00 04 00 00 00 00 0E 00 00 00 00 08 03 00 00

Sense Key: 0x4 Hardware Error, Segment 0

Sense Code: 0x08 Qual 0x03 (logical unit communication crc error (ultra-dma/32)) Fru 0x0

Sense flags: Blk 0 (not valid) 

resid: 63488

cmd finished after 0.001s timeout 40s

write track data: error after 63488 bytes

cdrecord: A write error occured.

cdrecord: Please properly read the error message above.

Writing  time:    6.956s

Average write speed 623.3x.

Fixating...

WARNING: Some drives don't like fixation in dummy mode.

Fixating time:    0.142s

cdrecord: fifo had 256 puts and 2 gets.

cdrecord: fifo was 0 times empty and 1 times full, min fill was 99%.
```

Kernel 2.6.20r7 (gentoo-sources). And yes, the write-cdr script points to the correct dev.

----------

## wynn

One possible difference here is that SCSI Generic support has been removed from the kernel as an experiment (it will probably have to go back in before a USB flash drive can be mounted, though).

It may be that cdrecord is looking at /dev/sgN because it finds it before /dev/hdd.

----------

## Abecedarian

Tried removing SCSI generic support; same as always. /dev/sg0 has dissapeared and the error still occurs, so it can't be that.

Any other thoughts?

----------

## wynn

 *Abecedarian wrote:*   

> Any other thoughts?

 Sorry, no.

It's odd though that cdrecord is picking up your disk drive though I suppose, being a SATA disk, it's attached to the SCSI bus. But the SATA drives here aren't picked up.

Curiously enough, Googling for WD3000JS-00P showed [Debburn-devel] Re: Problem recording with new system with

```
# wodim -scanbus

scsibus0:

        0,0,0     0) 'ATA     ' 'ST3808110AS     ' '3.AA' Disk

...

scsibus1:

        1,0,0   100) 'HL-DT-ST' 'DVD-RAM GSA-H30N' '1.04' Removable CD-ROM

...

scsibus2:

        2,0,0   200) 'ATA     ' 'WDC WD3000JS-00P' '21.0' Disk
```

----------

## Abecedarian

I'm unmerging cdrtools and trying cdrkit as we speak. I'll see if that works - for it seems to be a software error only...

 *Quote:*   

> # cdrdao scanbus
> 
> Cdrdao version 1.2.1 - (C) Andreas Mueller <andreas@daneb.de>
> 
>   SCSI interface library - (C) Joerg Schilling
> ...

 

...unfortunately, cdrdao only burns .bin and .cue files - it can't handle .iso.

EDIT: Nope, check it out:

 *Quote:*   

> # wodim --devices
> 
> Beginning native device scan. This may take a while if devices are busy...
> 
> wodim: Warning: controller returns wrong size for CD capabilities page.
> ...

 

...but -scanbus produced the exact same error as the cdrtools package, as did attempting a dummy write.

----------

## wynn

One last thing occurred to me

```
# cdrecord -dev=ATA: -scanbus

Cdrecord-ProDVD-Clone 2.01.01a10 (i686-pc-linux-gnu) Copyright (C) 1995-2006 JÃÂ¶rg Schilling

scsidev: 'ATA:'

devname: 'ATA'

scsibus: -1 target: -1 lun: -1

Warning: Using badly designed ATAPI via /dev/hd* interface.

Linux sg driver version: 3.5.27

Using libscg version 'schily-0.8'.

scsibus0:

        0,0,0     0) 'PIONEER ' 'DVD-ROM DVD-116 ' '1.09' Removable CD-ROM

        0,1,0     1) 'PIONEER ' 'DVD-RW  DVR-111 ' '1.06' Removable CD-ROM

        0,2,0     2) *

        0,3,0     3) *

        0,4,0     4) *

        0,5,0     5) *

        0,6,0     6) *

        0,7,0     7) *
```

whereas just plain -scanbus returned nothing as you have seen.

----------

## Abecedarian

 :Surprised: 

```
 # wodim -dev=ATA -scanbus

scsibus1:

wodim: Warning: controller returns wrong size for CD capabilities page.

        1,0,0   100) 'SONY    ' 'CD-ROM CDU5211  ' 'YYS7' Removable CD-ROM

        1,1,0   101) 'PIONEER ' 'DVD-RW  DVR-110D' '1.08' Removable CD-ROM

        1,2,0   102) *

        1,3,0   103) *

        1,4,0   104) *

        1,5,0   105) *

        1,6,0   106) *

        1,7,0   107) *
```

*double-take*

and then... and then...

```
 # wodim -dev=1,1,0 -dummy /mnt/storage/cdimage.iso

wodim: No write mode specified.

wodim: Asuming -tao mode.

wodim: Future versions of wodim may have different drive dependent defaults.

Device type    : Removable CD-ROM

Version        : 0

Response Format: 2

Capabilities   : 

Vendor_info    : 'PIONEER '

Identification : 'DVD-RW  DVR-110D'

Revision       : '1.08'

Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).

Driver flags   : MMC-3 SWABAUDIO BURNFREE 

Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

Speed set to 7056 KB/s

Starting to write CD/DVD at speed  40.0 in dummy TAO mode for single session.

Last chance to quit, starting dummy write    0 seconds. Operation starts.

Errno: 0 (Success), write_g1 scsi sendcmd: no error

CDB:  2A 00 00 00 00 00 00 00 1F 00

status: 0x2 (CHECK CONDITION)

Sense Bytes: 70 00 04 00 00 00 00 0E 00 00 00 00 08 03 00 00

Sense Key: 0x4 Hardware Error, Segment 0

Sense Code: 0x08 Qual 0x03 (logical unit communication crc error (ultra-dma/32))

 Fru 0x0

Sense flags: Blk 0 (not valid) 

resid: 63488

cmd finished after 0.073s timeout 40s

write track data: error after 0 bytes

wodim: A write error occured.

wodim: Please properly read the error message above.
```

Well damn. That just doesn't make any sense.

----------

## wynn

Yes, you can see why Joerg Schilling is, shall we say, prickly.

"It takes a prickly man to write a cdrtools" as the old song goes   :Smile: 

----------

## Gusar

Does "wodim dev=/dev/hdd" not work? That is how wodim is supposed to be used. Another thing to try is "wodim dev=ATA:1,1,0"

----------

## Abecedarian

I win.

I came across this:

 *Quote:*   

> * Omry Yadan [Fri, Nov 10 2006, 12:01:52PM]:
> 
> > having a problem to burn an iso file to a cdrom.
> 
> > any idea what can be the reason?
> ...

 

Then, on my machine:

 *Quote:*   

> # hdparm -d /dev/hdd   
> 
> /dev/hdd:
> 
>  using_dma    =  1 (on)

 

It's on... but the error said DMA... so I may as well disable it and see.

 *Quote:*   

>  hdparm -d0 /dev/hdd 
> 
> /dev/hdd:
> 
>  setting using_dma to 0 (off)
> ...

 

 *Quote:*   

> # cdrecord dev=ATA:1,1,0 /mnt/storage/image.iso
> 
> cdrecord: No write mode specified.
> 
> cdrecord: Asuming -tao mode.
> ...

 

 :Surprised: 

The only downside is that it lags to all hell when doing it. It's not the ideal fix, but it's a fix... so thanks to all that helped, especially wynn. I'm checking out that movie in your sig atm.

----------

## frostschutz

You sure you got the correct IDE chipset enabled in your kernel? DMA support depends heavily on it - if you're not using the correct driver / or if you're using the generic driver, things can blow up in your face.

----------

## Abecedarian

Well, as I said, I've got an a8n-sli - an Asus motherboard filled with integrated nVidia products and housing an AMD processor. "AMD and nVidia Support" seemed like the right choice for an IDE driver?

----------

## frostschutz

lspci should be able to tell you which IDE chipset you have

```
# lspci | grep -i ide

00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
```

----------

## wynn

From How to figure out what modules you need: http://kmuto.jp/debian/hcl/ *Quote:*   

> Debian GNU/Linux device driver check page
> 
> Please paste your result of 'lspci -n' taken from GNU/Linux OS (such as Debian, Knoppix, RedHat, and so on) to below box. Then let's push 'Check' button.

 Very handy, thanks meka.

----------

