Other FreeBSD thinks my CDs and DVDs are empty

Hello everyone, how's it goin'?
As the title says, FreeBSD simply won't display any files or folders on any CD or DVD. They'll mount automatically when I insert them, and I've got it to where the disc will show up in Dolphin in KDE and in Discs & Devices, but Dolphin says that the "Folder is empty" and using ls /media/cd0, which is where mount says it's mounted, doesn't produce any kind of output.

I'm not sure what files you guys need to look at, but here's my rc.conf, my devfs.conf, and my devfs.rules:
Code:
hostname="iona"
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"

sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"
cupsd_enable="YES"
devfs_system_ruleset="system"
avahi_daemon_enable="YES"

# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"

kld_list="radeonkms"

Code:
#  Copyright (c) 2003 The FreeBSD Project
#  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#  1. Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
#  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
#  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
#  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
#  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
#  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#  SUCH DAMAGE.
#
#  $FreeBSD$

# These are examples of how to configure devices using /etc/rc.d/devfs.
# The first parameter is always the action to take, the second is always the
# existing device created by devfs, and the last is what you want to change.
# The name of the action is only significant to the first unique character.
#
# Examples:

# Commonly used by many ports
#link   cd0     cdrom
#link   cd0     dvd

# Allow a user in the wheel group to query the smb0 device
#perm   smb0    0660

# Allow members of group operator to cat things to the speaker
#own    speaker root:operator
#perm   speaker 0660

own     /dev/da0        root:wheel
perm    /dev/da0        0666

own     /dev/cd0        root:wheel
perm    /dev/cd0        0660

Code:
[system=100]
add path 'cd*' mode 666

I'd appreciate any help I get from you guys, thanks! I've been trying dang near anything Google regurgitates to me!
 
Welcome to FreeBSD Forums.
  1. <https://www.freshports.org/multimedia/vlc/#add> add VLC media player
  2. use the Open Disc… menu
  3. ? Audio CD
  4. Play
Do you get the error pictured below?

1643611782598.png 1643612110197.png

Pictured above, I have problems with an integral optical drive, tray-loading HP DVDRAM GT80N. No playback, VLC ceases to respond, I kill it. The same if I select /dev/cd0 before attempting playback.

The same audio CDs are fine in an external Blu-ray drive:

Code:
% tail -f -n 0 /var/log/messages
Jan 31 07:36:16 mowa219-gjp4-8570p-freebsd kernel: ugen0.5: <BUFFALO Optical Drive> at usbus0
Jan 31 07:36:16 mowa219-gjp4-8570p-freebsd kernel: umass1 on uhub0
Jan 31 07:36:16 mowa219-gjp4-8570p-freebsd kernel: umass1: <BUFFALO Optical Drive, class 0/0, rev 2.00/2.00, addr 20> on usbus0
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1 at umass-sim1 bus 1 scbus5 target 0 lun 0
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: <BUFFALO Optical Drive 2.00> Removable CD-ROM SCSI device
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: Serial Number 303042323031343033313834
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: 40.000MB/s transfers
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: 440MB (225377 2048 byte sectors)
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: quirks=0x10<10_BYTE_ONLY>
^C
%

Not detected, by KDE Plasma, as removable devices.

Usable with applications such as VLC media player:

2022-01-31 07-17-08.png 1643614962434.png
 
Log in as root, after the device is mounted or not. Do a "mount", to see whether and where the CD or DVD is mounted. If it is not mounted, debug why not. Educated guess: non-privileged user tried to do the mount (perhaps through their desktop environment automatically), but the device is not readable/writeable by them (the "660" in your devfs.conf makes that likely).

If it is mounted, verify that the correct file system type is in use for it. Do a "df", to see how many files and bytes are on it. Do a "ls -l" on the mount point and directories underneath, to check the permissions.
 
Welcome to FreeBSD Forums.
  1. <https://www.freshports.org/multimedia/vlc/#add> add VLC media player
  2. use the Open Disc… menu
  3. ? Audio CD
  4. Play
Do you get the error pictured below?

View attachment 12799 View attachment 12800

Pictured above, I have problems with an integral optical drive, tray-loading HP DVDRAM GT80N. No playback, VLC ceases to respond, I kill it. The same if I select /dev/cd0 before attempting playback.

The same audio CDs are fine in an external Blu-ray drive:

Code:
% tail -f -n 0 /var/log/messages
Jan 31 07:36:16 mowa219-gjp4-8570p-freebsd kernel: ugen0.5: <BUFFALO Optical Drive> at usbus0
Jan 31 07:36:16 mowa219-gjp4-8570p-freebsd kernel: umass1 on uhub0
Jan 31 07:36:16 mowa219-gjp4-8570p-freebsd kernel: umass1: <BUFFALO Optical Drive, class 0/0, rev 2.00/2.00, addr 20> on usbus0
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1 at umass-sim1 bus 1 scbus5 target 0 lun 0
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: <BUFFALO Optical Drive 2.00> Removable CD-ROM SCSI device
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: Serial Number 303042323031343033313834
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: 40.000MB/s transfers
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: 440MB (225377 2048 byte sectors)
Jan 31 07:36:29 mowa219-gjp4-8570p-freebsd kernel: cd1: quirks=0x10<10_BYTE_ONLY>
^C
%

