LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Running 'cdrecord' problem (https://www.linuxquestions.org/questions/%2Absd-17/running-cdrecord-problem-175049/)

satimis 04-27-2004 06:33 AM

Running 'cdrecord' problem
 
Hi all folks,

FreeBSD 5.2

I encountered following burning problem

# cdrecord dev=pci:0,0,0 speed=4 -v -eject cdimage.raw
Code:

Cdrecord 2.00.3 (i386-unknown-freebsd5.2) Copyright (C) 1995-2002 J顤g Schilling
TOC Type: 1 = CD-ROM
scsidev: 'pci:0,0,0'
devname: 'pci'
scsibus: 0 target: 0 lun: 0
cdrecord: Invalid argument. Open by 'devname' not supported on this OS. Cannot o
pen SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'

# cdrecord -scanbus
Code:

Cdrecord 2.00.3 (i386-unknown-freebsd5.2) Copyright (C) 1995-2002 J顤g Schilling
cdrecord: No such file or directory. 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'

# cdrecord dev=help
Code:

Cdrecord 2.00.3 (i386-unknown-freebsd5.2) Copyright (C) 1995-2002 J顤g Schilling
Supported SCSI transports for this platform:

Transport name:        CAM
Transport descr.:      Generic transport independent SCSI (Common Access Method)
Transp. layer ind.:
Target specifier:      bus,target,lun
Target example:        1,2,0
SCSI Bus scanning:      supported
Open via UNIX device:  not supported

Transport name:        RSCSI
Transport descr.:      Remote SCSI
Transp. layer ind.:    REMOTE:
Target specifier:      rscsi@host:bus,target,lun
Target example:        REMOTE:rscsi@host:1,2,0
SCSI Bus scanning:      supported
Open via UNIX device:  not supported

# pkg_info | grep cdrecord
No printout

# pkg_info | grep mkisofs
cdrtools-2.0.3 Cdrecord, mkisofs and several other programs to record CD-R
mkisofs-2.0.3 Create iso9660/Rock Ridge/Joliet filesystems

Kindly advise how to fix this problem.

B.R.
satimis

jailbait 04-27-2004 09:32 PM

I am not sure that the cdrecord command works exactly the same on BSD as on Linux but on Linux the valid command would be:
cdrecord dev=0,0,0 speed=4 -v -eject cdimage.raw


----------------------------
Steve Stites

satimis 04-27-2004 10:14 PM

Problem SOLVED
 
Quote:

Originally posted by jailbait
I am not sure that the cdrecord command works exactly the same on BSD as on Linux but on Linux the valid command would be:
cdrecord dev=0,0,0 speed=4 -v -eject cdimage.raw
----------------------------
Steve Stites

Hi jailbait,

Thanks for your advice.

Sorry 'cdrecord dev=0,0,0 speed=4 -v -eject cdimage.raw' did not work for me.

# cdrecord -scanbus
Code:

Cdrecord 2.00.3 (i386-unknown-freebsd5.2) Copyright (C) 1995-2002 J顤g Schilling
cdrecord: No such file or directory. 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'.

# cdrecord dev=help
Code:

Cdrecord 2.00.3 (i386-unknown-freebsd5.2) Copyright (C) 1995-2002 J顤g Schilling
Supported SCSI transports for this platform:

Transport name:        CAM
Transport descr.:      Generic transport independent SCSI (Common Access Method)
Transp. layer ind.:
Target specifier:      bus,target,lun
Target example:        1,2,0
SCSI Bus scanning:      supported
Open via UNIX device:  not supported

Transport name:        RSCSI
Transport descr.:      Remote SCSI
Transp. layer ind.:    REMOTE:
Target specifier:      rscsi@host:bus,target,lun
Target example:        REMOTE:rscsi@host:1,2,0
SCSI Bus scanning:      supported
Open via UNIX device:  not supported

# camcontrol devlist
No printout

I think I have to add 'atapicam' to the kernel and rebuild it. That will be a little bid complicate. However I found a solution as follow;

# burncd -e - v -f DEVICE data cdimage.raw fixate

It worked seamlessly, using IDE.

B.R.
satimis

satimis 04-29-2004 08:03 AM

Hi folks,

I still have a minor problem in blanking CDRW

# burncd -e -v -f /dev/acd1 blank
blanking CD - 100 % done
burncd: ioctl(CDIOCEJECT): Device busy

The CDRW can be blanked but would not be ejected.

Any advice? TIA

B.R.
satimis

psamuel01 05-20-2004 01:03 AM

Solved problem yet?
 
I gave up on burncd and I got cdrecord working on 5.2.1 using the atapi/cam (12.5.9 HNDBK) driver through the scsi subsystem. Here is the section of my kernel conf containing the necessary info:

# ATA and ATAPI devices
device ata
device atapicam
device atadisk # ATA disk drives
device ataraid # ATA RAID drives
device atapicd # ATAPI CDROM drives
#device atapifd # ATAPI floppy drives
#device atapist # ATAPI tape drives
options ATA_STATIC_ID #Static device numbering

# SCSI Controllers

# SCSI peripherals
device scbus # SCSI bus (required for SCSI)
device cd # CD
device pass # Passthrough device (direct SCSI access)


The line in BLUE was added by me. The lines in RED should already be included so add them if not. Then you need to compile the new kernel and all of this is in the handbook. After all is done you can check the info using "camcontrol devlist" and also greping dmesg to compare the scsi info. Hope this helps.

satimis 05-20-2004 09:49 AM

Re: Solved problem yet?
 
Quote:

Originally posted by psamuel01
I gave up on burncd and I got cdrecord working on 5.2.1 using the atapi/cam (12.5.9 HNDBK) driver through the scsi subsystem. Here is the section of my kernel conf containing the necessary info:

# ATA and ATAPI devices
device ata
device atapicam
device atadisk # ATA disk drives
device ataraid # ATA RAID drives
device atapicd # ATAPI CDROM drives
#device atapifd # ATAPI floppy drives
#device atapist # ATAPI tape drives
options ATA_STATIC_ID #Static device numbering

# SCSI Controllers

# SCSI peripherals
device scbus # SCSI bus (required for SCSI)
device cd # CD
device pass # Passthrough device (direct SCSI access)


The line in BLUE was added by me. The lines in RED should already be included so add them if not. Then you need to compile the new kernel and all of this is in the handbook. After all is done you can check the info using "camcontrol devlist" and also greping dmesg to compare the scsi info. Hope this helps.

Hi psamuel01,

Tks for your detail advice.

I have no previous experience on recompiling kernel of FreeBSD. I visited following link;
http://www.freebsd.org/doc/en_US.ISO...-building.html

But I am still not very clear of the correct steps to be taken. I shall take following steps

# cd /usr/src/sys/i386/conf
# cp GENERIC GENERIC.bak
# cp GENERIC MYKERNEL
# ee MYKERNEL
(according to your advice)

# config MYKERNEL
# cd /usr/src/sys/i386/compile/MYKERNEL
(Are the above directories correct???)

# make depend
# make
# make install

check /etc/rc.conf to have the line: linux_enable="YES"
reboot PC

Any further steps needed to be taken thereafter?

If I am wrong please correct me. TIA

B.R.
satimis

psamuel01 05-20-2004 01:24 PM

Looks good except...
 
I would also make a "kernels" directory under root and copy the kernel to it and symlink it to ../conf directory. That is shown in the handbook. I used the "make buildkernel/make installkernel" option as it is a few less steps. To use that option make sure you have installed all of the sources from sysinstall or manually. Other than that the way you are doing it looks good.

satimis 05-20-2004 07:39 PM

Re: Looks good except...
 
Quote:

I would also make a "kernels" directory under root and copy the kernel to it and symlink it to ../conf directory. That is shown in the handbook. I used the "make buildkernel/make installkernel" option as it is a few less steps. To use that option make sure you have installed all of the sources from sysinstall or manually. Other than that the way you are doing it looks good.
Hi,

Noted with thanks

B.R.
satimis

psamuel01 05-21-2004 01:40 AM

You are very welcome!

name_in_use450 06-03-2004 04:43 PM

true
 
This is the classic SCSI problem. basically you have to enable scsi emulation over an ide device. this is because burners use scsi commands. I know in linux you edit lilo.conf by 'append hdx=ide-scsi' and run /sbin/lilo. where 'x' is your device (usually c). freebsd doesnt use lilo so i would like to know myself ;) thanks.

