LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-01-2003, 05:30 PM   #1
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Rep: Reputation: 30
copy a cd from the command line


how do i copy a cd from the command line i know how to burn a iso but would like to copy a cd.

cdrecord dev=/dev/scd1 speed=4 filename.iso

thanks,
AD
 
Old 02-01-2003, 05:36 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Code:
dd if=/dev/cdrom | cdrecord options -

Last edited by acid_kewpie; 02-01-2003 at 05:55 PM.
 
Old 02-01-2003, 05:52 PM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Or a script..

http://jetblackz.freeservers.com/Installingcdcopy.html

Cool
 
Old 02-01-2003, 06:12 PM   #4
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
maybe i worded this wrong. im looking to take /hda and copy it directly to /dev/scd0. the same as if i was in nero and used the copy cd. im just making a duplicated cd.

here is my best guess
cdrecord dev=/dev/hda speed=4 dev=/dev/scd0

or would that be the other way around
cdrecord dev=/dev/scd0 speed=4 dev=/dev/hda

i did look through the cdrecord options but i am a newbie and its over my head.

thanks, AD
 
Old 02-01-2003, 06:17 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
erm.. hello..? i just told you how to do it...
 
Old 02-01-2003, 06:17 PM   #6
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yeah, except /dev/hda sure sounds like an odd cdrom device... But yeah, what chris and I both said will work.

First use cdrecord -scanbus

This will show you the bus that cdrecord will use for the dev part then:
dd if=/dev/hda | cdrecord dev=0,0,0 speed=4 -v -eject -

Replacing dev=0,0,0 with whatever scanbus tells you your cdburner is on.

This will make an exact copy of /dev/hda (assuming this is a CDROM device with a cd in it) and burn it to a cd in your burner.

The other option is that script I linked you to. It too will burn a copy for you, using different methods, but still works.

Cool
 
Old 02-01-2003, 07:52 PM   #7
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
Edited out part here

thanks for the help you 2 but it didnt work i checked my hardware browser and it does say that my cd rom is on /dev/hda here is the results

