# mount cdrom?



## fvs (Mar 9, 2017)

Just installed 11 didn't have any trouble, after running desktop xfce4 no problems
until I went to put a disk into the DVD player and found that I needed to mount
the cdrom, I open terminal and entered the command "mount /cdrom" and got this,

```
mount_cd9660: /dev/acd0: No such file or directory
```
OK I went into /etc/fstab and entered 

```
/dev/acd0     /cdrom       cd9660   ro,noauto 0 0
```
also "mkdir /cdrom" then entered " mount /cdrom"

```
mount_cd9660: /dev/acd0: No such file or directory
```
Need help!
BTW, here is my dmesg report.

```
cd0 at ahcich2 bus 0 scbus0 target 0 lun 0
cd0: <TSSTcorp CDDVDW SH-224DB SB01> Removable CD-ROM SCSI device
cd0: Serial Number R93E6YAG100DFQ
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
```
I did put Medium in tray.
Would appreciate a walk through.


----------



## aragats (Mar 9, 2017)

Why are you assuming that your device node is /dev/acd0?
Most likely it's /dev/cd0. Have you checked it?


----------



## SirDice (Mar 10, 2017)

Adding a line to fstab isn't going to make a non-existing device suddenly appear. Your CD drive is /dev/cd0, not /dev/acd0.


----------



## ShelLuser (Mar 10, 2017)

Maybe something handy to remember:


```
feliner:/usr/ports $ sysctl kern.disks
kern.disks: cd0 ada0
```
This is on my laptop, also using a CD as well as an XFCE4 powered GUI


----------



## SirDice (Mar 10, 2017)

Most people will have a cd0 nowadays. This is due to the change that put everything on the CAM framework. Previously acd0 was an IDE CD drive, cd0 was its SCSI counter-part. But due to CAM everything is now essentially treated as SCSI, regardless if it's IDE, SATA, SAS or plain old SCSI.


----------



## fvs (Mar 10, 2017)

aragats said:


> Why are you assuming that your device node is /dev/acd0?
> Most likely it's /dev/cd0. Have you checked it?


OK, Changed my fstab to /dev/cd0, Then entered 

```
root@freebsd:/home/frank # mount /cdrom
mount_cd9660: /dev/cd0: Invalid argument
root@freebsd:/home/frank # mount -t cd9660 /dev/cd0 /cdrom
mount_cd9660: /dev/cd0: Invalid argument
```
That's not getting it. Any other suggestion are very welcome.


----------



## fvs (Mar 10, 2017)

SirDice said:


> Most people will have a cd0 nowadays. This is due to the change that put everything on the CAM framework. Previously acd0 was an IDE CD drive, cd0 was its SCSI counter-part. But due to CAM everything is now essentially treated as SCSI, regardless if it's IDE, SATA, SAS or plain old SCSI.


OK, Need a lesson or two, But can use your suggestion to correct this problem, Would appreciate your time.
Thanks


----------



## fvs (Mar 10, 2017)

ShelLuser said:


> Maybe something handy to remember:
> 
> 
> ```
> ...


OK, Entered 

```
root@freebsd:/home/frank # /usr/ports $ sysctl kern.disks
/usr/ports: Permission denied.
root@freebsd:/home/frank # kern.disks: cd0 ada0
root@freebsd:/home/frank # kern.disks: cd0 ada0
kern.disks:: Too many arguments.
```

This was the results. Thanks


----------



## fvs (Mar 10, 2017)

SirDice said:


> Most people will have a cd0 nowadays. This is due to the change that put everything on the CAM framework. Previously acd0 was an IDE CD drive, cd0 was its SCSI counter-part. But due to CAM everything is now essentially treated as SCSI, regardless if it's IDE, SATA, SAS or plain old SCSI.


Tried once more and got these results, but I don't know what they mean?

```
mount /dev/cd0 /cdrom
mount: /dev/cd0: Invalid sectorsize 2352 for superblock size 8192: Invalid argument
root@freebsd:/home/frank # dmesg | grep cd
cd0 at ahcich2 bus 0 scbus0 target 0 lun 0
cd0: <TSSTcorp CDDVDW SH-224DB SB01> Removable CD-ROM SCSI device
cd0: Serial Number R93E6YAG100DFQ
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: 474MB (242929 2048 byte sectors)
```


----------



## ShelLuser (Mar 10, 2017)

First...  Try to combine your posts, it makes it easier to read. Click quote, it'll be copied in the box at the bottom, then click it on the next post. Follow until, etc...

The command I suggested to use is `sysctl kern.disks`, this will show you the disks FreeBSD detected. My code snippet shows me using this, but I fail to see why you considered it necessary to include the path I was on.

Second; why not simply use mount_cd9660](8)?


```
root@feliner:/home/peter # mount_cd9660 /dev/cd0 /mnt
root@feliner:/home/peter # mount | grep mnt
/dev/cd0 on /mnt (cd9660, local, read-only)
root@feliner:/home/peter # ls /mnt
cdinst.bat*     dmf_ps2.cmd*    install.cmd*    os2se20.src*    rspinst.exe*
cdinst.cmd*     ibminst*        makedsks.bat*   proddsks.cmd*   sample.rsp*
cid*            images*         makedsks.cmd*   readme*
diskimgs*       info*           os2image*       readme.ins*
```
So: `# mount_cd9660 /dev/cd0 /mnt`. Excluding the #, I only added that to make sure that it's clear that this command needs to be executed as root.


