LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mount cdrom (https://www.linuxquestions.org/questions/linux-newbie-8/mount-cdrom-4175504948/)

oel 05-14-2014 03:53 AM

Mount cdrom
 
Hello,

I try mount an iso on a Oracle Enterprise Linux with hyper-v

# mount -t iso9660 /dev/cdrom /media
mount: special device /dev/cdrom does not exist


I used more times isos in this server and I think I used always next command

# mount /dev/cdrom /media

Any help?

Regards

berbae 05-14-2014 04:02 AM

Try

# mount /dev/sr0 /media

Be sure that /media exists in file system.

oel 05-14-2014 04:05 AM

# mount -t iso9660 /dev/sr0 /media
mount: special device /dev/sr0 does not exist


How can I check if /media exist in filesystem?

Regards

berbae 05-14-2014 04:15 AM

First look into 'dmesg' for your CD-ROM device and how it is named in /dev, then check the existence of /media
with the command 'ls -l /'.

Shadow_7 05-14-2014 04:48 AM

$ cat /proc/devices

It will be one of the block devices. The file lists the major number of the block device and an implied name. From when device were made manually with MAKEDEV or mknod. In my case it's 11 sr.

$ ls -l /dev/* | grep "sr"

or

$ ls -l /dev/* | grep "11"

with results for me of:

brw-rw---T 1 root cdrom 11, 0 May 13 04:47 /dev/sr0

One way to be sure that you're using the right device. Bear in mind that user needs to be in the cdrom group to mount a cd and the mount needs to be in /etc/fstab with user permissions. Moot if doing the mount as root. Also bear in mind that you cannot mount blank media or audio cds.

$ mplayer cdda:// /dev/sr0

To play audio cds. One of many means to an end.

oel 05-14-2014 05:07 AM

Hi,


# ls -l /dev/* | grep "11"
crw------- 1 root root 5, 1 May 14 11:57 /dev/console
lrwxrwxrwx 1 root root 11 May 14 10:34 /dev/core -> /proc/kcore
crw-rw---- 1 root root 1, 11 May 14 10:35 /dev/kmsg
brw-rw---- 1 root disk 1, 11 May 14 10:35 /dev/ram11
crw--w---- 1 root tty 4, 11 May 14 10:35 /dev/tty11
lrwxrwxrwx 1 root root 8 May 14 10:35 1:11 -> ../ram11
lrwxrwxrwx 1 root root 11 May 14 10:35 10:231 -> ../snapshot
lrwxrwxrwx 1 root root 7 May 14 10:35 1:11 -> ../kmsg
lrwxrwxrwx 1 root root 8 May 14 10:35 4:11 -> ../tty11

# ls -l /dev/* | grep "sr"
srw-rw-rw- 1 root root 0 May 14 10:35 /dev/log
lrwxrwxrwx 1 root root 12 May 14 10:35 202:0 -> ../cpu/0/msr


# mount -t iso9660 /dev/ram11 /media
mount: wrong fs type, bad option, bad superblock on /dev/ram11,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

The end line when I type dmesg I get:
....
ISOFS: Unable to identify CD-ROM format.


With reference to berbae's update,

1. First look into 'dmesg' for your CD-ROM device
If I type dmesg I get a lot of information, but I dont find the pattern cdrom when I look for it.

2. How it is named in /dev
If I list with /dev
autofs kmsg nvram random tty11 tty31 tty51 usbmon0
block log oldmem raw tty12 tty32 tty52 vcs
bsg loop0 port root tty13 tty33 tty53 vcs1
char loop1 ppp rtc tty14 tty34 tty54 vcs2
console loop2 ptmx rtc0 tty15 tty35 tty55 vcs3
core loop3 pts sda tty16 tty36 tty56 vcs4
cpu loop4 ram0 sda1 tty17 tty37 tty57 vcs5
cpu_dma_latency loop5 ram1 sda2 tty18 tty38 tty58 vcs6
crash loop6 ram10 sdb tty19 tty39 tty59 vcsa
disk loop7 ram11 sdb1 tty2 tty4 tty6 vcsa1
dm-0 lp0 ram12 sg0 tty20 tty40 tty60 vcsa2
dm-1 lp1 ram13 sg1 tty21 tty41 tty61 vcsa3
dm-2 lp2 ram14 shm tty22 tty42 tty62 vcsa4
fb lp3 ram15 snapshot tty23 tty43 tty63 vcsa5
fb0 MAKEDEV ram2 stderr tty24 tty44 tty7 vcsa6
fd mapper ram3 stdin tty25 tty45 tty8 vga_arbiter
full mcelog ram4 stdout tty26 tty46 tty9 vgoracle
fuse mem ram5 systty tty27 tty47 ttyS0 vg_sav500760072
hpet net ram6 tty tty28 tty48 ttyS1 zero
hugepages network_latency ram7 tty0 tty29 tty49 ttyS2
hvc0 network_throughput ram8 tty1 tty3 tty5 ttyS3
input null ram9 tty10 tty30 tty50 urandom




3. Check the existence of /media with the command 'ls -l /'.
Yes, I have a dir called media located in /


Regards,
María

Shadow_7 05-14-2014 05:16 AM

$ cat /proc/devices

You skipped that step.

Shadow_7 05-14-2014 05:20 AM

On older machines the cdrom was /dev/hdc and the link from /dev/cdrom to it was optional. But that's like windows 95 era stuff.

jamison20000e 05-14-2014 05:43 AM

Hi.
Code:

cat /etc/fstab
to see it info is there, for me it has
Code:

/dev/sr0        /media/cdrom0  udf,iso9660 user,noauto    0      0
which I actually commented out: http://www.tldp.org/LDP/abs/html/her...l#COMMENTBLOCK because of problems I had mounting but that's another story, could try it tho
Code:

sudo vi /etc/fstab
[not_code]...
same as vim: http://www.linuxstall.com/wp-content...heat-sheet.png arrows to move down i for insert mode put # at start:[/not_code]
#/dev/sr0        /media/cdrom0  udf,iso9660 user,noauto    0      0
~
~
[not_code][Esc] to exit insert mode then [Shift] +Q or +: and put at bottom of screen wq [Enter] for write quit[/not_code]

Quote:

Originally Posted by oel (Post 5170548)
...

How can I check if /media exist in filesystem?

Regards

Code:

cd /media
would work some use /mnt I would also try omitting the type (-t) each try... try both
Code:

mount /dev/cdrom
mount /dev/cdrom0

if folders /media/cdrom or /mnt/cdrom exist try
Code:

mount /dev/sr0 /media/cdrom
or /mnt instead of /media ;) good info and links also here: http://en.wikipedia.org/wiki/Mount_%28Unix%29
best wishes and have fun. :)

oel 05-14-2014 05:56 AM

Hello, I still cant mount my cdrom device...

Code:


# cat /proc/devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 21 sg
 29 fb
128 ptm
136 pts
162 raw
180 usb
189 usb_device
202 cpu/msr
203 cpu/cpuid
249 hidraw
250 usbmon
251 bsg
252 pcmcia
253 watchdog
254 rtc

Block devices:
  1 ramdisk
259 blkext
  7 loop
  8 sd
  9 md
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp


Code:

# mount /dev/cdrom
mount: can't find /dev/cdrom in /etc/fstab or /etc/mtab
# mount /dev/cdrom0
mount: can't find /dev/cdrom0 in /etc/fstab or /etc/mtab
# mount /dev/sr0
mount: can't find /dev/sr0 in /etc/fstab or /etc/mtab
# mount /dev/ram11
mount: can't find /dev/ram11 in /etc/fstab or /etc/mtab
# mount /dev/hdc
mount: can't find /dev/hdc in /etc/fstab or /etc/mtab

# mount /dev/ram11 /media
mount: you must specify the filesystem type
# mount -t iso9660  /dev/ram11 /media
mount: wrong fs type, bad option, bad superblock on /dev/ram11,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so


jamison20000e 05-14-2014 06:08 AM

Here is my output if it helps
Code:

cat /proc/devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  6 lp
  7 vcs
 10 misc
 13 input
 14 sound/mixer
 14 sound/dsp
 14 sound/audio
 21 sg
 29 fb
 81 video4linux
 99 ppdev
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
216 rfcomm
226 drm
252 media
253 bsg
254 rtc

Block devices:
259 blkext
  7 loop
  8 sd                                                                                                                                                                                         
 11 sr                                                                                                                                                                                         
 65 sd                                                                                                                                                                                         
 66 sd                                                                                                                                                                                         
 67 sd                                                                                                                                                                                         
 68 sd                                                                                                                                                                                         
 69 sd                                                                                                                                                                                         
 70 sd                                                                                                                                                                                         
 71 sd                                                                                                                                                                                         
128 sd                                                                                                                                                                                         
129 sd                                                                                                                                                                                         
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd

..?

Shadow_7 05-14-2014 06:21 AM

Quote:

...
Block devices:
...
8 sd
9 md
...
It might be one of those two in terms of the major number.

$ ls -l /dev/ | grep "8,"
$ ls -l /dev/ | grep "9,"

But it seems odd / missing to me. Perhaps you don't have some kernel modules loaded. Like sr_mod, sd_mod, scsi, sg. Or the device is broken or misconfigured from the hardware side of things.

jamison20000e 05-14-2014 06:35 AM

Or, even
Code:

ls -l /dev/ | grep ""
to see them all...

oel 05-14-2014 07:14 AM

I´m working with Hyper-V.... perhaps the problema is that Hyper-V is not capable to present the DVD unit.... Could it be?

lleb 05-14-2014 07:24 AM

Quote:

Originally Posted by oel (Post 5170648)
I´m working with Hyper-V.... perhaps the problema is that Hyper-V is not capable to present the DVD unit.... Could it be?

yes as hyper-v is a virtualizer, it needs to be configured to allow for the VMs to access the real hardware like the CD/DVD player.


All times are GMT -5. The time now is 09:31 PM.