# CDROM not mounting



## jaymax (May 23, 2016)

This has been addressed in many threads but solutions, where they have appeared, do not seem to be applicable here.

There are two optical devices on the platform

The System is rebooted

```
# uname -a
FreeBSD MACH1 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 19:31:38 UTC 2015  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
```

From dmesg =>

`# cat /var/log/dmesg.today | grep -i cd0`

```
cd0 at ata1 bus 0 scbus7 target 0 lun 0
cd0: <CD-ROM Drive/G6D 1.30> Removable CD-ROM SCSI device
cd0: Serial Number MT1198-B Firmware
cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
```

`# cat /var/log/dmesg.today | grep -i cd1`

```
cd1 at ata1 bus 0 scbus7 target 1 lun 0
cd1: <_NEC DVD_RW ND-3550A 1.05> Removable CD-ROM SCSI device
cd1: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
cd1: Attempt to query device size failed: NOT READY, Medium not present
```

`# ls /dev/cd*`

```
/dev/cd0  /dev/cd1
```

`# file /dev/cd*`

```
/dev/cd0: character special (0/111)
/dev/cd1: character special (0/112)
```

cd and dvd discs were  placed in cd and dvd devices respectively

`mount -t cd9660 /dev/cd1 /dvd`
/dvd mounts fine and shows up in df -k listing

However,
`mount -t cd9660 /dev/cd0 /cdrom`
[mount also attempted with alternate filesystems but with similar results.]
/cdrom does not mount but returns all sorts of errors viz:

`# mount -t cd9660 /dev/cd0 /cdrom`

```
mount_cd9660: /dev/cd0: Device not configured
```
`# mount -t iso9660 /dev/cd0 /cdrom`

```
mount: /dev/cd0: Operation not supported by device
```
`# mount -t udf /dev/cd0 /cdrom`

```
mount_udf: /dev/cd0: Device not configured
```

A verified cd, readable in /dvd was inserted in /cdrom
`mount -t cd9660 /dev/cd0 /cdrom`
==> messages -

```
May 23 01:28:00 MACH1 kernel: g_vfs_done():cd0[READ(offset=32768, length=2048)]error = 6
May 23 01:41:51 MACH1 kernel: g_vfs_done():cd0[READ(offset=32768, length=2048)]error = 6
May 23 01:43:06 MACH1 kernel: g_vfs_done():cd0[READ(offset=524288, length=2048)]error = 6
```

I've tried other things too
The mount points exist, permission on /cdrom changed to 777 but made no difference realized.
Entries changed in /etc/devfs.conf

```
link  cd0  cdrom
   link  cd1  dvd
```
Entered- autofs_enable="YES" to /etc/rc.conf

Nothing seemed to work! 
What have I done wrong or am not doing?


----------



## SirDice (May 23, 2016)

Either the disk is unreadable or the drive is broken.


----------



## jaymax (May 23, 2016)

A distinct possibility, except that this failure would be coincident with the replacement of a system disk with a cloned disk. Was working perfectly just before the event, cables seem intact.


----------



## SirDice (May 23, 2016)

jaymax said:


> A distinct possibility, except that this failure would be coincident with the replacement of a system disk with a cloned disk.


More often than not things tend to break when you power them off after a long uptime. In any case, it's not a driver setting or something like it.


----------



## wblock@ (May 23, 2016)

The errors indicate read errors.  Sometimes cables or connectors fail or go intermittent after components have been changed.  This seems to happen more often on older systems, particularly when the cables have not been touched in a long time.


----------



## nik0tine (Nov 13, 2020)

jaymax said:


