Mounting CDrom

I am running 13.1 64bit.

I am having trouble mounting my cdrom drive. Its not in my fstab, but I can access cd contents through dolphin. However I have no idea how to access the contents through the terminal.

How can I mount my cdrom drive so that I can access cds from the terminal?

Thanks

Add a mount point and entry in /etc/fstab for the cdrom drive, and make sure the line “user” is in the mount options. That way a normal user can mount the cdrom with mount command. This is not needed if you just have root access in general, just mount it normally with the mount command.

Thanks, I added the following line to my fstab

/dev/disk/by-id/ata-ASUS_DRW-24B1ST_c_C1D0CL068493 /media/cdrom iso9660 user,noauto,exec,utf8  0  0

But I cannot find the cd in my /media/cdrom folder. Is there an option I am missing?

Can you confirm that it is a data CD (with a valid file-system) that you’re trying to mount?

Typically,
When a CDROM is mounted by a Desktop,

You can access the contents using the following location (substitute *username *with your user account name)

/var/run/*username*/media

Can’t remember for sure, this is the new location since approx. openSUSE 12.2 (?), the change was made across all distros so my guess is that it’s kernel related.

TSU

Since you are using the ‘noauto’ option, you will need to mount the media manually.

Further to Tsu’s advice, if you have an entry in /etc/fstab, then the media will not be detected (with notification) or mounted automatically by the desktop. The exact behaviour will be determined by the desktop and any configuration you have made relating to automatic handling.

Do not mount in fstab.
The disk is already mounted by your Desktop and accessible using Dolphin so mounting differently is not necessary.

In your console, just browse to the location I described.

TSU

Going back over this thread, I realised I missed your initial question. With udisks (no fstab entry required), you can use udisksctl (udisks command line tool) for mounting, unmounting etc

For example

udisksctl mount --block-device /dev/sr0

Refer to

man udisksctl

for more information.

Do not mount in fstab.
The disk is already mounted by your Desktop and accessible using Dolphin so mounting differently is not necessary.

In your console, just browse to the location I described.

TSU

its actually /var/run/media/username, however I still cannot access my disk there (doesn’t show up).

Going back over this thread, I realised I missed your initial question. With udisks (no fstab entry required), you can use udisksctl (udisks command line tool) for mounting, unmounting etc

For example
Code:
udisksctl mount --block-device /dev/sr0
Refer to
Code:
man udisksctl
for more information.

running that returns this:

Object /org/freedesktop/UDisks2/block_devices/sr0 is not a mountable filesystem.


I guess I haven’t made myself very clear. What I really need is a location where an audio cd is mounted when it is inserted into the drive. The reason for this is that I need to run a program using wine that makes use of the cdrom drive. I therefore need a physical location to point to wine so that it can read any cd I enter into the drive.

Thanks

On 2014-07-20 11:06, deano ferrari wrote:
>
> 8ofspades;2654881 Wrote:
>> Thanks, I added the following line to my fstab
>>
>>>
> Code:
> --------------------
> > > /dev/disk/by-id/ata-ASUS_DRW-24B1ST_c_C1D0CL068493 /media/cdrom iso9660 user,noauto,exec,utf8 0 0
> --------------------
>>>
>>
>> But I cannot find the cd in my /media/cdrom folder. Is there an option
>> I am missing?
> Since you are using the ‘noauto’ option, you will need to mount the
> media manually.

And mount will fail, because “/media/cdrom” should not exist. When you
mount manually, via line in fstab, you should use mount point not under
“/media”, nor under “/var/run/…”, but typically one /you/ create and
control under /mnt. For instance:


/dev/dvd /mnt/dvd  auto user,noauto,nofail  0 0

However, you do not need any of this.

Just mount the DVD using Dolphin or whatever, and cd to its location on
the terminal. You can probably paste it from Dolphin. Or type it: tsu2
said where.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

An Audio CD is not mounted anywhere.
It cannot be mounted, as it contains neither files nor a file system.

If you open it via dolphin, the kio_audiocd KIO-slave shows you imaginative files that don’t exist, and it will create them dynamically in a temporary location when you want to access them. So, in a sense, KDE/dolphin is lying to you… :wink:

The reason for this is that I need to run a program using wine that makes use of the cdrom drive. I therefore need a physical location to point to wine so that it can read any cd I enter into the drive.

The physical location would be /dev/sr0.
I’m not sure if/how wine can handle that, though.

