Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
    
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.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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