[joe@dhcp-395-6 joe]$ su
Password:
[root@dhcp-395-6 joe]# man dd
[root@dhcp-395-6 joe]# man cdrecord
[root@dhcp-395-6 joe]# dd if=/dev/hda | cdrecord dev=0,0,0 speed=4 -v -eject -
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jrg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'LITE-ON '
Identifikation : 'LTR-48125W '
Revision : 'VS08'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : SWABAUDIO
Drive buf size : 1422080 = 1388 KB
FIFO size : 4194304 = 4096 KB
Track 01: data unknown length
Total size: 0 MB (00:00.00) = 0 sectors
Lout start: 0 MB (00:02/00) = 0 sectors
dd: reading `/dev/hda': Input/output error
0+0 records in
0+0 records out
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 5
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, low Beta category (A-) (2)
ATIP start of lead in: -11634 (97:26/66)
ATIP start of lead out: 359849 (79:59/74)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
cdrecord: WARNING: Track size unknown. Data may not fit on disk.
Starting to write CD/DVD at speed 4 in write mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
cdrecord: Premature EOF on stdin.
cdrecord: Input buffer error, aborting.
cdrecord: fifo had 1 puts and 0 gets.
cdrecord: fifo was 0 times empty and 0 times full, min fill was 100%.
[root@dhcp-395-6 joe]#

Last edited by trickykid; 02-03-2003 at 01:12 PM.
 
Old 02-01-2003, 08:05 PM   #8
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
First thing... Don't bash on people. If someone is rude to you, ignore them or report them, do not retort. Second, he's a mod, and I really think that to be the last person you should personally attack. If you have a problem with one, report them to Jeremy if you cannot resolve it with the person alone.
Second... Whatever your plans on linux are is fine. This is a help site, and that's what we do. If you don't like the free help you get, there are alternatives. Mandrake has an option for paid help, and I believe redhat does as well.

That said....

You will want to determine the cdrom device. Easiest way for is it:
eject /dev/hda
eject /dev/hdb
eject /dev/hdc
eject /dev/hdd
And whichever one ejects your CDROM then that's your cdrom device. Now, you will want to make sure have the correct device chosesn for cdrecord from the scanbus.

Ok, now with that, the cdrecord command above will work, but you will probably want to go a bit further with something like:
dd if=/dev/hdX conv=noerror | cdrecord (options) -

The - means to take the "dd" input from the pipe and burn it. The reason I suggest using the conv=noerror is for errors on the disc to be ignored. I use this on older ROM drives that don't function so well.

You may also consider slowing down the speed of the write.
HTH

Cool
 
Old 02-01-2003, 08:12 PM   #9
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
i think you got me all wrong. i am very appriciative like i said and i have no problem with acid_kewpie i think he is cool and very smart and yes i do know he is a mod. it was not a personel attack i repeat the eagle has not landed. do not blow this out of proportion please. please go back and read what i have wrote very carefully.

from a humble newbie linux student,
Ad

sorry no time for spell check just time enough to duck
 
Old 02-01-2003, 08:13 PM   #10
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
actually this is the second time i have ducked today
 
Old 02-01-2003, 08:20 PM   #11
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
i know acid_kewpie another wannabe trying to run linux on his desktop at home just so he can say hes on the bandwagon with everyone else

Ok, I guess I am mis-inerpreting this line then... Do you mean:

i know, acid_kewpie, I'm looking like another wannabe trying to run linux on his desktop at home just so he can say hes on the bandwagon with everyone else

?

Because it really looks to me like you are saying Chris is on a bandwagon, and is just another wannabe.



If I am in the wrong, I appologize for the upper portion of my response...

Either way, let's get this cdrecord problem fixed!

Have you given that script I pointed you to a try? It sometimes works a little better for those without a very decent hardware arrangement. It's a little more safe. I first creates the iso, then it burns the iso from the HD. Less chance of buffer problems and things at that point. If that's what you want to do, you could:
dd if=/dev/cdrom of=/home/files/cd.iso conv=noerror

Then you will have the iso on /home/files/cd.iso And from there can burn it with:
cdrecord dev=x,x,x speed=4 -v -eject /home/files/cd.iso

Which might be slightly safer, again, if you have less than optimal hardware.

Cool
 
Old 02-01-2003, 08:28 PM   #12
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
i always sucked with english yes you had me wrong all the way i never attack people like that i was refering to me as the wannabe at home.

ahhh, i feel better now dont scare me like that

im going to give the iso thing a try

peace man,
AD
 
Old 02-01-2003, 08:41 PM   #13
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Good luck, and again, sorry for the misunderstanding. Ever see A Few Good Men? Remember the part where Jack Nicholson asks Tom Cruise about his dad and he says his dad has been dead for 7 years? And then Jack Nicholson replies with (well I won't post it cause it cusses); anyway, that's how I feel now

Let us know how things go.

Cool
 
Old 02-01-2003, 08:44 PM   #14
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
i have been sitting here for the last 8 hours strait its time to call it quits ill resume tomarrow thanks for all the help.


dd: reading `/dev/hda': input/output error
0+0 records in
0+0 records out

over and over again it reapeats these lines

but it does create a iso file its just empty
also the drive isnt speeding up it is a dvd rom maybe thats why it was assigned /dev/hda i tested the eject /dev/hda and it worked. i guess i could just use my cd burner to do this iso rip.
 
Old 02-01-2003, 08:49 PM   #15
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yeah, that's probably not your cdrom device. I really doubt that your primary master drive is going to be /dev/hda

Check out whether it's a symlink or what:
ls -l /dev/hda

Also, if you know, can you tell us which bus it's on?
Primary Master = /dev/hda
Primary Slave = /dev/hdb
Secondary Master = /dev/hdc
Secondary Slave = /dev/hdd
If it's on a controller, or a RAID card, tell us that as well.

Just whenever, if you are off til tomorrow, I'll be back then too, and so will many others who can help

Cool
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy-paste on command line? jameshao Linux - General 3 02-02-2009 01:14 AM
how to copy-past on command line? jameshao Linux - Newbie 5 02-01-2009 03:55 PM
Copy text from command line Duukkis Linux - General 8 08-25-2003 01:29 PM
command line CDR / copy file rioguia Linux - Newbie 4 10-05-2002 04:52 AM
Copy Paste under command line? Stingreen Linux - General 7 02-10-2002 06:46 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration