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?

migrated from stackoverflow.com Apr 14 '11 at 16:50

This question came from our site for professional and enthusiast programmers.


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.

  • It 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. – user56165 Apr 14 '11 at 16:55

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.)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.