Kamis, 24 Juni 2004

Burning DVDs in FreeBSD

Yesterday I reported my results burning CDs with FreeBSD. This morning I tried creating a DVD of the Fedora Core 2 distribution. After I downloaded the 4.1 GB .iso from a mirror, I used MD5 to verify the checksum matched. Since the .iso was ready to burn, I set up my Plextor burner.

First I checked the media, which was Memorex 4X DVD-R 4.7GB (pictured at left, purchased at buy.com). I had already installed dvd+rw-tools, available in the ports tree as sysutils/dvd+rw-tools. Using the dvd+rw-mediainfo command, I checked the DVD in the burner:


# dvd+rw-mediainfo /dev/cd0
INQUIRY: [PLEXTOR ][DVDR PX-708A ][1.06]
GET [CURRENT] CONFIGURATION:
Mounted Media: 11h, DVD-R Sequential
Media ID: ProdiscS03
Current Write Speed: 4.0x1385=5540KB/s
Write Speed #0: 4.0x1385=5540KB/s
Write Speed #1: 2.0x1385=2770KB/s
Write Speed #2: 1.0x1385=1385KB/s
GET [CURRENT] PERFORMANCE:
Write Performance: 4.0x1385=5540KB/s@[0 -> 2294911]
Speed Descriptor#0: 02/2298495 R@8.0x1385=11080KB/s W@4.0x1385=5540KB/s
Speed Descriptor#1: 02/2298495 R@8.0x1385=11080KB/s W@2.0x1385=2770KB/s
Speed Descriptor#2: 02/2298495 R@8.0x1385=11080KB/s W@1.0x1385=1385KB/s
READ DVD STRUCTURE[#10h]:
Media Book Type: 25h, DVD-R book [revision 5]
Legacy lead-out at: 2298496*2KB=4707319808
READ DVD STRUCTURE[#0h]:
Media Book Type: 25h, DVD-R book [revision 5]
Last border-out at: 0*2KB=0
READ DISC INFORMATION:
Disc status: blank
Number of Sessions: 1
State of Last Session: empty
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: invisible incremental
Track Start Address: 0*2KB
Next Writable Address: 0*2KB
Free Blocks: 2297888*2KB
Track Size: 2297888*2KB

Everything looked ready to go, so I proceeded according to the directions in the FreeBSD Handbook:

# growisofs -dvd-compat -Z /dev/cd0=FC2-i386-DVD.iso
Executing 'builtin_dd if=FC2-i386-DVD.iso of=/dev/pass0 obs=32k seek=0'
/dev/pass0: "Current Write Speed" is 4.1x1385KBps.
0/4370640896 ( 0.0%) @0x, remaining ??:??
0/4370640896 ( 0.0%) @0x, remaining ??:??
8421376/4370640896 ( 0.2%) @1.8x, remaining 103:35
27066368/4370640896 ( 0.6%) @3.9x, remaining 40:07
45744128/4370640896 ( 1.0%) @3.9x, remaining 29:56
...edited...
4336517120/4370640896 (99.2%) @3.9x, remaining 0:06
4355194880/4370640896 (99.6%) @3.9x, remaining 0:02
builtin_dd: 2134112*2KB out @ average 3.9x1385KBps
/dev/pass0: flushing cache
/dev/pass0: updating RMA
/dev/pass0: closing disc

When I was done, I checked the media again:

# dvd+rw-mediainfo /dev/cd0
INQUIRY: [PLEXTOR ][DVDR PX-708A ][1.06]
GET [CURRENT] CONFIGURATION:
Mounted Media: 11h, DVD-R Sequential
Media ID: ProdiscS03
Current Write Speed: 4.0x1385=5540KB/s
Write Speed #0: 4.0x1385=5540KB/s
Write Speed #1: 2.0x1385=2770KB/s
Write Speed #2: 1.0x1385=1385KB/s
GET [CURRENT] PERFORMANCE:
Write Performance: 4.0x1385=5540KB/s@[0 -> 2294911]
Speed Descriptor#0: 02/2298495 R@8.0x1385=11080KB/s W@4.0x1385=5540KB/s
Speed Descriptor#1: 02/2298495 R@8.0x1385=11080KB/s W@2.0x1385=2770KB/s
Speed Descriptor#2: 02/2298495 R@8.0x1385=11080KB/s W@1.0x1385=1385KB/s
READ DVD STRUCTURE[#10h]:
Media Book Type: 25h, DVD-R book [revision 5]
Legacy lead-out at: 2298496*2KB=4707319808
READ DVD STRUCTURE[#0h]:
Media Book Type: 25h, DVD-R book [revision 5]
Last border-out at: 2134112*2KB=4370661376
READ DISC INFORMATION:
Disc status: complete
Number of Sessions: 1
State of Last Session: complete
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: complete incremental
Track Start Address: 0*2KB
Free Blocks: 0*2KB
Track Size: 2134112*2KB
Last Recorded Address: 2134111*2KB
FABRICATED TOC:
Track#1 : 14@0
Track#AA : 14@2134112
Multi-session Info: #1@0

I then mounted the DVD:

# mount -t cd9660 /dev/cd0 /cdrom
# ls /cdrom
.discinfo RPM-GPG-KEY-fedora
Fedora RPM-GPG-KEY-fedora-rawhide
GPL RPM-GPG-KEY-fedora-test
README-Accessibility RPM-GPG-KEY-rawhide
README-en SRPMS
README-en.html TRANS.TBL
RELEASE-NOTES-en autorun
RELEASE-NOTES-en.html eula.txt
RPM-GPG-KEY images
RPM-GPG-KEY-beta isolinux

It worked. I also mounted the DVD as /dev/acd0 on my ThinkPad, which appears to dmesg as the following:

acd0: DVDROM at ata1-master UDMA33

I got this result by having 'hw.ata.atapi_dma=1' set in /boot/loader.conf. Without that setting, here is how the same drive appeared in dmesg:

acd0: DVDROM at ata1-master PIO4

For reference, here is atacontrol output for the laptop:

$ sudo atacontrol list
ATA channel 0:
Master: ad0 ATA/ATAPI rev 5
Slave: no device present
ATA channel 1:
Master: acd0 ATA/ATAPI rev 0
Slave: no device present

Having ATAPI DMA enabled helps with performance, according to this thread by someone having trouble burning with the same device I have. I believe because that posted is using an internal Plextor connected via ATA, he is in a different situation. I use a FireWire adapter on my laptop and desktop to connect my external Plextor drive.

0 komentar:

Posting Komentar