Ubuntu 9.04: Ripping CDs with grip?

0

I tried to rip a CD tonight, and couldn't figure out how to configure grip - /dev/cdrom doesn't seem to be the mount point for music CDs any more.

How can I configure grip to find CDs?

Update:

/etc/fstab has

/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

But there's nothing visible in /media/cdrom0 (or /media/cdrom, which is a symlink to cdrom0)

There's an icon on the desktop labeled "Audio Disk" and opening it shows the .wav files on the CD. The location is cdda://sr0/, but grip doesn't like that either.

Trying to manually mount /dev/sr0, I get

$ sudo mount -t auto /dev/sr0 foo/
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: you must specify the filesystem type

Update 2:

Tried to change the media handling preferences (From a file browser, Edit->Preferences, Media, CD Audio) to "Do Nothing". CD Still doesn't mount.

Update 3: With an audio CD in the drive:

$ ls -l /dev/ | grep cd
lrwxrwxrwx  1 root   root             3 2009-09-15 22:13 cdrom1 -> sr0
lrwxrwxrwx  1 root   root             3 2009-09-15 22:13 cdrw1 -> sr0
drwxr-xr-x  2 root   root            60 2009-09-15 22:13 pktcdvd
lrwxrwxrwx  1 root   root             3 2009-09-15 22:13 scd0 -> sr0
crw-rw----+ 1 root   cdrom      21,   2 2009-09-15 22:13 sg2
brw-rw----+ 1 root   cdrom      11,   0 2009-09-15 22:13 sr0

chris

Posted 2009-10-01T02:14:19.117

Reputation: 8 607

the desktop icon is via a special handler for "cdda://" URIs. it's not a real mount. – quack quixote – 2009-10-02T12:49:08.433

Answers

2

You don't mount a music CD. No. Never. Don't. They're not files. There's no filesystem. It's not iso9660. Or UDF. It's 16-bit stereo PCM at 44.1kHz, with a teensy bit of data overhead for track breaks, lead-in, lead-out, etc. You can't mount it. Stop trying. No, seriously, stop.

