LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   running cdrecord (https://www.linuxquestions.org/questions/linux-newbie-8/running-cdrecord-422642/)

DanTaylor 03-07-2006 07:51 PM

running cdrecord
 
how can I get cdrecord to burn a cd? I am using Debian Sarge, my CDRW is /deb/hdb. I can't get it to burn no matter how hard I try.

bathory 03-08-2006 03:26 AM

First run:
Code:

cdrecord --scanbus
to find your CDRW device number (something like 0,0,0). Then according to want you want to burn run:
Code:

# Burn an ISO to disk
cdrecord -v speed=<burning speed> dev=<your device> /path/to/foo.iso ; eject
# Burn from disk to disk
cdrecord -v dev=<your device> speed=<burning speed> -isosize /dev/hdb ; eject
# Burn a CD from wav files
cdrecord -v -audio -pad speed=5 dev=<your device> /path/to/*.wav

If you're using a 2.6.x kernel then replace dev=<your device> with: dev=ATAPI:<your device>, i.e:
Code:

cdrecord -v speed=8 dev=ATAPI:0,0,0 /path/to/foo.iso ; eject

jomen 03-08-2006 04:07 AM

I'd like to add a question:
I have never been able to figure out how to find the correct
scsibus: target: lun: notation if using an ATAPI device.

Years ago I had an scsi-burner - and cdrecord -scanbus would work.
Now with ATA and no scsi-emulation - I just don't know how to get those numbers to fill in the command:
Code:

cdrecord -v speed=8 dev=ATAPI:0,0,0 ...
what works for me is this:
Code:

cdrecord -v speed=8 dev=/dev/hdc ...
- but I get warnings about: using cooked_ioctl and it would not be advisable - but it works.
If I do:
Code:

cdrecord /dev/hdc -checkdrive
I get these infos regarding SCSI:
Quote:

scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
the values here: scsibus: -2 target: -2 lun: -2 are obviously wrong and not working - I even tried...
If anybody can enlighten me about this...would be great!

bathory 03-08-2006 04:42 AM

You can use this:
Code:

cdrecord dev=ATAPI -scanbus

jomen 03-08-2006 05:14 AM

If only it would be...working
I tried before and I tried now - here is the result:
Code:

sam jochen # cdrecord dev=ATAPI -scanbus
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 J�rg Schilling
cdrecord: Warning: Running on Linux-2.6.15-gentoo
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
scsidev: 'ATAPI'
devname: 'ATAPI'
scsibus: -2 target: -2 lun: -2
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow.
cdrecord: No such file or directory. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

I was even root - to rule out any permission issues - which are not there.
Can you give another hint? - Do you see something which I don't?

bathory 03-08-2006 05:51 AM

Quote:

cdrecord: No such file or directory. Cannot open SCSI driver.
You miss libscg. Because the next line should be:
Code:

Using libscg version 'schily-0.8'.
I think that this is because you use ide-scsi emulation, so you can remove it since you use a 2.6.x kernel and see if it helps

jomen 03-08-2006 06:26 AM

Thank you for now - I will give this a try.
As you saw - I'm using Gentoo - there are cofiguration-files for the build of each package (ebuild) and I have installed one called "cdrecord-prodvd" which might be redundant to the also installed "cdrtools" (which also provides cdrecord as it says on the Homepage and the description).
I'll remove the first one mentioned and check and tell you if I was successful.

jomen 03-08-2006 06:48 AM

update:
turns out to be two solutions:

1. when I compiled cdrtools I saw a message at the end of the install - which slipped my attention the first time, probably because I was compiling a lot one after another as is common in Gentoo when you update the whole system...
the message said:
Quote:

Note the special license on cdrecord/cdrecord.c starting from line 4648.

The command line option 'dev=/dev/hdX' (X is the name of your drive)
should be used for IDE CD writers. And make sure that the permissions
on this device are set properly and your user is in the correct groups.
And I read through the README.ATAPI provided with the source of cdrtools and got the idea to change the command a bit.

If I do it like this - it works as I was expecting:
Code:

sam portage # cdrecord dev=ATA -scanbus
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 J�rg Schilling
cdrecord: Warning: Running on Linux-2.6.15-gentoo
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
scsidev: 'ATA'
devname: 'ATA'
scsibus: -2 target: -2 lun: -2
Warning: Using badly designed ATAPI via /dev/hd* interface.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
scsibus1:
        1,0,0  100) 'TEAC    ' 'DV-W24ES        ' 'S.0A' Removable CD-ROM
        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) *

Now I have solved my question :) and learned, that how I did it already was the normal and recommended way to do it.

One can give eighter dev=/dev/hdX or
the scsi-notation: dev=X,X,X after running the above command and inserting the numbers which correspond to the burner.

Thank you very much! You pointed me in the right direction.

jomen 03-08-2006 07:03 AM

just tried to write something using dev=1,0,0 ...does not work.
probably because of this warning in the output of the scanning step above:
Quote:

Warning: Using badly designed ATAPI via /dev/hd* interface.
will probably have to use scsi-emulation for that drive if I want to use the scsi-names.
the result of using the scsi-names is here:
Code:

jochen@sam ~/Meine/scripte/burn_cd-rom $ cdrecord dev=1,0,0 -v -dao -useinfo -text  *.wav
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 J�rg Schilling
cdrecord: Warning: Running on Linux-2.6.15-gentoo
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
TOC Type: 0 = CD-DA
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
cdrecord: No such file or directory. Cannot open '/dev/sg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

Don't know if I'll bother doing this - since it works anyway...


All times are GMT -5. The time now is 03:54 PM.