As I thought - the media concerned is not a data CD (ie does not contain a file system as such).

On 2014-07-20 11:46, 8ofspades wrote:

> I guess I haven’t made myself very clear. What I really need is a
> location where an audio cd is mounted when it is inserted into the
> drive.

Then forget it, an audio CD can not be mounted at all. You should have
said from the start that it was an audio CD.

Audio CDs are instead played, with programs that can play them, or
ripped, with programs that can do that. Some browsers, like Dolphin,
have a layer to present a fake display of the audio tracks and do some
things on them.

> The reason for this is that I need to run a program using wine
> that makes use of the cdrom drive. I therefore need a physical location
> to point to wine so that it can read any cd I enter into the drive.

And again, that’s a totally different issue: audio CD under wine. I’ll
let somebody else answer that, I don’t know much about it.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I guess I haven’t made myself very clear. What I really need is a location where an audio cd is mounted when it is inserted into the drive. The reason for this is that I need to run a program using wine that makes use of the cdrom drive. I therefore need a physical location to point to wine so that it can read any cd I enter into the drive.

Thanks

Examine ~/.wine/dosdevices, and you should find a link to the CD/DVD device already. For reference, I have

lrwxrwxrwx 1 dean users  8 May 27  2012 d:: -> /dev/sr0

This might be of help to you (winecfg)

http://www.libregeek.org/2014/04/02/fix-mounting-cddvd-drives-wine-crossover/

When you say you can use it through DDolphin, it is already mounted.

When you want to know where, use

mount

it will be in one of the last lines.

When you want to mount it yourself elsewhere do not let it be mounted by using any of the possibilities offered by the pop-up (inclusing Dolphin), but mount it (as root) wher you want (but NOT in the reserved directories like /medis or /run /media and the like). And do not forget to create thatmount point and set it’s owner:group and permission correct (for the goall you want).

When you want to make that mounting more easy, you can predefine an entry in /etc/fstab. You then only have to give the mount command either the device file or the mountpoint as parameter. Add the noauto parameter to the fstab entry, else the system will try to mount it at boot time.

When you then want a user (or the users) to be able to mount it without asking root to do this, then use the user parameter in the fstab entry.

This is the step by step approach.

This might be of help to you (winecfg)

http://www.libregeek.org/2014/04/02/…ine-crossover/

I have already done that, and unfortunately it does not work.

Examine ~/.wine/dosdevices, and you should find a link to the CD/DVD device already. For reference, I have

My results are practically the same as yours. The only thing that might be an issue is the total 0, but I feel like that is irrelevant.

ls -l ~/.wine/dosdevices
total 0
lrwxrwxrwx 1 mani users 10 Apr 25 18:59 c: -> ../drive_c
lrwxrwxrwx 1 mani users  8 Jul 20 10:40 d: -> /dev/sr0
lrwxrwxrwx 1 mani users 29 Jul 20 10:41 e: -> /var/run/media/mani/28BD-A18D
lrwxrwxrwx 1 mani users  9 Apr 25 18:59 e:: -> /dev/sdd1
lrwxrwxrwx 1 mani users  8 Apr 25 18:59 f:: -> /dev/sr0
lrwxrwxrwx 1 mani users  8 Jul 20 10:40 g:: -> /dev/sdd
lrwxrwxrwx 1 mani users  1 Apr 25 18:59 z: -> /

When you say you can use it through DDolphin, it is already mounted.

When you want to know where, use
Code:
mount
it will be in one of the last lines.

The output of my mount does not show my drive.

devtmpfs on /dev type devtmpfs (rw,relatime,size=8196904k,nr_inodes=2049226,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sdb1 on /home type ext4 (rw,relatime,data=ordered)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
gvfsd-fuse on /var/run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdd1 on /run/media/mani/28BD-A18D type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/sdd1 on /var/run/media/mani/28BD-A18D type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro)


I double checked with another program, and wine cannot see my cd drive at all. To me it seems my cd drive is being mounted in a way that cannot be read by wine.

I am sorry to report that I did not carefully read all the posts before I answered. My post was still based on a CD with a file system. So forget it.

Again Audio CD’s are NOT mounted you can access them in /dev/srN where N is 0 to large number depending on the number of such devices.

Your dosdevices shows the /de/sr0 is mapped to Windows D: and to F:

E: may be the media stream from the cd not sure about that one