
A lot of folks out there seem to knock freebsd as a workstation, sure it's a tight server OS,
but you can't do much with it for fun right ? hell yeah you can :)
One of the main things most people don't like about moving from windows is the lack of software for doing
stuff for them, in this case, burning a cd. There is also a large contingent that are scared off by the whole
'scsi' thing and atapi/ide/scsi emulation required for most opensource burner softwares. well, for those folks, here
is my adventure with my LITE-ON IDE cdburner and freebsd.
First, my setup :
Dual AMD 1800+'s on a Tyan 260 MB.
Adaptec 39120 SCSI Controller
ATI Radeon 7500
2 SCSI HD's, one 18G 10k rpm and on 36G 10k rpm
1 Memorex DVD+R/RW
1 LITE-ON CD-RW
First off, I tried with a freebsd command line tool, "burncd" . I wasn't contented using this as a replacement for Nero,
but wanted to see if it worked nonetheless.
I grabbed a small ISO (smoothwall beta 2) to test it out.
I put a blank cd in the LITE-ON and typed the folling from an xterm :
burncd -s 12 -f /dev/acd1c data /home/decker/smoothwall-2.0-bullet.iso fixate
It showed a lot of promising information and in under a minute it was done (~20mb iso heh).
I mounted the new cd and verified it was done right, which it was. Score one for the default freebsd IDE
cd burner :)
Now the fun begins.
Since I built this box and started using scsi hardware, IDE gets one my nerves. It's ... clumsy.
Even if I don't have a scsi cd-rw drive, I still want to use the majority of cd-rw software available,
and this requires they be scsi (normally).
So, let's see..
: camcontrol devlist
at scbus1 target 0 lun 0 (pass0,da0)
at scbus1 target 2 lun 0 (pass1,da1)
That's all that's there, my two scsi harddrives. welp, that's not gonna cut it.
After about 10 minutes on google I had gathered
all the info I needed.
I had already rebuilt my kernel to get my SoundBlaster Live 5.1 supported (just needed the pcm device),
plus I also needed the ipfilter (thank you darren reed) support. Now I had to rebuild it again.
I found a chunk of devices in LINT that I did not have in my current kernel, so I cut and pasted the block of them to
the bottom of my new kernel (YINYANG).
device wcd
device wdc0 at isa? port IO_WD1 irq 14
device wd0 at wdc0 drive 0
device wd1 at wdc0 drive 1
device wdc1 at isa? port IO_WD2 irq 15
device wd2 at wdc1 drive 0
device wd3 at wdc1 drive 1
Now I did the normal `make buildkernel KERNCONF=YINGYANG ; make installkernel KERNCONF=YINYANG` thing.
When I rebooted I initially thought something was wrong, it appeared to be hung on the new wcd0 device when booting.
I decided to go get a glass of sweat ice tea and think about it. When I came back it was sitting at the login propmt, yay.
I logged in and started X again, then checked `dmesg`, I found a lot of new stuff, here is the important stuff :
wdc0 at port 0x1f0-0x1f7 irq 14 on isa0
wdc0: unit 0 (atapi): , removable, accel, dma, iordis
wcd0: drive speed 5628 - 5512KB/sec, 2048KB cache
wcd0: supported read types: CD-R, CD-RW, CD-DA, packet track
wcd0: supported write types: CD-R, CD-RW, test write
wcd0: Audio: play, 15 volume levels
wcd0: Mechanism: ejectable tray
wcd0: Medium: 120mm data/audio disc loaded, unlocked
wdc0: driver is using old-style compatability shims
wdc1 at port 0x170-0x177 irq 15 on isa0
wdc1: unit 0 (atapi): , removable, accel, dma, iordy
wcd1: drive speed 6875KB/sec, 2048KB cache
wcd1: supported read types: CD-R, CD-RW, CD-DA, packet track
wcd1: supported write types: CD-R, CD-RW, test write
wcd1: Audio: play, 255 volume levels
wcd1: Mechanism: ejectable tray
wcd1: Medium: no/blank disc inside, unlocked
wdc1: driver is using old-style compatability shims
acd0: CD-RW at ata0-master PIO4
acd1: CD-RW at ata1-master PIO4
cd1 at ata1 bus 0 target 0 lun 0
cd1: Removable CD-ROM SCSI-0 device
cd1: 16.000MB/s transfers
cd1: Attempt to query device size failed: NOT READY, Medium not present
cd0 at ata0 bus 0 target 0 lun 0
cd0: Removable CD-ROM SCSI-0 device
cd0: 16.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
so cool, I've now got new info about the IDE cd drives from their scsi emulation drivers, and now :
: camcontrol devlist
at scbus1 target 0 lun 0 (pass0,da0)
at scbus1 target 2 lun 0 (pass1,da1)
at scbus2 target 0 lun 0 (pass2,cd0)
at scbus3 target 0 lun 0 (pass3,cd1)
and that is neatest thing I've seen all week.
Thanks to the wonderful ports tree, I go find a cdburner, a quick grep through /usr/ports/INDEX and I found
one that looked good, "xcdroast". The build went normally and in about two minutes it's was all ready to go.
I ran it as root from an xterm with no arguments, it opened right up.
I looked through the setup stuff, set the drive speeds to reasonable levels and selected the LITE-ON to do all the work,
the DVD-R/RW is a whole other beast to be tamed another time.
Once I got the settings to what looked good, I put in my Nick Drake cd (Bryter Layter, killer album, buy it) and went to
rip the tracks. First I checked out the CD/Image info screen, which brought up the tracks on the cd.

So far so good. I saw the cddb button and figured what the hell and clicked it. A few seconds later, voila, the album was found
and the songs were all named :)

Now it was time to read the tracks to the harddrive. The first time I tried this I got an error.

In `dmesg` I saw the following :
cam_periph_mapmem: attempt to map 65568 bytes, which is greater than DFLTPHYS(65536)
That means *nada* to me, obviously something with the cam control, a peripheral, memory mapping and such, but the real technical cause
is beyond me.
I went back to the setup and looked at an option I had checked off eariler, about enabling paranoia code; I unchecked it (the default)
and went back to see if it would read. Sure enough, no problems at all this time.

I poked around at some the buttons in the master tracks section but realised I didn't really need to.
I went straight to the write tracks screen, selected all the tracks I just ripped and let them burn.

Within a few minutes the write was done and I had a nice backup of my Nick Drake CD, only this one had CD-Text
that scrolls across my cd player in my car. that's good stuff.

The xcdroast program is quite easy to use (I didn't even have to read the man page). I did read it after
my initial tinkering and found that to see what it's doing, to run it with the arguement -d1 to turn
on debugging, this is kinda cool to watch even if you aren't debugging :)
Now I never have to load windows again to have some janky ass cd ripper / burner lock up my box.
If anyone has any questions (how could you, look at those pretty pictures ?!) or comments, feel free to
send them to decker(at)n3t.net .
|