psamuel01 06-04-2004 12:31 AM

Quote:

This is the classic SCSI problem. basically you have to enable scsi emulation over an ide device. this is because burners use scsi commands. I know in linux you edit lilo.conf by 'append hdx=ide-scsi' and run /sbin/lilo. where 'x' is your device (usually c). freebsd doesnt use lilo so i would like to know myself thanks.
Hey buddy!

In FreeBSD follow the aforementioned kernel compilation with the scsi subsystem and all should be fine. Let me kmow if there are any other issues.

Dean.

Alex Cavnar 06-05-2004 01:00 PM

When using FreeBSD, you should not need to enable SCSI emulation.

burncd should work with most any IDE burner. The only time you should use cdrecord is with SCSI burners.

Satimis, what version of FreeBSD are you running? The handbook link you noted at

http://www.freebsd.org/doc/en_US.ISO...-building.html

should contain pretty specific information on building and configuring your kernel. You really shouldn't need to recompile your kernel to burn CD-Rs, though.

Also, I would contact the author of the burncd program about the Device Busy message you got. I've had the same problem when trying to immediately mount CDs in 4.9 and earlier systems. It very well could be a bug in the atapicd device or something.

satimis 06-05-2004 05:08 PM

Quote:

Originally posted by Alex Cavnar
When using FreeBSD, you should not need to enable SCSI emulation.

burncd should work with most any IDE burner. The only time you should use cdrecord is with SCSI burners.

Satimis, what version of FreeBSD are you running? The handbook link you noted at

http://www.freebsd.org/doc/en_US.ISO...-building.html

should contain pretty specific information on building and configuring your kernel. You really shouldn't need to recompile your kernel to burn CD-Rs, though.

Also, I would contact the author of the burncd program about the Device Busy message you got. I've had the same problem when trying to immediately mount CDs in 4.9 and earlier systems. It very well could be a bug in the atapicd device or something.

Hi Alex Cavnar,

FreeBSD 5.2

Tks for your advice.

I'm now using 'burncd' without problem. I cease using 'cdrecord' on FreeBSD.

B.R.
satimis


All times are GMT -5. The time now is 06:53 PM.