LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-24-2005, 04:35 AM   #1
quercusalba
LQ Newbie
 
Registered: Nov 2004
Location: Wisconsin, USA
Distribution: Fedora 2, redhat 9
Posts: 14

Rep: Reputation: 0
burning and copying cds to multiple drives


Ok, so what I'm looking for is a program that will allow me to put a master cd in one drive and then have it copied to two or three other cd drives (ide). I'm trying to set up a cd copier for my church, we already have a couple of linux boxes running FC3 and plenty of 48xCDR drives laying around, so I'd like to use the materials we have on hand and avoid the 300-700$ cost of buying a 'real' cd copier.

I went through the archives and found a scant few old posts on this subject, but could not find anything conclusive of copying from a master to multiple cd drives. Does anyone know of a program that would be capable of doing this?

Forrest
 
Old 09-24-2005, 10:30 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 60
Maybe you would be interested in making an iso image, then use this script to burn the iso image using multiple devices.

Use the command:
cdrecord --scanbus to see what the available recording devices are.
Then add them to the burn statement. For example... "0,0,0" "0,1,0" "0,2,0"
If you have an older OS, you may need to add a line to the grub.conf for cdrom devices... hdc=ide-scsi hdd=ide-scsi
It will eject and prompt for the next blank cdrom to be loaded.

Make the script executable and run....
./cdburn /home/myfile.iso "0,0,0" "0,1,0"
Press Ctrl-C to stop the script

Code:
Edit: If you have a newer OS, you may need to change this line in the script....
cdrecord --eject dev="$1" --data "$ISOFILE" &> /dev/null
to this...
cdrecord --eject dev=ATA:"$1" --data "$ISOFILE" &> /dev/null
Code:
#!/bin/bash

#Copyright David Stark 2004
#Program to initiate cdrecord on multiple devices, recording on successive 
#blanks until SIGINT (Ctrl-C) is received.

#Version 0.3.1

#User help
if [ $# == 0 ] || [ $1 == "-h" ] || [ $1 == "--help" ]
    then
    echo "This program starts cdrecord to burn one image file to multiple devices,"
    echo "ejecting the cd when recording has finished. When a blank CD is inserted"
    echo "into any of the specified drives, recording of the image begins again."
    echo ""
    echo "Usage: $0 image devicelist"
    echo ""
    echo "'image' is the name of the image to be burned."
    echo "'devicelist' must be a list of devices which cdrecord understands -"
    echo "                                   see 'man cdrecord' for details."
    echo ""
    echo "Do Ctrl-C to terminate when recording is finished."
    exit 0
fi

#Argument sanity check
if [ $# -lt 2 ]
    then
    echo "Not enough arguments. See '$0 -h' for help."
    exit 1
fi

if ! [ -e $1 ]
    then
    echo "$1 does not exist. Exiting."
    exit 1
fi

ISOFILE=$1

#Function launced for each drive. Launches with new PID.
burndrive()
{
    echo "Please insert a blank CD into $1 to begin."
    while true
      do
      sleep 2
      STATUS=`cdrecord -V --inq dev="$1" 2>&1`
      echo $STATUS | grep "medium not present" &> /dev/null
      if [ $? != 0 ]
	  then
	  echo "CD loaded on $1. Continuing."
	  cdrecord --eject dev="$1" --data "$ISOFILE" &> /dev/null
	  RESULT=$?
	  case $RESULT in
	      0) #Burn completed
		  echo "Burning completed successfully on drive $1."
		  echo "Insert a blank disc to continue on $1.";;
	      254) #Non-blank disc
		  echo "Disc in $1 is not blank."
		  echo "Please insert a blank disc in $1.";;
	      *) #
		  echo "Unknown error on $1. Error num: $RESULT"
		  echo "Please email davidstark (at) myrealbox.com";;
	  esac
      fi
    done
}

for go in "$@"
do
  if [ "$go" != "$1" ]
      then
      burndrive "$go" &
      PIDLIST="$PIDLIST $!" #Collect subshell PIDs
  fi
done

#Kill subshells, then exit
trap "kill -9 $PIDLIST; exit 0" SIGINT

#This sleep loop is just to retain control of the console -
#for message output, and to catch Ctrl-C
while true
  do
  sleep 1000
done

Last edited by homey; 09-24-2005 at 10:36 AM.
 
Old 09-24-2005, 09:35 PM   #3
quercusalba
LQ Newbie
 
Registered: Nov 2004
Location: Wisconsin, USA
Distribution: Fedora 2, redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks homey for that info, I found the script that David Stark wrote on an earlier post too. Unfortunatly it probably won't work well for my situation. The people I would be setting up this for aren't very computer literate and it would take a while to get them to understand how to run command line programs and scripts. What I really would like to know is if there is a graphical program that allows one to simply place a master cd in one CDdrive and then have it copied to several other CDdrives. Perhaps one of the current programs (like K3B) is capable of this, but it doesn't look like it.
 
Old 09-24-2005, 09:55 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
What about using the script above and adding a few lines that also create the iso once a CD is placed in the drive. It wouldn't be hard to then create a 'desktop icon' that they click that in turns open an xterm and executes the script. Possibly even something PHP/Apache based?

Cool
 
Old 09-25-2005, 12:46 AM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 60
Have a look at Disc-O-Matic as it maybe what you are after.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copying audio cds skoot Linux - Newbie 8 05-18-2005 08:56 AM
How can I install debian stable (multiple cds) without burning the isos? Ac1db0rN Debian 5 03-16-2005 01:10 PM
Burning MP3 CDs (not audio CDs) mlamarche Linux - Newbie 6 11-29-2004 05:09 AM
copying cds lxandrthegr8 Linux - Hardware 0 08-13-2003 04:27 PM
Problem copying audio CDs Wynd Linux - General 2 05-05-2003 08:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration