cdrdao (WAS Re: [CLUE-Tech] ISO images from Audio CD's?)

Jed S. Baer thag at frii.com
Mon Dec 9 14:08:19 MST 2002


On Mon, 9 Dec 2002 13:06:39 -0700
"Timothy C. Klein" <teece at silverklein.net> wrote:

> But since my boot drive is an IDE, it can not be a module.  So if I boot
> with the DVD as IDE, but want it to be temporarily SCSI, I can just load
> the IDE-SCSI module and then unload it?  I thought I had tried that, but
> the IDE wouldn't let go of the drive.

$ ls /lib/modules/2.4.7-10custom/kernel/drivers/ide/
ide-cd.o

The module for IDE cdrom is a different driver than that for "normal" IDE
hard drives.

$ cdparanoia -B 1-
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty at xiph.org> and Xiphophorus

Report bugs to paranoia at xiph.org
http://www.xiph.org/paranoia/


Ripping from sector       0 (track  1 [0:00.00])
          to sector  277656 (track 26 [2:13.06])

outputting to track01.cdda.wav

# lsmod
Module                  Size  Used by
ide-cd                 26560   0  (autoclean)
cdrom                  28448   0  (autoclean) [ide-cd]

So, then, after ripping I can burn, by unloading these:

rmmod ide-cd
rmmod cdrom

Then, when I fire up cdrecord, the generic SCSI modules get loaded:

# lsmod
Module                  Size  Used by
ide-scsi                7712   0  (autoclean)
sg                     23952   0  (autoclean)
scsi_mod               82704   2  (autoclean) [ide-scsi sg]

However, reading from one and writing to another?

Well, a little experimentation got me to the point where I could rip using
/dev/sg0. Oddly, even though Jorg Schilling wrote both cdparanoia, and the
some of the generic scsi stuff, cdparanoia won't look to see if any of the
sg devices point to a cdrom. What I had to do was delink /dev/cdrom from
/dev/hdd, and relink it to /dev/sg0. Now cdparanoina functions using the
/dev/sg0 generic scsi device. I think the answer must lie in /dev/hdd
being "configured" as an IDE.

A while back, I found a reference for older versions of RH (or perhaps the
2.2 kernel?) mentioning that you can prevent IDE from grabbing a drive by
placing the line "options ide-cd ignore=hdd" in to /etc/modules.conf. I
haven't played around with that, but the article allowed as how that would
let you load either the IDE or SCSI modules for cdrom devices. Getting
this to work with clean autoloading would be an interesting project, as
I'm guessing it might require some creating use of modules.conf
directives. I'm thinking maybe some "char-major" device line to autoload
the IDE stuff, and maybe some directives (are there such?) for unloading
the SCSI if the IDE is being used for a particular drive.

In my case, it's a small enough issue that I just manually unload the
IDE-cd modules when I need the SCSI ones, and vice-versa. But it would be
cool to get that all nicely automated.

I'm guessing that by careful use of modules.conf, this could all get to
the point where it's seamless, and/or the modules grab only the intended
drive (in the case of a machine with 2 cdrom drives, or a cd-rw and a
DVD).

I'll note that this is an area where "linux for my mother" fails, I think.
Maybe there are newer versions of grip or xcdroast that do a better job,
but even older Windoze boxes come with "duplicate a CD" by pushbutton. The
user hasn't a clue whether it's being accessed by a SCSI emulation, or the
IDE drivers support write operations.

HTH,
jed

p.s. Some while back, someone posted a great recipe for having cdparanoia
produce a "byte-for-byte" image of a CD. I has asked about duplicating a
CD, but running out of space when doing it on a track by track basis. I
seem to have misplaced this, and looking through the archives, I haven't
found it. If that person remembers the incantations, I'd appreciate a
repost.

-- 
We're frogs who are getting boiled in a pot full of single-character
morphemes, and we don't notice. - Larry Wall; Perl6, Apocalypse 5



More information about the clue-tech mailing list