LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2017, 12:48 AM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Rep: Reputation: 34
Find location of CD/DVD drive mount point.


Greetings,

I'm running CentOS 7.2 KDE and when I put a CD or DVD in the drive which I think is SR0 it shows up when I execute the Dolphine file manager I can see the contents of the media in the drive.

However when I use a terminal session I have no idea where to look or what type of terminal commands to execute to see such media contents within the terminal session.

The drive appears to already to be mounted when I boot up the system that's why I believe I can see the media contents.

This machine has two CD/DVD drive and I've tried to use the mount command to get the second drive mounted. There has to be a 100 mount commands and no matter how I've tried I can't mount the second drive nor can I see the contents of the second drive in a terminal session.

I do see some directories such as /mnt/cdrom but when I look at this cdrom directory there is nothing there. Also there is a directory with SR0 in it but I have no idea what it does.

Any help here would be greatly appreciated.

Thanks
 
Old 02-06-2017, 05:57 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
probably mount | grep -i sr0 or mount | grep -i cd will help you to find it
 
Old 02-06-2017, 10:18 AM   #3
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
Thanks for your quick reply.

The first command you listed gave me the information below. The second command didn't work.

I put a cd in the drive then booted the virtual machine up and there was an icon in the task bar for the cdrom. I clicked on it and Dolphin came up with the following presented FD-SETUP. You can see all the files on the cd/dvd.

Being a newbie I guess thee cd device is mounted during the boot process so like windows it's there all the time and you can use it whenever.

root@localhost FD-SETUP]# pwd
/run/media/rifkinho/FD-SETUP
[root@localhost FD-SETUP]# ls -la
total 88
dr-xr-xr-x. 13 rifkinho rifkinho 2048 Dec 20 09:03 .
drwxr-x---+ 3 root root 60 Feb 6 10:35 ..
dr-xr-xr-x. 2 rifkinho rifkinho 4096 Dec 20 08:59 ARCHIVER
dr-xr-xr-x. 2 rifkinho rifkinho 8192 Dec 20 10:25 BASE
dr-xr-xr-x. 2 rifkinho rifkinho 2048 Dec 20 09:00 BOOT
dr-xr-xr-x. 2 rifkinho rifkinho 6144 Dec 20 08:59 DEVEL
dr-xr-xr-x. 2 rifkinho rifkinho 2048 Dec 20 08:59 EDIT
dr-xr-xr-x. 2 rifkinho rifkinho 6144 Dec 20 08:59 GAMES
dr-xr-xr-x. 2 rifkinho rifkinho 2048 Dec 20 09:02 ISOLINUX
dr-xr-xr-x. 2 rifkinho rifkinho 4096 Dec 20 08:59 NET
dr-xr-xr-x. 2 rifkinho rifkinho 36864 Dec 20 10:28 PKGINFO
dr-xr-xr-x. 2 rifkinho rifkinho 2048 Dec 20 08:59 SOUND
dr-xr-xr-x. 2 rifkinho rifkinho 14336 Dec 20 10:29 UTIL
[root@localhost FD-SETUP]# pwd
/run/media/rifkinho/FD-SETUP


[root@localhost FD-SETUP]# mount | grep -i sr0
/dev/sr0 on /run/media/rifkinho/FD-SETUP type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2

The run directory has a whole lot of stuff in there but I don't know what that's all about nor why the cd got mounted in this place.

I still can't figure out how to use the mount command because there must be over 100 options etc.

Would you be good enough to list a normal mount command. BTW, there are no cd/dvd device in the FSTAB file as listed below:

# /etc/fstab
# Created by anaconda on Fri Aug 26 07:08:25 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=bee17c45-7b4f-4047-8427-8d6cf2ffe1f3 / xfs defaults 0 0
UUID=db3588a3-4060-4e12-839b-ae009de4debf /boot xfs defaults 0 0
UUID=3c10044e-00c3-4b7c-860f-0f04ba51dc27 swap swap defaults 0 0
[root@localhost /]#

Thank you again.
 
Old 02-06-2017, 10:24 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
If the CD drive isn't mounted yet, mounting it is as easy as:
Code:
mount /dev/sr0 /mnt/point
Changing "/mnt/point" to whatever directory you want to use for the mount location.

