Mount CD/DVD Filesystem on Qubes

A reader brought to my attention that the About page link to my SysAdmin Magazine (SAMag) articles is only a bibliographic list and not to the articles themselves. That’s true. The link was intended as reference, not to the articles themselves, although the articles were online when I checked a few years ago. Prompted to check again, I discovered that the link to the articles is no longer online. Fortunately, I have a CD with all the articles from every 1992-1995 issue. Also, I maintained the rights to my¬†articles, so I can do what I want with them.

Newer laptop systems are selling without CD/DVD/Blu-Ray drives unless ordered that way. They’re going thinner, lighter, and that drive adds a bit of weight that few will tolerate. Using a USB portable drive can solve the problem if you want to watch your DVDs or Blu-Rays on your portable system. But, one of these days — soon, I hope — I’m going to get a new system and it probably won’t have a CD/DVD/Blu-Ray drive. I may or may not buy an external drive to attach with USB at that future time. But right now, I’d rather have a copy of all those SAMag articles.

Where’s My Mount?

Using my main system, running Qubes v3.2, I inserted the CD into the DVD drive. Qubes displayed the brief popup showing that /dev/sr0 (the CD drive) was mounted on dom0 (the master domain from which all AppVMs derive), so I used the VM Manager to attach it to my intended AppVM and it showed the usual attachment. So far, so good.

Next, opened the Files app on the AppVM with the CD attached, went to the “Other Locations” section where new devices show to mount it. It wasn’t there. USB sticks show there fine. The CD didn’t show.

Opened a terminal on the AppVM the CD was mounted on. Not surprised, but df(1) didn’t show it mounted because that doesn’t happen until something makes the AppVM mount it, which I usually do with the Files app unless I use some other app to do it for me. So, I checked the mount(1) list. Nope. Not there. Time to check the fdisk(8) device list on the AppVM:

$ sudo fdisk -l

There it is: /dev/xdvi showed it present, but it didn’t automount, as USB devices do, in /run/media/user/LABELNAME, using the volume label as the subdirectory name.

Present, But Not Voting

Don’t know why it wouldn’t mount the CD. Thinking that Qubes might have a reason to worry, did a bit of research and found that Qubes doesn’t support — at least not yet — mounting of CD/DVD/Blu-Ray disks as readily as it supports USB sticks and other devices. If this were a portable drive with a USB interface, I suspect it would have mounted right away. Well, I don’t have such a drive and I want to mount that disk.

You may be thinking that I could bring it to my older Fedora system and read it there. Nope: Qubes has challenged me.

In the /mnt directory is a “removable” subdirectory. It’s listed in the /mnt/fstab file (see fstab(5)) as the automount location for any /dev/xvdi device. I checked and that path was empty. So, I used it in the AppVM:

$ sudo mount /dev/xvdi /mnt/removable

That presented the drive in /mnt/removable. After checking that there were no invisible files, I copied everything from it into a directory:

$ mkdir ~/Documents/samag

$ cp -a /mnt/removable/* ~/Documents/samag

After verifying that everything came across, I dismounted the disk:

$ sudo umount /mnt/removable

Finally, I wanted to make an image of the disk for future use. I could always put it on a USB stick in the future. To make an ISO image:

$ dd if=/dev/xvdi of=samag1992-1995.iso

Because /mnt/removable was no longer in use for the CD, I could use it to check the ISO file:

$ sudo mount -t iso9660 -o ro samag1992-1995.iso /mnt/removable

By looking through /mnt/removable, I could see all the subdirectories and files that were on the CD. Thus, with a good copy from which I could make more, I dismounted the ISO:

$ sudo umount /mnt/removable

Now, I can get at those old articles, if anyone wants to see them.

2 thoughts on “Mount CD/DVD Filesystem on Qubes

  1. Do CDROM/DVDROM drives behave better if you use an HVM? (Unfortunately I can’t test this myself; just started with Qubes and I used an old computer without VT-d.) Is there a configuration that supports burning and formatting? All I can get to work (so far) is mounting RO ISO9660 disks, which is good but not enough.

Leave a Comment