Cannot properly mount music CDs under Xubuntu Linux

I have three systems running Xubuntu:

  • Dell E5440 running 18.04
  • ThinkPad T420 running 20.04
  • Dell PowerEdge T110 (headless server) running 20.04

I am trying to mount the optical drive and I cannot do it properly. This is what I am doing:

  1. $ sudo mkdir /mnt/optical
  2. insert the optical disc
  3. $ sudo mount /dev/sr0 /mnt/optical

Everytime I do this on all three of these systems, I always get this exact same error:

mount: /mnt/cdrom: can't read superblock on /dev/sr0.

However, when I am on one of the two laptops (E5440 or T420), if I put the disc in the drive, the "unmounted" icon shows up on the desktop, and "Removable Volume Not mounted yet" is shown in a tool-tip.

When I double-click the icon, the file browser opens and shows me the contents of the CD with no problems.

If I right-click within that file browser window and do "Open Terminal Here" and execute a pwd, this is what I see:

/run/user/1000/gvfs/cdda\:host\=sr0 /mnt/cdrom

If I execute $ sudo dmesg, I see many of these types of errors:

[1475778.512051] blk_update_request: I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[1475778.512056] Buffer I/O error on dev sr0, logical block 0, async page read
[1475778.551995] Buffer I/O error on dev sr0, logical block 0, async page read
[1475778.604080] Buffer I/O error on dev sr0, logical block 0, async page read

This happens for every CD I put into all three of these machines.

So, (1) I know the drives are not bad, and (2) I know the discs are not bad, I just cannot figure out what I am doing incorrectly.


EDIT 1:

As it turns out, the problem I am having is JUST for CDs, and not DVDS.

On the E5440 and T420, the DVDs mount properly under:

/media/username.

I can successfully mount a DVD on the headless T110 using"

sudo mount /dev/sr0 /mnt/optical

EDIT 2:

A requested directory listing of the CDs when mounted:

username@HOSTNAME:/run/user/1000/gvfs/cdda:host=sr0$
total 434M
-r-------- 1 username username 42M Dec 31  1969 Track 10.wav
-r-------- 1 username username 30M Dec 31  1969 Track 11.wav
-r-------- 1 username username 39M Dec 31  1969 Track 12.wav
-r-------- 1 username username 40M Dec 31  1969 Track 13.wav
-r-------- 1 username username 27M Dec 31  1969 Track 1.wav
-r-------- 1 username username 29M Dec 31  1969 Track 2.wav
-r-------- 1 username username 39M Dec 31  1969 Track 3.wav
-r-------- 1 username username 29M Dec 31  1969 Track 4.wav
-r-------- 1 username username 45M Dec 31  1969 Track 5.wav
-r-------- 1 username username 27M Dec 31  1969 Track 6.wav
-r-------- 1 username username 30M Dec 31  1969 Track 7.wav
-r-------- 1 username username 30M Dec 31  1969 Track 8.wav
-r-------- 1 username username 34M Dec 31  1969 Track 9.wav
username@HOSTNAME:/run/user/1000/gvfs/cdda:host=sr0$

Based on what GVFS gives you, it seems that those CDs are not "data" CDs in the first place – they're "audio" CDs which do not have any mountable filesystem. They only contain several individual tracks of raw PCM audio, but no data track that mount normally expects.

When you mount such a disc through GNOME, it is actually the GVFS userspace layer that emulates a file view, presenting each audio track as a PCM .wav file. (It uses libcdio to understand the audio CD structure.)

The same thing can be done through CLI using gio mount -b /dev/sr0, which gives you GVFS mounts identical to those of Nautilus or Thunar.

However, you won't be able to mount the CD at kernel level because there's nothing really mountable in it.

Music players and CD rippers typically access audio CD tracks directly through the /dev/sr0 device (which also allows them to see the "subchannel" information such as CD-Text track titles), without the need to mount the CD in any way.

So instead of going through GVFS, one would typically use cdparanoia -B or cdda2wav or Sound Juicer (if that's still a thing) to rip the audio tracks to .wav files for encoding.

(FFmpeg can also do so using -f libcdio, though it seems it doesn't know how to split tracks.)