Wednesday, June 23, 2004

Duplicating Data CDs with FreeBSD

I needed to become familiar with burning CDs on FreeBSD to support plans for live CD-based systems. I recently bought a Plextor PX-708UF DVD+-R/RW CD-R/RW drive and an Adaptec DuoConnect PC Card Adapter. I already reported on how cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se appear to FreeBSD.

For testing purposes and to create my own media set, I duplicated cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 three CD-ROMs released as Fedora Core 2. To convert cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CD-ROM into a .iso file for burning, I used this syntax:

dd if=/dev/cd0 of=/var/iso/fedora_core_disc3.iso bs=2048

Here's a few notes on this command. /dev/cd0 is how my Plextor drive appears to FreeBSD. My laptop's native CD/DVD reader is /dev/acd0. I could not get this command to work without including 'bs=2048'. I learned why after reading a FreeBSD Diary entry:

"Data on CDs is written in blocks of 2 kB. By default dd reads 512
bytes at a time, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CD driver doesn't support this. It would
work if you use bs=2k."

When I tried dd without cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bs=2048 argument, I got this error:

dd: /dev/acd0: Invalid argument

I also tried acquiring cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 .iso using my native CD/DVD reader. I got this error, although cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 .iso creation seemed to work ok:

acd0: FAILURE - READ_BIG status=51
sensekey=ILLEGAL REQUEST error=1

Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs have reported this issue, and some suggested editing /boot/loader.conf accordingly:

hw.ata.atapi_dma=0

This didn't fix cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 issue for me, so I acquired cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 .iso using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Plextor. It produced no visible errors.

When cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 process was done I wanted to check if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 resulting .iso matched cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CD from which it was derived. From Kris Kennaway I learned this command to get a MD5 hash of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 original CD:

dd if=/dev/cd0 bs=2048 | md5

I cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n compared that output with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 result of running md5 on this .iso. If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y matched, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 copy was good. This was cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 case. However, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 MD5 hashes did not match cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 versions available at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Fedora site. As I trust cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 source of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se CDs, I assume cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 difference is a result of taking an original Red Hat .iso, burning it to CD, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n deriving an image of that CD in .iso format. Perhaps cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 block sizes did not match up exactly?

To burn cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 new .iso to CD-R, I had to install cdrecord, found in sysutils/cdrecord. The first task was to ensure cdrecord could find my drive:

# cdrecord -scanbus
Cdrecord 2.00.3 (i386-unknown-freebsd5.2.1) Copyright (C) 1995-2002 Jorg Schilling
Using libscg version 'schily-0.7'
scsibus0:
0,0,0 0) 'PLEXTOR ' 'DVDR PX-708A ' '1.06' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *

Once I knew where to find cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 drive, I checked what options it supported:

# cdrecord -v dev=0,0,0 -checkdrive driveropts=help
Cdrecord 2.00.3 (i386-unknown-freebsd5.2.1) Copyright (C) 1995-2002 Jorg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Using libscg version 'schily-0.7'
Driveropts: 'help'
atapi: 0
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'PLEXTOR '
Identifikation : 'DVDR PX-708A '
Revision : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support code.
cdrecord: If you need DVD-R/DVD-RW support, ask cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Author for cdrecord-ProDVD.
Driver options:
burnfree Prepare writer to use BURN-Free technology
noburnfree Disable using BURN-Free technology
varirec=val Set VariRec Laserpower to -2, -1, 0, 1, 2
Only works for audio and if speed is set to 4

Now that I knew what options to use, I burned cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 .iso to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CD-R. You'll see I enabled 'burnfree,' defined in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 man page as "Turn cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 support for Buffer Underrun Free writing on."

# cdrecord -v dev=0,0,0 speed=8 driveropts=burnfree -eject
-data /var/iso/fedora_core_2_disc3.iso
Cdrecord 2.00.3 (i386-unknown-freebsd5.2.1) Copyright (C) 1995-2002 Jorg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Using libscg version 'schily-0.7'
Driveropts: 'burnfree'
atapi: 0
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'PLEXTOR '
Identifikation : 'DVDR PX-708A '
Revision : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support code.
cdrecord: If you need DVD-R/DVD-RW support, ask cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Author for cdrecord-ProDVD.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE VARIREC
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1190112 = 1162 KB
FIFO size : 4194304 = 4096 KB
Track 01: data 637 MB
otal size: 732 MB (72:35.06) = 326630 sectors
Lout start: 732 MB (72:37/05) = 326630 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: 33216
Starting to write CD/DVD at speed 8 in real TAO mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
BURN-Free is OFF.
Turning BURN-Free on
Performing OPC...
Starting new track at sector: 0
Track 01: 0 of 637 MB written.
...edited...
Track 01: Total bytes read/written: 668934144/668934144 (326628 sectors).
Writing time: 552.030s
Average write speed 8.0x.
Min drive buffer fill was 99%
Fixating...
Fixating time: 32.601s
cdrecord: fifo had 10537 puts and 10537 gets.
cdrecord: fifo was 0 times empty and 10463 times full, min fill was 90%.

At some point in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 future I'll use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 drive to create DVDs, and report how that turned out as well.

The fact that I burned cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se CDs isn't rocket science, but I wanted to show cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 gear I used in case ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r people are looking to buy CD/DVD burners for FreeBSD.

I used a few ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r resources when learning how to burn CDs, including cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 FreeBSD Handbook and CD Burning from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Command Line.

1 comment:

Anonymous said...

Thanks .. cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bs=2048 was helpful as I'm moving from linux to freebsd ..