Ubuntu 14.04 LTS - Automount CD/DVD to /media

15,764

Welp... I solved my own problem.

sudo mkdir /media/cdrom0

And, add the following line to fstab:

/dev/sr0    /media/cdrom0   udf,iso9660 user,noauto,exec,utf8   0   0

Everything returns to normal. For some reason it was mounted and broken somehow.. Not sure. Anyways, running a umount on the drive first and reinserting after several system restarts fixed the problem. I guess that means it's solved. :P

Share:
15,764

Related videos on Youtube

Scipio Xaos
Author by

Scipio Xaos

Updated on September 18, 2022

Comments

  • Scipio Xaos
    Scipio Xaos over 1 year

    So.. a few months ago I upgraded my system from 13.10 to 14.04 LTS. Clean install, everything fresh. I haven't had to insert a disk until just now and I've come across a problem. Specifically, inserting a cd or dvd into the drive does not cause Ubuntu to mount the disk automatically and display an icon in the launcher (this was the normal behaviour I experienced in 13.10).

    I've done numerous searching around trying to find similar issues and I've identified that the computer does indeed see the disk drive as I can manually mount the disk to a folder and access its contents. What I want is to have the automatic functionality return to save me having to type the commands each time.

    Initially, my fstab was lacking any lines for the disk drive, but I've added one (which doesn't seem to work) as follows:

    /dev/scd0   /media/cdrom    udf,iso9660 user,noauto,exec,utf8   0   0
    

    I got that from another thread (which.. I can no longer find >.> ) and it doesn't seem to re-enable any kind of automounting behavior. (I've also tried it with /dev/cdrom instead of /dev/scd0 .)

    I then wondered if it was a problem from when I messed with the fstab trying to fix another problem involving automounting an encrypted swap partition (which was fixed by making the swap partition NOT encrypted) so I went to another install of 14.04 LTS that I had access to that hadn't had any changes made to the fstab yet. I found that that install ALSO lacked any lines referencing cd / dvd rom explicitly (but it had a couple of ID lines; I figured they were the boot and drive mounts). So it seems to be that automounting is a problem for 14.04 LTS? I'm not sure.

    Anyways, I'd like to know if anyone has any idea how to get the original functionality back? All I want is to be able to insert a disk and have it automatically mount to a directory (and, if possible, pin the cd file access to the launcher like it does for other external media: usb, SD card; they work properly, btw). I think the default location for the mount is to show up in the /media/<user>/ dependent on who is logged in at the moment. Any idea on a fix? Thanks in advance.

    EDIT: I should not that /dev/scd0 does not exist on my system. /dev/cdrom points to /dev/sr0 .

  • Fabby
    Fabby over 8 years
    Scipio: now you should come back and click the grey at the left of this text, which means Yes, this answer is valid! ;-)
  • Simon Banks
    Simon Banks about 3 years
    That no noauto in the stab will stop it from automating.. There is an optional auto mounter for linux but its normally only used for networking mounts..
  • Simon Banks
    Simon Banks about 3 years
    stab is the way to go.. So two optical drives will need to different mount points.. If they both point to say /mnt/cdrom then only the first will succeed.