If you don't know if/where it's mounted, you can use "df" to print all mounted filesystems and find the one for /dev/sr0.
 
Old 02-06-2017, 10:46 AM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
If you want to mount the CD on your own mount point you don't have to find out where it is currently mounted or if it is mounted. You can use the umount command to get it unmounted no matter where it is mounted or not mounted:

Code:
umount  /dev/sr0
mount /dev/sr0 /mnt/wherever
--------------------
Steve Stites
 
Old 02-06-2017, 12:25 PM   #6
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by swamprat View Post
Greetings,

I'm running CentOS 7.2 KDE and when I put a CD or DVD in the drive which I think is SR0 it shows up when I execute the Dolphine file manager I can see the contents of the media in the drive.

However when I use a terminal session I have no idea where to look or what type of terminal commands to execute to see such media contents within the terminal session.

The drive appears to already to be mounted when I boot up the system that's why I believe I can see the media contents.

This machine has two CD/DVD drive and I've tried to use the mount command to get the second drive mounted. There has to be a 100 mount commands and no matter how I've tried I can't mount the second drive nor can I see the contents of the second drive in a terminal session.

I do see some directories such as /mnt/cdrom but when I look at this cdrom directory there is nothing there. Also there is a directory with SR0 in it but I have no idea what it does.

Any help here would be greatly appreciated.

Thanks
If your using a graphical environment/interface (like KDE/GNOME/Xfce/etc) the CD/DVD should be automatically mounted by the graphical environment. If you have started your PC in 'text mode' (with no graphical environment running), you would have to manually mount it yourself. Like above posters have said with the mount command.
 
Old 02-06-2017, 01:03 PM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
so it looks like this is the dir you are looking for: /run/media/rifkinho/FD-SETUP
But actually I do not know if it was the answer...
I think this is auto-mounted, so either you use some kind of GUI or automounter was configured. As far as I know rifkinho is the user and FD-SETUP is the "title" or label of that disk. Would be nice if you could tell us if it solves your problem.
 
Old 02-06-2017, 08:19 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
These days, all the cool hip young distros with the hipster beards are putting optical disks and other removable media in /run/media/[username] by default.

Don't ask me why. I wasn't consulted.
 
Old 02-06-2017, 09:20 PM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
$ mount

With no parms to see what is mounted and where. Swap is different and can be seen with free or "swapon -s".

$ cat /proc/devices

To see the major numbers to compare against /dev/ contents.

$ cat /proc/misc

To see minor numbers for major number 10 devices, or whatever major gets misc for your distro. But unrelated in this case.

In the olden days the cdrom was at /dev/hdc. And /dev/cdrom was a link to /dev/hdc. But these days, typically /dev/sr0 is the cdrom drive and sometimes /dev/cdrom is linked to it, but a lot of times you have to create this manually for those legacy things that expect it. Or use more specialized names to access them via media players.

Basically the bottom half of /proc/devices are the block devices which are typically storage devices (optical drives fall into this category). In days of old, we had to use these major (and minor) numbers to create our /dev/ devices. Although many distros did their best to create all possible devices under /dev/ so you didn't have to. The era of MAKEDEV and MKNOD. But udev came around and re-leaved us of that burden.

For certain media types (audio cds) you cannot mount them (anymore). But you have to call them special names like dvd:// or cdda://. Also cddb:// if you want to query the internet for a database of known media contents (cloud based meta-data). For example:

$ mpv --ao=alsa cdda://
(audio cd without lookup)

In short /dev/sr0 is typically your optical drive. And you'll probably have to create /dev/cdrom as a link to /dev/sr0 to have a more human friendly name.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto mount USB drive to specified mount point after reboot smallbook Linux - Server 7 07-21-2010 04:40 AM
udev rules to mount external hard drive at mount point akamikeym Gentoo 3 03-31-2010 01:12 PM
How do I change mount point location from /home to /backup amersheikh Red Hat 2 05-27-2009 08:03 AM
Set up rsync to mirror mount on Windows Server to mount point on 2nd internal drive MoMule Linux - Server 4 04-13-2007 09:34 PM
mount point for dvd JMK Linux - Newbie 2 12-28-2003 08:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration