LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cdrecord headaches (https://www.linuxquestions.org/questions/linux-software-2/cdrecord-headaches-480013/)

chessonly 09-03-2006 09:20 AM

[SOlVED] cdrecord headaches
 
UPDATE: EVERYTHINGS WORKING NOW :) , i'LL POST A SOLUTION SOON

Made a lil script ( last post), suggest improvements please


Cdrecord problem here :( , The media a fully functioning media, k3b works allright, but writing from the command line just fails :(

Output of various commands:

sudo cdrecord dev=/dev/hdc -scanbus Gives:
Code:

.
.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
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 'debian-0.8debian2'.
cdrecord: Warning: using inofficial version of libscg (debian-0.8debian2 '@(#)scsitransp.c      1.91 04/06/17 Copyright 1988,1995,2000-2004 J. Schilling').
scsibus1:
    1,0,0  100) 'SAMSUNG ' 'CD-R/RW SW-252F ' 'R802' 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) *

cdrecord -scanbus dev=ATAPI gives::

Code:

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: package and read /usr/share/doc/cdrecord/README.ATAPI.setup .

sudo cdrecord dev=ATAPI:1,0,0 ~/.zshrc gives :
Code:

cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
cdrecord: Continuing in 5 seconds...
.
.
cdrecord: Warning: Running on Linux-2.6.15-26-686-nosmp
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:1,0,0'
devname: 'ATAPI'
scsibus: 1 target: 0 lun: 0
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: package and read /usr/share/doc/cdrecord/README.ATAPI.setup

This and other writeing commands give the impression that all went well i.e there are no error messages,

But when I try to mount the disk I get:

Code:

sudo cdrecord dmount: wrong fs type, bad option, bad superblock on /dev/hdc,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Subsequently blanking the disk and writing with the help of k3b, everything works just perfect.

Please help, I really want to burn from the commandline. Is tehre anyway to know the exact commands used by k3b ?? Or is there any alternatives to cdrecord??
Using kubuntu here..

michaelk 09-03-2006 10:19 AM

Quote:

cdrecord dev=ATAPI:1,0,0 ~/.zshrc
This does not create a filesystem. To build a filesystem use mkisofs. Then you can burn via cdrecord.

http://linux.about.com/library/cmd/blcmdl8_mkisofs.htm
http://www.faqs.org/docs/Linux-HOWTO...WTO.html#ss3.1

chessonly 09-03-2006 11:58 AM

IT works!!
Can't believe of all the threads I searched no one mentioned this before.
Thanks a lot michaelk, I was struggliing with this for days.

one more questoin, how to do multisession recordings.
I tried

1. - create initial image: sudo mkisofs -r -o z_image ~/script
2. Writingsudo cdrecord -multi dev=/dev/hdc z_image

This worked great!

Then I created another image to write again,

1. s mkisofs -r -o 2nd_image ~/folder
writing..
2. sudo cdrecord -multi dev=/dev/hdc 2nd_image


NO error were there, but the 2nd write didn't work. Or atleast there weren't any files from the 2nd image burned.

chessonly 09-03-2006 01:09 PM

Ok I got clear instructions for burning muti-session from
http://www.togaware.com/linux/surviv...i_Session.html

It seems to work as well.
On the second write I get a "wrinting Track 02 " message.
No errors, but then again I can't 'find' it on the cd i.e only the files from from the first mount are listed.
I have mounted, ejected the cd btw.

Now what?? me is pretty clueless again

chessonly 09-03-2006 02:58 PM

Here it is my own humble lil script:

Though I can't figure out how to give multiple arguments to it.. $* or $@ or somethign else in place of $2. Suggest please.

Code:

###### Purpose of script to take the arguments and write them to a cd in multisession thing cleanly and without fuss.

##
#  U S A G E !!! - SCRIPTNAME FOLOWED BY IMAGE NAME, FOLLOWED BY FILE/FILES
##
echo "tocd $1(imagename) $2(file to be uploaded)"

# To check for next track
NEXTTRACK=`cdrecord -msinfo dev=ATA:1,0,0`


# if command is to check for blank cd in a very indirect way
if [ $NEXTTRACK ]
then
echo continuing multisession..

# making image - $1 is the name of
NEXTTRACK=`cdrecord -msinfo dev=ATA:1,0,0` &&  mkisofs -r -o $1  -C $NEXTTRACK -M /dev/cdrom $2

cdrecord  gracetime=2 -v -tao -multi  dev=/dev/hdc -data $1

rm $1
echo removing image...

else
echo startin cd..

mkisofs -r -o $1 $2
cdrecord  gracetime=2 -v -tao -multi  dev=/dev/hdc -data $1

#removing image
rm $1

fi



All times are GMT -5. The time now is 10:11 PM.