From owner-freebsd-questions Sat Apr 21 5:33:31 2001 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id E363537B423 for ; Sat, 21 Apr 2001 05:33:25 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([fec0::2e0:7dff:fe81:749d] ident=root) by scientia.demon.co.uk with esmtp (Exim 3.22 #1) id 14qwZo-0006wv-00; Sat, 21 Apr 2001 13:33:24 +0100 Received: (from ben@localhost) by strontium.scientia.demon.co.uk (8.11.3/8.11.3) id f3LCXNA92187; Sat, 21 Apr 2001 13:33:23 +0100 (BST) (envelope-from ben) Date: Sat, 21 Apr 2001 13:33:23 +0100 From: Ben Smithurst To: andrew@ugh.net.au Cc: freebsd-questions@freebsd.org Subject: Re: Duplicating Audio CDs Message-ID: <20010421133323.B42151@scientia.demon.co.uk> References: <20010421221914.X40225-100000@starbug.ugh.net.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010421221914.X40225-100000@starbug.ugh.net.au> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline andrew@ugh.net.au wrote: > As this is a duplication (the original CD was burnt by a burning "machine" > rather than a computer which supported all sorts of funny tricks including > DAO) I can get a a cd image using dd but how do I burn the image to > another CD? > > If I use "burncd -f /dev/cdrom -s 8 audio cd.image fixate" I'm guessing it > will just write it as one track rather than the several on the origianl > CD? As the file would be a CD image should I use data instead of audio? I'm sure there's an easier way, but I've used the attached kludgy script successfully. -- Ben Smithurst / ben@FreeBSD.org --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=copycd #!/bin/sh set -e SRC=/dev/acd1 DST=/dev/cdr TMPDIR=`mktemp -d /tmp/copycd.XXXXXXXXXX` cd $TMPDIR tracks=`cdcontrol -f $SRC info | awk '$6 == "audio" {print $1}'` fifos="" for i in $tracks; do fifos="$fifos fifo$i" done mkfifo $fifos (sleep 3; burncd -q -s 2 -f $DST audio $fifos fixate) & for i in $tracks; do echo Copying track $i... dd if=${SRC}t$i of=fifo$i bs=2352 2>output || { cat output false } done echo Written tracks, fixating CD... wait test $? = 0 echo Done. rm $fifos output cd / rmdir $TMPDIR --RnlQjJ0d97Da+TV1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message