----------



## fvs (Mar 10, 2017)

ShelLuser said:


> First...  Try to combine your posts, it makes it easier to read. Click quote, it'll be copied in the box at the bottom, then click it on the next post. Follow until, etc...
> 
> The command I suggested to use is `sysctl kern.disks`, this will show you the disks FreeBSD detected. My code snippet shows me using this, but I fail to see why you considered it necessary to include the path I was on.
> 
> ...


Here is the result,

```
# mount_cd9660 /dev/cd0 /mnt
mount_cd9660: /dev/cd0: Invalid argument
```


----------



## SirDice (Mar 10, 2017)

It's been a while since I used a CD (I rarely burn anything to CD anymore) but "invalid argument" usually means it's not an ISO-9660 image. What does `file /dev/cd0` tell you?


----------



## fvs (Mar 10, 2017)

```
root@freebsd:/media #  file /dev/cd0
/dev/cd0: character special (0/114)
```


----------



## SirDice (Mar 10, 2017)

Hehe.. Is there actually a CD in the drive? If there is, is it a real data CD or an audio CD? Is it a CD, DVD or Bluray?


----------



## fvs (Mar 10, 2017)

SirDice said:


> Hehe.. Is there actually a CD in the drive? If there is, is it a real data CD or an audio CD? Is it a CD, DVD or Bluray?


Yes


----------



## ShelLuser (Mar 10, 2017)

No, just file won't work. But use -s and it will:


```
root@feliner:/home/peter # file -s /dev/cd0
/dev/cd0: High Sierra CD-ROM filesystem data
```
So to avoid confusion: `# file -s /dev/cd0` (nothing before it).

What kind of CD are you trying to mount anyway?


----------



## SirDice (Mar 10, 2017)

ShelLuser said:


> No, just file won't work. But use -s and it will


Oh, d'uh. I guess my brain is already firmly focused on the weekend


----------



## fvs (Mar 10, 2017)

ShelLuser said:


> No, just file won't work. But use -s and it will:
> 
> 
> ```
> ...


An tried Audio, Movie & Iso?


----------



## fvs (Mar 10, 2017)

ShelLuser said:


> No, just file won't work. But use -s and it will:
> 
> 
> ```
> ...




```
root@freebsd:/home/frank # file -s /dev/cd0
/dev/cd0: ERROR: cannot read `/dev/cd0' (Invalid argument)
```


----------



## ShelLuser (Mar 10, 2017)

Then there is most likely something wrong with the CD. Is this an audio cd by any chance, because you can't mount those due to the fact that there's not a file system on them (only audio data). I tried and I managed to reproduce your issue using an audio cd:


```
root@feliner:/home/peter # file -s /dev/cd0
/dev/cd0: ERROR: cannot read `/dev/cd0' (Invalid argument)
root@feliner:/home/peter #
```
You can rip audio CD's but I didn't keep up with the available software. Last time I tried this (around 2010 on Linux) there used to be a 'cdfs' extension; it allowed you to 'mount' an audio CD which would then provide all audio tracks as separate WAV files (easily copied) but I doubt that this exists for FreeBSD. I did check some of the Fuse options (/usr/ports/sysutils/fuse*) but couldn't find much.

Still, programs like multimedia/mplayer might be able to help.


----------

