Unforgettability.Net

Coming Up...

Pioneer One
is a new free sci-fi series distrubuted under the Creative Commons. Check it out!

Thicker Than Blood
Give it a read. I liked it!


============================================================
About | March 3, 2009 | March 16, 2009 | April 7, 2009 | May 1, 2009 | May 18, 2009 | July 2, 2009 | July 7, 2009 | September 11, 2009 | January 26, 2010 | March 3, 2010 | April 13, 2010 | May 14, 2010 | June 28th, 2010 | July 5, 2010 | February 2, 2011 | November 14, 2012 | February 6, 2014

What's the deal with CD burning in Linux?

    First, a little background.  Any time you burn a CD/DVD, if you are using Linux (or any other Unix and even sometimes Windows) you are actually using a program called cdrecord which does the work.  Cdrecord is a commandline program, some people use it directly but even if you have a nice pretty GUI application that you like to use it's actually just running cdrecord for you behind the scenes. Well.. you might be using wodim.  That's just an old version of cdrecord under a different name because some people had a hissy fit of some legalise. Hey, there's another cdrecording WTF and I didn't even intend to bring that one up!

Now, here's some ancient history... as I understand it anyway.  Years ago the authors of cdrecord loved their SCSI drives. These cdrecord author(s) loved SCSI so much that they refused to support IDE drives.  For the uninitiated back in the day SCSI was a very expensive kind of CD-ROM drive that was used in big corporate server equipment or by geeks with too much money to spend.  IDE was what the rest of us used.  Well.. that's what SCSI and IDE were in relation to this topic anyway, it's actually more complicated than that.

So.. the cdrecord folks effectively chose to cut off about 90% of it's potential users from ever being able to burn a CD from their Linux of Unix computers.  Now what usually is expected to happen in the open source world when somoebody does something like that?  Either someone creates a fork which serves people's unmet need or somebody just creates a whole new replacement.  This time something strange happened though.  Instead of a new cdrecord which supported everyone's IDE drives someone made a way for an IDE drive to pretend to be a SCSI drive.  This was a kernel module, that means it was an actual part of Linux itself was being changed just so it could trick this one program into thinking people had a different kind of cd-rom drive than they actually did meanwhile making everything more confusing.  Usually users had to go in, recompile Linux themselves to get this hack.  Then they had to edit various config files to make Linux load this hack and to make the rest of the system look for a SCSI drive where it previously knew there was an IDE drive.

This hack was in place for YEARS!  Finally, none other than Linus Toravalds himself got fed up with it, forked cdrecord himself, added real support for IDE CD-ROM drives and marked the kernel hack "deprecated" meaning no one should use it anymore.  And some of us still wonder why Linux didn't take over the desktop?!?!

Then there is k3b.  There are many GUI applications that hide the complexity of cdrecord for you and let you burn CDs in a manner that is not unlike what one would expect on Windows or on a Mac.  The better ones also automate the usage of other tools so they can don't just burn discs but also do things like conert between different audio/video formats (ex: make a music CD from mp3s without having to convert to .wav first). Some have abilities to rip thecontent from CDs and DVDs.  K3b is probably the best, most full featured of these programs.  Unfortunately k3b is part of Kde (the K desktop environment).  That wasn't a problem for me because until recently I used Kde.  But... somewhere along the way the Kde developers decided they didn't want to write software that talks to hardware anymore.  They started using this thing called Hal which goes between the hardware and software.  Even k3b used Hal to find the cd burner(s). This was funny because it still used cdrecord to actually do the burning and cdrecord doesn't use Hal.  Also, cdrecord can scan the computer and report any cd burners that are present.  So what did they need Hal for?  But.. they did.  So, if Hal wasn't working k3b would insist there was no cd burner present and refuse to burn cds even if cdrecord had no problems whatsoever.

This wasn't too bad since if someone was runing Kde they must have Hal working anyway. But then.. one day the Hal project just went away.  And so... Kde quit using it.  But... K3b was so stuck in using it that it took several months before k3b finally eliminated it's ties to Hal. In the meantime, unless you could hack some old version of Hal into running you couldn't burn anything with k3b!

Ok, this was all years ago, why am I ranting about ancient history?  I use Gentoo Linux.  Gentoo is a lot more work than other Linux distributions to set up however it also gives you a lot more choices to control how your system is set up.  Consequently I do not format and start over from scratch very often.  Recently, after several years I decided to do so.  Mainly this was because i had switched from a 32 bit to a 64 bit processor and I decided it was time to switch my software to use all 64 bits. 

So, here I am trying to get a fresh install of Linux working.  Early on I noticed that k3b wasn't finding the CD burner but I decided to worry about that later.  Now I am finally working on it.  Apparently, since the last time I installed another module in Linux has been deprecated, the "sg" module.  The sg module provided a generic way to talk to SCSI devices.  Oh.. yah... IDE and SCSI are both pretty out of date now.  Now we have what are called SATA drives.  But... on the inside they still "talk the same language" as the old SCSI drives did. So.. Linux pretty much treats everything as SCSI now. This is kind of like the old hack but at least it's the normal, default behavior now.  We don't have to go through a bunch of hoops to make it work so it's all good!

But.. cdrecord apparently likes to talk to SATA drives using this sg driver.  So.. now that it's deprecated guess what didn't want to work...   It's like being back in 1998!!!! WTF?!?!?!  Only last time at least it was pretty easy to go to Yahoo or whatever was popular before Google and find people talking about the problem and how to get around it.  This time I found it in the bottom of some blog post many pages down in the Google results.  Really!  No one else is experiencing this?!? I suppose the "easy" distributions like Ubuntu probably take care of it automagically but I know I'm not the last one out there using Gentoo!  Also, people using other advanced distros like Arch and Linux from Scratch must be seeing this stuff! Ok, that post is from 2 years ago.  But... that seems like all the more reason I should expect there to be plenty of easy to find information by now!  At the very least how about something in the Gentoo install guides... you need the sg module for cdrecord to work.  Wait... why does cdrecord require a module that was deprecated at least 2 years ago to function???

So, at least once I found out what it was the fix was easy.  Just load one module.  Now... another change I have made, I decided not to use Kde anymore.  Actually.. I decided to see how I can do without ANY desktop manager.  Instead I am using a combination of Ratpoison and Twm. (I hope to replace Twm soon, possibly with Fvwm).  Like I said, or at least I think I said.  My hardware is kind of old.  Using this simple stuff instead of desktop managers should help it run faster.  Plus.. I like tiling.  And.. I usually just use the "run box" and type what I want to run anyway.  I mostly stopped clicking through menus to open programs years ago.

Now that I have cdrecord finding my drive I decided to try k3b again.  Hmm... no drives found!  WTF!!!  It turns out that while I wasn't looking the KDE team replaced old Hal with their own abstraction layer called Solid.  Now K3b will not find anything without Solid, even though it is really just a front end for cdrecord and cdrecord finds it just fine.  Grrrrrr!  I don't want to install all of KDE!!!  Maybe this is a sign I should just burn CDs and DVDs from the commandline. It kind of fits in with using Ratpoison!  But... I have other things to learn, I don't want to bother with all of cdrecord's options yet.  Plus I like the way those GUI apps can take multi-step things like burning music cds from mp3 files and abstract them down to one action... click burn.  I don't want to convert formats, make an image from those interim files, etc...

So.. now I am compiling Brasero.  Brasero is basically Gnome's version of K3b.  Reviews say it is pretty good but not as good as K3b.  It usually gets rated #2, K3b number 1.  Oh well.. 



0 Comments - Add Comment

============================================================