(If you've got a data section on an Audio/Data mixed-mode CD, you'll need to mount that to access the data, but for most audio CDs that's not necessary. Or, ya know, possible.)


Grip needs to know the device of your CD, and if that device is a SCSI device, needs the generic SCSI device as well. So check your /dev entries (/dev/cdrom or /dev/cdrom0 is probably a symlink to the proper device):

> ls -l /dev/cdr*  
lrwxrwxrwx 1 root root 3 2009-09-29 22:11 /dev/cdrom -> hdd  
lrwxrwxrwx 1 root root 3 2009-09-29 22:11 /dev/cdrw -> hdd

In this case, the device is straight IDE, and a generic SCSI device is unneeded; put "/dev/hdd" in the Config -> CD: CDRom Device entry.

Your system probably looks more like this (judging from your /etc/fstab posted above):

> ls -l /dev/cdr*
lrwxrwxrwx 1 root root 3 2009-09-29 22:11 /dev/cdrom0 -> scd0

Although, you did post this:

There's an icon on the desktop labeled "Audio Disk" and opening it shows the .wav files on the CD. The location is cdda://sr0/, but grip doesn't like that either.

So in Grip's configuration, you need to enter both of these:

  1. Config -> CD: CDRom Device: /dev/sr0 (or could be /dev/scd0)
  2. Config -> Rip -> Ripper: Generic SCSI Device: /dev/sg0

Update 1: Given this update on your configuration:

$ ls -l /dev/ | grep cd
lrwxrwxrwx  1 root   root             3 2009-09-15 22:13 cdrom1 -> sr0
lrwxrwxrwx  1 root   root             3 2009-09-15 22:13 cdrw1 -> sr0
drwxr-xr-x  2 root   root            60 2009-09-15 22:13 pktcdvd
lrwxrwxrwx  1 root   root             3 2009-09-15 22:13 scd0 -> sr0
crw-rw----+ 1 root   cdrom      21,   2 2009-09-15 22:13 sg2
brw-rw----+ 1 root   cdrom      11,   0 2009-09-15 22:13 sr0

You need to tell Grip to use

  1. Config -> CD: CDRom Device: /dev/sr0
  2. Config -> Rip -> Ripper: Generic SCSI Device: /dev/sg2

For the CD device, any of these should work. If the Generic SCSI device is not properly set, none of them will work.

  • /dev/cdrom1 (symlink to sr0)
  • /dev/cdrw1 (symlink to sr0)
  • /dev/scd0 (symlink to sr0)

Update 2: this from a Jaunty user posting on the Ubuntu boards about this bug. (Fun related details at this kernel bug if you want them.)

The bug doesn't sound like it matches exactly what you're seeing, but the workaround may work for you. Basically, Grip and the HAL are conflicting over the CD device. A workaround is to disable the HAL:

Disable HAL polling of the sr0 device:

sudo hal-disable-polling --device /dev/sr0

This disables any HAL automounting of CDs and such, so you'll need to re-enable with this:

sudo hal-disable-polling --device /dev/sr0 --enable-polling

If this works, you might try running grip in a script sandwiched between the two above calls:

#!/bin/sh
sudo hal-disable-polling --device /dev/sr0
grip
sudo hal-disable-polling --device /dev/sr0 --enable-polling

quack quixote

Posted 2009-10-01T02:14:19.117

Reputation: 37 382

Except that in prior releases, and other distributions, audio CDs are mounted just fine - grip worked with the defaults. I'm not sure if there's some package I'm missing, or if there was a change made in 9.04, or if using SATA drives changes all this, but I'd like to understand what's changed and how to fix it. – chris – 2009-10-02T23:47:08.583

BTW, I tried both of those config changes, with all the different combinations and permutations of (cdrom = /dev/sr0, scd0, sg2, cdrom, cdrom1 and ripper= /dev/sg0, 1, 2, sr0, 1, 2). "No disk was detected in the drive". – chris – 2009-10-02T23:52:14.487

no they weren't "mounted" -- that's gvfs faking you out. – quack quixote – 2009-10-03T03:49:24.677

cdrom might be any of /dev/cdrom, /dev/cdromN, /dev/srN, /dev/scdN, possibly even /dev/hd[a-z] if you have an IDE drive. ripper will ONLY be /dev/sgN, never /dev/srN. i've updated my answer based on your updated question -- check there. – quack quixote – 2009-10-03T03:52:59.897

from what i can see, 9.04 is treats all IDE/PATA/ATAPI devices as SATA devices by default. this means prior usage of /dev/hd[abcd] gets replaced with a corresponding /dev/s[dr]N, and that's confusing to those of us who are used to IDE instead of SCSI. – quack quixote – 2009-10-03T04:01:34.870

Apparently, I missed one combination - setting it as per your Update 1 works! Thanks very much. – chris – 2009-10-03T13:21:13.303

Glad it worked for you! – quack quixote – 2009-10-03T19:13:07.970

0

Actually, /dev/cdrom is the device pointer, and not the mount point itself. The actual mount point will probably be found under /mnt/cdrom/ or a similar variant.

Try that instead.

caliban

Posted 2009-10-01T02:14:19.117

Reputation: 18 979

0

How about /dev/sr0?


Update: The grip manual tells that you to try /dev/sg0

Johan

Posted 2009-10-01T02:14:19.117

Reputation: 4 827

That looks like the right device, but I can't mount it. – chris – 2009-10-01T21:32:39.147

I'm not sure you need to mount it since it is a music cd, how about update the settings in grip (with this device) and just try to rip? – Johan – 2009-10-02T07:14:31.530

0

Look at /etc/fstab on your machine - that is where your CD drive mount point is configured. I'm running Ubuntu 9.04 (Jaunty), and the drive is configured to mount on /media/cdrom0.

Alternatively, pop a CD/DVD into the drive, wait a few seconds for it to be auto-mounted, and run the mount command to check the mount point.

$ grep cdrom /etc/fstab
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

$ ls -ltr /dev/scd0
lrwxrwxrwx 1 root root 3 2009-09-24 12:38 /dev/scd0 -> sr0

$ mount |grep cdrom
/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,utf8,user=nagul)

user4358

Posted 2009-10-01T02:14:19.117

Reputation:

Nothing seems to get mounted - it's there, because I can see the files from the desktop icon, but I can't figure out how it's mounted.

If I mount a data cd or dvd, it mounts /dev/sr0 on /media/cdrom0 as expected. – chris – 2009-10-01T21:36:47.360

@chris How have you configured grip? Look at this page from the grip project documentation: http://nostatic.org/grip/doc/ar01s04.html#cdconfig. It wants the cdrom device path (not the mount path), which would be /dev/scd0.

– None – 2009-10-01T21:57:37.800

The problem seems to be that an audio CD doesn't actually have a file system on it, so the "regular" mounting options don't apply. grip relies on the cd being mounted. Audio CDs used to mount as a regular files in 8.x, and both the latest fedora and opensuse, so I'm not sure why the difference. – chris – 2009-10-01T22:32:57.277

@chris Hmm. I don't have an audio CD to test this out at the moment. Why not try one of the rippers for now? I see Asunder, RipOff, Ripper X, Audio CD Extractor as other candidates on my Ubuntu system. – None – 2009-10-01T23:21:13.077

Both Asunder and Ripoff are looking for the CD to be mounted at /dev/cdrom0 – chris – 2009-10-02T00:15:31.347

audio cds don't get mounted. – quack quixote – 2009-10-02T12:46:52.820

"automount" of audio/CDDA discs is due to gvfs. it is not a real mount. – quack quixote – 2009-10-02T13:03:05.007

-1

mount: you must specify the filesystem type

You just have to set the filesystem type, since he seems not to be sure what he's tying to mount:

sudo mount -t iso9660 -o ro /dev/sr0 foo/

Bobby

Posted 2009-10-01T02:14:19.117

Reputation: 8 534

That would be a data cd, and NOT a audio cd... – Johan – 2009-10-02T20:41:54.077

I tried that, it wouldn't mount since there's not really a file system on an audio CD. – chris – 2009-10-02T23:40:00.847