Mounting a CDROM in Ubuntu
Solution 1
mount /dev/sr0 /mnt/cdrom
You need to use the cd-rom's block device to mount. It's most commonly sr0 on modern distributions.
But if your CD is already mounted to media automatically, you don't need to do this. You just need to point the program to the contents of the CD in /media.
Solution 2
You normally mount block devices (or in some cases, files containing equivalent data).
You can, however, link two directories using a bind mount:
mount --bind "/media/My CD-ROM" /mnt/cdrom
(A similar effect could be reached by symlinking /mnt/cdrom
to the intended target, too.)
Related videos on Youtube
user56165
Updated on September 18, 2022Comments
-
user56165 over 1 year
I'm using a software that needs to read data from a cdrom. The instructions say to mount the cdrom (mount /mnt/cdrom). I understand that I need to mount the cdrom to /mnt/cdrom.
I created a folder "cdrom" under "mnt". Then I tried to mount the cdrom by typing:
sudo mount /media/ /mnt/cdrom/
This didn't work. Under "media" I have another folder with the actual cd content so I tried to mount it too, but again with no success. I keep getting an error that "media is not a block device".
What I am doing wrong?
-
user56165 about 13 yearsIt worked. Thanks a lot! I couldn't point the program to media because I don't have the source and it seems like it's hard-coded there.