Not detected, by KDE Plasma, as removable devices.

Usable with applications such as VLC media player:

View attachment 12801 View attachment 12802
I don't see that error with VLC. What it does instead is that it lists the tracks on the CD, but doesn't play them. It goes down the list of tracks, stays on it for second without playing any sound, and then goes to the next track until it reaches the last one. I tried installing another media player, Amarok, to see if this was a bug specific to VLC, but Amarok doesn't seem to see the CD at all...

ralphbsz said:
Log in as root, after the device is mounted or not. Do a "mount", to see whether and where the CD or DVD is mounted. If it is not mounted, debug why not. Educated guess: non-privileged user tried to do the mount (perhaps through their desktop environment automatically), but the device is not readable/writeable by them (the "660" in your devfs.conf makes that likely).
If it is mounted, verify that the correct file system type is in use for it. Do a "df", to see how many files and bytes are on it. Do a "ls -l" on the mount point and directories underneath, to check the permissions.
I did a mount through su root and found that the CD is indeed mounted on /media/cd0. As root, I ran df /dev/cd0 and got this:
Code:
Filesystem 1K-blocks   Used Avail Capacity  Mounted on
/dev/cd0      380812 380812     0   100%    /media/cd0
ls -l /media/cd0
Code:
total 0
ls -l /media
Code:
total 2
drwxrwxrwx  2 root  wheel  2048 Dec 13  2017 cd0

I'm not entirely sure what I'm looking for here when it comes to checking permissions, I have to say.
 
is this a mixed audio/data cd ?
you don't mount an audio cd (or so it used to be when i had a cd drive)
it also does not have 2048 byte sectors
 
is this a mixed audio/data cd ?
you don't mount an audio cd (or so it used to be when i had a cd drive)
it also does not have 2048 byte sectors
Sorry about that. I'm trying most of this on a data CD, but for the media player testing, I switched to an audio CD. The data CD is what was in the tray when I ran mount
Your user have to be in the operator group to access devices like /dev/cd0.

If your CD is an Audio-CD or DVD you dont need to mount them.
I ran pw groupshow operator and both my user and root are in the operator group. Here's the output, my user being "brcol":
Code:
operator:*:5:root,brcol
 
An update on my situation:
I found a Debian installation CD and found that FreeBSD not only mounts it, but can even list the files that are on it! I put my troublesome data disc into another computer running Windows and found that everything popped up just fine. I thought that I'd post a file -s so that maybe someone could help me figure out what the difference between them is and what I need to do to please FreeBSD enough to open the one I need:
Xerox Driver Data Disc
Code:
/dev/cd0: ISO 9660 CD-ROM filesystem data 'VLC400'

Debian 11.2.0 Installation CD
Code:
/dev/cd0: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Debian 11.2.0 amd64 n' (bootable)
 
try
dd if=/dev/cd0 bs=2k |tar tf -
The console's output produced a single period. The LED on the disc drive has been blinking for a while, but I didn't hear any activity. Eventually, I got:
Code:
dd: /dev/cd0: Invalid argument
190406+0 records in
190406+0 records out
389951488 bytes transferred in 386.299496 secs (1009454 bytes/sec)

If it helps, I also tested this on the installation disc to see what's supposed to happen. While it seems to have successfully completed the transfer, this line showed up right before the end:
Code:
dd: /dev/cd0: Device not configured
 
weird if only "." display after 200k blocks
Code:
dd bs=2k count=100 if=/extra/fs/netboot/13/mfbsd.iso |tar tf -
.
boot
boot/defaults
boot/defaults/loader.conf
boot/kernel
boot/kernel/ahci.ko
boot/kernel/kernel.gz
tar: Truncated input file (needed 12271616 bytes, only 14336 available)100+0 records in
100+0 records out

204800 bytes transferred in 0.003385 secs (60495281 bytes/sec)
tar: Error exit delayed from previous errors.
 
I'm experiencing the same cd0 recognition issue.

After installing a fresh 13.0-Release, and experiencing the error when trying to burn an .iso image of 13.0-Release, the following error message has haunted me.
I have read and carried out all the suggestion offered here on the forum, that give the correct permissions, and found the cd0 drive listed in the dmesg. However, the drive is not recognized by either xfburn or brasero. And, yes I have a new DVD-RW 4.7 Verbatim Disk in the drive. Any thoughts by more experienced BSD'rs will be greatly appreciated.


(cd0:ahcich4:0:0:0): SCSI status: Check Condition
(cd0:ahcich4:0:0:0): SCSI sense: Deferred error: MEDIUM ERROR asc:11,5 (L-EC uncorrectable error)
(cd0:ahcich4:0:0:0): Retrying command (per sense data)

Here is additional information from the dmesg listing:

cd0 at ahcich4 bus 0 scbus4 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GH24NSC0 LY00> Removable CD-ROM SCSI device
cd0: Serial Number KMUK5E83725
cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes)
cd0: 0MB (1 0 byte sectors)

Unnamed CD/DVD Drive is a message when using Brasero.
 
Back
Top