LinuxQuestions.org
Visit Jeremy's Blog.
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 07-09-2015, 04:54 PM   #1
james272
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Rep: Reputation: Disabled
cant mount cdrom drive in centos


I am very new to linux. From what I understand the <mount> command shows you all the mount points where the disk partitions are mounted to the file system. For example when I type <mount> it shows the following.

# /dev/sda1 on /boot type ext4.

In order to mount a cdrom drive and see its contents I first need to create a directory using the following command.

# sudo mkdir /media/dvdrom

That creates dvdrom directory in /media/

Then I need to mount the dvd or cd to the /media/dvd mountpoint

I do that by typing

# sudo mount /dev/cdrom /media/dvdrom

The problem is the cd does not start when I issue the above command. Nothing happens. What step am I missing? When I type

#mount

It shows /dev/sr0 mounted on /media/dvdrom but nothing happens
 
Old 07-09-2015, 05:12 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
What do you mean the cd does not start? Do you see anything in /media/dvdrom?

Also, sudo is not configured by default in centos. Did you configure it manually, or are you running these commands as root? If you're running as root then you can get rid of the sudo in your commands, it's redundant.
 
Old 07-09-2015, 06:06 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,551

Rep: Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144
What version of CentOS and are you running a desktop or just the command line?

What you see is normal when mounting a cdrom from the command line i.e. nothing happens if the command executes successfully. As indicated if you cd to /media/dvdrom you should see the files on the disc.

Last edited by michaelk; 07-10-2015 at 11:35 AM.
 
1 members found this post helpful.
Old 07-09-2015, 07:47 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,844

Rep: Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478
Quote:
Originally Posted by james272 View Post
I am very new to linux. From what I understand the <mount> command shows you all the mount points where the disk partitions are mounted to the file system. For example when I type <mount> it shows the following.

# /dev/sda1 on /boot type ext4.

In order to mount a cdrom drive and see its contents I first need to create a directory using the following command.

# sudo mkdir /media/dvdrom

That creates dvdrom directory in /media/

Then I need to mount the dvd or cd to the /media/dvd mountpoint

I do that by typing

# sudo mount /dev/cdrom /media/dvdrom

The problem is the cd does not start when I issue the above command. Nothing happens. What step am I missing? When I type

#mount

It shows /dev/sr0 mounted on /media/dvdrom but nothing happens
quite possibly.

I think udev reads the superblock to decide what to do when the disk is inserted. If nothing is defined for the filesystem then it quits - BUT remember that it did read the superblock, thus it is in memory.

Your mount command could just as easily used the buffer already in memory when mounting, thus showing no activity.

If you change directory to the mount point you should then force the root directory to be read.
 
Old 07-10-2015, 11:55 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Xubuntu
Posts: 5,444

Rep: Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897
Look in the file manager: choose Edit - Preferences - Media and you can specify that audio CDs and video DVDs should play immediately.
 
Old 07-10-2015, 12:24 PM   #6
james272
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have tried switching to the /media/dvdrom directory when mounting the cdrom but the cdrom drive still does not work when I do that.
As mentioned when I type it shows that /dev/sr0 is mounted on /media/dvdrom but the cdrom does not start working. In addition when I type the mount command below I get the message that the drive is mounted as read only.




# sudo mkdir /media/dvdrom



# sudo mount /dev/cdrom /media/dvdrom
 
Old 07-10-2015, 12:35 PM   #7
james272
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
I should mention I am using vmware player to run centos 6.6 vm. I have followed all the steps to attach cdrom drive to virtual machine. I assume I am following all the correct steps to mount the cdrom in centos. if anyone can see that I am not issuing the correct commands to mount the drive on centos please let me know. Thanks. If I am following the correct steps then it must have something to do with the vm and vmware player.
 
Old 07-10-2015, 12:39 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
You still haven't mentioned whether or not you see anything in /mnt/dvdrom, OR what you mean by "the cdrom drive does not work" or "the cdrom does not start working".

Mounting in read only is normal, and is what you would expect when mounting a cd.
 
Old 07-10-2015, 12:53 PM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,844

Rep: Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478
Quote:
Originally Posted by james272 View Post
I have tried switching to the /media/dvdrom directory when mounting the cdrom but the cdrom drive still does not work when I do that.
As mentioned when I type it shows that /dev/sr0 is mounted on /media/dvdrom but the cdrom does not start working. In addition when I type the mount command below I get the message that the drive is mounted as read only.
So it DID mount.

Your files are there.

CDROM file format is a read-only filesystem. You can't write to it.
 
Old 07-10-2015, 03:05 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,465

Rep: Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606
you should NOT have to do anything at all

your cd/dvd drive should AUTO mount

NOW!!!

a store bought MUSIC CD or a store bought DVD movie
you WILL need to start a music or movie program to read it

but
a normal everyday DATA cd or dvd
will AUTOMOUNT -- just pop in the cd and close the tray


look in the left pane in "places" in Nautilus and you will see it mounted
also a temp icon should show up on the desktop

you have NOT said WHAT version of cent this is
Cent 7 is VERY!!!! different than 6
in CentOS 6.6 /media/????
in 7 is will be something like
/var/run/your user name/media/??????

Last edited by John VV; 07-10-2015 at 03:07 PM.
 
Old 07-10-2015, 04:15 PM   #11
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,844

Rep: Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478
Quote:
Originally Posted by John VV View Post
you should NOT have to do anything at all

your cd/dvd drive should AUTO mount
Not on a server. Automounts are only semiuseful on a desktop. On a server there is no GUI for context.
Quote:

NOW!!!

a store bought MUSIC CD or a store bought DVD movie
you WILL need to start a music or movie program to read it

but
a normal everyday DATA cd or dvd
will AUTOMOUNT -- just pop in the cd and close the tray


look in the left pane in "places" in Nautilus and you will see it mounted
also a temp icon should show up on the desktop

you have NOT said WHAT version of cent this is
Cent 7 is VERY!!!! different than 6
in CentOS 6.6 /media/????
in 7 is will be something like
/var/run/your user name/media/??????
Only if you are using the GUI login.

A server may have 10-20 (or more depending on the size) active user sessions. Just putting a CD in a server won't tell you WHICH one of those users is to be given the CD/DVD. Thus, servers don't automount. If they do, it will be to something like /mnt/something.
 
Old 07-10-2015, 04:30 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,551

Rep: Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144
Quote:
Originally Posted by james272 View Post
I should mention I am using vmware player to run centos 6.6 vm. I have followed all the steps to attach cdrom drive to virtual machine.
How is the VM configured? You never answered if you are running a desktop? I think I understand not by what you mean by the drive not doing anything. You do not hear it actually spin when the drive was mounted. We also do not actually know if the /dev/sr0 is actually connected to a physical or virtual drive.

https://www.vmware.com/support/ws5/d...dd_cd_dvd.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
why can't I mount my cdrom drive on desktop? joseph2020 Linux - Newbie 2 04-26-2009 11:59 PM
how do i mount my cdrom drive? mark solomon Linux - Newbie 5 06-10-2004 08:27 AM
I can't mount my cdrom drive scorpion777 Linux - Newbie 5 08-11-2003 09:15 AM
Why can't I mount my CDRom Drive??? xM0M0x Linux - General 1 08-23-2001 08:40 AM
Can't mount cdrom after adding new drive jimweatherly Linux - General 4 05-29-2001 12:25 PM

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

All times are GMT -5. The time now is 11:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration