Is it safe to delete /media/cdrom?

My Ubuntu Server media center install doesn't have a CD drive (and never has) but it still has a /media/cdrom directory. I assume it's there to act as a mount point if a CD were inserted into a hitherto undiscovered optical drive.

Let's pretend that I'm never going to add an optical drive to this computer —which is a fair assumption— can I safely nuke the path or is internal stuff going to implode? If there is stuff liable to explosion, can I defuse that before I trigger it?

To answer some of the conjecture: Never had a CD drive in this machine, it was a fresh install of 14.04 (not that old) from USB. There's nothing for the CD in /etc/fstab.

Why? Because I only have one other thing in /media/ and removing cdrom makes it easier to tab through to that.
Why not just do it? It serves stuff for the entire house. Don't want to break it, even if only for 10 minutes.

3

1 Answer

I guess /media/cdrom is just another mounting point used to mount CD/DVD as the old /mnt/cdrom for some old versions.

Starting from that I could say there would be no effect on your system once you remove this directory, since it doesn't really affect the fileSystem.

Once you remove that directory you can edit the /etc/fstab and remove the associated line.

Now mostly the one problem you may face is Unable to stat the mount point /media/cdrom/ If you try to mount a CD "which is not your case as you said" but even that you can solve it easily.

Create again the mount point for cdrom device:

sudo mkdir /media/cdrom

Edit the fstab to make some change.

sudo gedit /etc/fstab

Paste the following line at the end of the file

/dev/sr0 /media/cdrom iso9660,udf user,exec,utf8 0 0

Save and close the file.

Then restart the system.

In case sources list has the "include cdrom" option active , you can try to mount the CD/DVD as above then after restarting the system run the command:

sudo apt-cdrom add

Enter the name of the CD then you can do apt-get update

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like