Wednesday, February 23, 2011

burning an iso to cd using cdrecord

The past few years, as Linux distributions get larger, I've been burning more DVDs than CDs. So my CD burning chops have lapsed. I recently wanted to fire up a Live version of Fedora 14 for some PulseAudio experiments, so I downloaded the ISO which came CD-sized.

*** Update 3/4/2013 ***
I used Brasero on my Fedora 17 and that burned a copy of Clonezilla quite nicely.  Hooray!  Of course, my clone didn't work, but that's another story.
*** end update ***

Troubles
First, for convenience sake, I burned the first F12 Live CD using my Macbook's Disk Utility. But when I plopped the CD into my desktop, the boot never finished and the DVD player kept humming for about 45 minutes. Something definitely wrong there. Testing on a second PC yielded the same result.

Researching Google, I found that other people had similar problems if the application they burned the CD with burned the CD at too fast a rate. This causes the laser in the DVDs to have difficulty reading the source data. Guess I'll have to reburn that bad boy. I tossed that CD out and thought I'd give Linux tools a try. I didn't know this next stage was going to turn into a two-hour extravaganza.

Burning an ISO in Linux is Easy, No?
Starting from scratch on my Fedora 12 box, I popped in a blank CD and good old Nautilus CD/DVD creator pops up:


I dragged and dropped the ISO onto the blank CD:


Selected "Burn contents"


And POOF..nautilus immediately craps out with a buffer error in dmesg:
[ 78.116252] Buffer I/O error on device sr0, logical block 0

OK, so I guess I won't use that. Next, I try Brasero:


Same result. OK. So let me try cdrecord, from the CDR toolset. Things seems to go well and then ba-BANG:
wodim: Cannot fixate disk

What the? Thinking the media was bad, I yanked it out and put a new CD in the drive. Same result. OK, this is getting tiresome. Time to Google:
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=wodim:+Cannot+fixate+disk

Surfing around does not yield much usable information; however, one post hinted at a drive or BIOS issue. I rebooted and checked the BIOS..nothing far from standard there. So I figured I'd run cdrecord again using the -dummy switch that means "do everything the burn will do, except turn off the laser." So I did this, again using another CD. If you're counting, that's three.

I first ran a scanbus:
[sodo@computer ~]$ cdrecord -scanbus
scsibus2:
2,0,0
200) 'HL-DT-ST' 'DVD+-RW GH50N ' 'B103' Removable CD-ROM
2,1,0
201) *
2,2,0
202) *
2,3,0
203) *
2,4,0
204) *
2,5,0
205) *
2,6,0
206) *
2,7,0
207) *


Then I ran cdrecord with the dummy parameter:
[sodo@computer ~]$ cdrecord -v -tao driveropts=burnfree -dummy -dev=2,0,0 Downloads/Fedora-14-i686-Live-Desktop.iso
TOC Type: 1 = CD-ROM

wodim: Operation not permitted.
Warning: Cannot raise RLIMIT_MEMLOCK limits.

scsidev: '2,0,0'

scsibus: 2 target: 0 lun: 0

WARNING: the deprecated pseudo SCSI syntax found as device specification.

Support for that may cease in the future versions of wodim. For now,
the device will be mapped to a block device file where possible.
Run "wodim --devices" for details.
Linux sg driver version: 3.5.27

Wodim version: 1.1.11
Driveropts: 'burnfree'
SCSI buffer size: 64512
Device type : Removable CD-ROM

Version : 5
Response Format: 2

Capabilities :
Vendor_info : 'HL-DT-ST'
Identification : 'DVD+-RW GH50N '

Revision : 'B103'

Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Current: 0x0009 (CD-R)

Profile: 0x0012 (DVD-RAM)

Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0016 (DVD-R/DL layer jump recording)

Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x001A (DVD+RW)
Profile: 0x001B (DVD+R)
Profile: 0x002B (DVD+R/DL)
Profile: 0x0010 (DVD-ROM)
Profile: 0x0009 (CD-R) (current)
Profile: 0x000A (CD-RW) Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)

Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).

Driver flags : MMC-3 SWABAUDIO BURNFREE

Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R

Drive buf size : 1053696 = 1029 KB

Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
Drive DMA Speed: 16168 kB/s 91x CD 11x DVD

FIFO size : 4194304 = 4096 KB

Track 01: data 686 MB

Total size: 787 MB (78:03.12) = 351234 sectors

Lout start: 788 MB (78:05/09) = 351234 sectors
Current Secsize: 2048

ATIP info from disk:

Indicated writing power: 5 Is not unrestricted Is not erasable Disk sub type: Medium Type A, high Beta category (A+) (3) ATIP start of lead in: -11634 (97:26/66)
ATIP start of lead out: 359846 (79:59/71)
Disk type: Short strategy type (Phthalocyanine or similar)

Manuf. index: 3

Manufacturer: CMC Magnetics Corporation

Blocks total: 359846 Blocks current: 359846 Blocks remaining: 8612
Speed set to 8468 KB/s

Starting to write CD/DVD at speed 48.0 in dummy TAO mode for single session.

Last chance to quit, starting dummy write in 0 seconds. Operation starts.

Waiting for reader process to fill input buffer ... input buffer ready.

Starting new track at sector: 0

Track 01: 686 of 686 MB written (fifo 100%) [buf 91%] 49.9x.

Track 01: Total bytes read/written: 719323136/719323136 (351232 sectors).
Writing time: 143.394s

Average write speed 32.7x.
Min drive buffer fill was 87%

Fixating...

WARNING: Some drives don't like fixation in dummy mode.

Fixating time: 22.123s

wodim: fifo had 11331 puts and 11331 gets.

wodim: fifo was 0 times empty and 6563 times full, min fill was 85%


OK! So this time, the "fake" burn worked! That's promising. I then ran the "real" burn (same command without the -dummy parameter) and prayed that it would work:
[sodo@computer ~]$ cdrecord -v -tao driveropts=burnfree -dev=2,0,0 Downloads/Fedora-14-i686-Live-Desktop.iso
...
Starting to write CD/DVD at speed 48.0 in real TAO 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.

Performing OPC...

Starting new track at sector: 0

Track 01: 686 of 686 MB written (fifo 100%) [buf 91%] 49.7x.

Track 01: Total bytes read/written: 719323136/719323136 (351232 sectors).

Writing time: 149.247s

Average write speed 31.4x.
Min drive buffer fill was 87%

Fixating...

Fixating time: 22.165s

wodim: fifo had 11331 puts and 11331 gets.

wodim: fifo was 0 times empty and 6552 times full, min fill was 84%.


Ho HO! It worked!! Fabulous. But why?

It seems I made two changes that could have an effect:
1) I rebooted the computer
2) I used a different disc

My bet is on #2. But if you think differently, let me know. I'm just glad to having a working process for burning ISOs to a CD!

Cheers,
TAG

No comments:

Feel free to drop me a line or ask me a question.