> `# mount -t cd9660 /dev/cd0 /cdrom`
> 
> ```
> mount_cd9660: /dev/cd0: Device not configured
> ...


This is a brilliant CD/DVD mount list! You saved me with UDF


----------



## Abhi (Nov 17, 2020)

```
root@abhi:/usr/ports/multimedia/mplayer # mount -t cd9660 /dev/cd0 /cdrom
mount: /cdrom: No such file or directory
root@abhi:/usr/ports/multimedia/mplayer # ls /dev/cd*
/dev/cd0    /dev/cdrom
```

 what can i do...?


----------



## SirDice (Nov 17, 2020)

You don't have a /cdrom directory, so you can't mount anything on it. The mountpoint has to exist.


----------



## chrbr (Nov 17, 2020)

Dear Abhi,
just to add some information, you can use existing directories. There is no need to force mounting to /cdrom. A standard mount point is /mnt. This is what I use regulary. There is an additional default existing directory /media. As far as I know this is where the auto mounter usually adds mount points. I do not use any auto mount system. In the rare cases whre I have more than one device to mount I use /mnt] for one device, for example an USB stick. The second device as a USB disk or so I mount to /media. I do so for convenience because these directories exist by default.


----------



## SirDice (Nov 17, 2020)

Note that /mnt is meant to be used as a _temporary_ mount point. I often see people use it for permanent mounts. For just a quick mount for a CD for example it's perfect. 

`mount -t cd9660 /dev/cd0 /mnt`


----------



## Abhi (Nov 17, 2020)

root@abhi:/usr/home/abhi # mount -t cd9660 /dev/cd0 /mnt
mount_cd9660: /dev/cd0: Device not configured


----------



## chrbr (Nov 17, 2020)

I have tested that with an ancient CD from 1995

```
# mount -t cd9600 /dev/cd0 /mnt/                               <<<<<<< typo, please see below. Sorry I am sorry for the noise.
mount: /dev/cd0: Operation not supported by device
```
But 
	
	



```
# mount_cd9660 /dev/cd0 /mnt/
#
```
works and I can see the content of the cd in /mnt. I will try a few other CDs. But I do not understand the behaviour. According to [man 8]mount[/man] the upper command should call the lower command because of the type.

```
However, for the following file system types: cd9660, mfs,
             msdosfs, nfs, nullfs, smbfs, udf, and unionfs mount will not call
             nmount(2) directly and will instead attempt to execute a program
             in /sbin/mount_type where type is replaced by the file system
             type name.  For example, nfs file systems are mounted by the
             program /sbin/mount_nfs.
```
May be SirDice knows the reason.


----------



## SirDice (Nov 17, 2020)

mount(8) defaults to trying to mount read/write, it doesn't know the difference. 

`mount -t cd9660 -r /dev/cd0 /mnt/`


----------



## chrbr (Nov 17, 2020)

chrbr said:


> # mount -t cd9600 /dev/cd0 /mnt/ mount: /dev/cd0: Operation not supported by device


Now it is time for me to feel stupid. `mount -t cd9660 /dev/cd0 /mnt` works. I have overlooked the typing mistake which took me some time....
But now I have no idea regarding the issue of Abhi.


----------



## SirDice (Nov 17, 2020)

chrbr said:


> I have overlooked the typing mistake which took me some time....


If it's any consolation, I didn't spot it either. I actually copy/pasted your typo


----------



## Abhi (Nov 18, 2020)

```
root@abhi:/usr/home/abhi # mount_cd9660 /dev/cd0 /mnt/
mount_cd9660: /dev/cd0: Device not configured
root@abhi:/usr/home/abhi # mount -t cd9660 -r /dev/cd0 /mnt/
mount_cd9660: /dev/cd0: Device not configured
root@abhi:/usr/home/abhi # mount -t cd9660 /dev/cd0 /mnt 
mount_cd9660: /dev/cd0: Device not configured
root@abhi:/usr/home/abhi # mount -t cd9660 /dev/cd0 /cdrom
```

....................
I tested all these commands...but failed to mount.....is there any way to mount....or how to configure  device  ???
....thanks for your kind help......


----------



## VladiBG (Nov 18, 2020)

Read about UDF file system and cd9660.


----------



## chrbr (Nov 18, 2020)

It seems to be an ancient topic. PR 120989 describes the problem. I found a long thread in the mailing list in the link http://freebsd.1045724.x6.nabble.com/mounting-udf-td6061339.html showing the behaviour as documented by Abhi.
`file - < /dev/cd0` should output the UDF version if there is any. Additionally there is a port sysutils/udfclient which is supposed to be ok. It should be worth to try that. Information is available at http://www.13thmonkey.org/udfclient/.


----------



## nik0tine (Nov 19, 2020)

Abhi said:


> root@abhi:/usr/home/abhi # mount_cd9660 /dev/cd0 /mnt/
> mount_cd9660: /dev/cd0: Device not configured
> root@abhi:/usr/home/abhi # mount -t cd9660 -r /dev/cd0 /mnt/
> mount_cd9660: /dev/cd0: Device not configured
> ...






Abhi said:


> mount -t udf /dev/cd0 /mnt/


or
iso9660


----------



## SirDice (Nov 19, 2020)

What does `file -s /dev/cd0` tell you? Have you tried other CDs? You may just have a bad CD. Or a broken drive.


----------

