# CD-Roms don't mount

## Featherfoot

I am running system 3.7.10-gentoo-r1 on an amd64 system. I just received a CD with jpg files on it and they wouldn't mount and the /mnt and /media directories don't show any volumes.

I dual boot with kubuntu so I booted into that system and the CD mounted just fine on "/media/New Volume".

I'm puzzled by this because in other times, CD's mounted just fine.

emerge --info follows:

bopper grub.d # emerge --info

Portage 2.1.11.62 (default/linux/amd64/13.0/desktop, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo-r1 x86_64)

=================================================================

System uname: Linux-3.7.10-gentoo-r1-x86_64-AMD_Phenom-tm-_II_X4_970_Processor-with-gentoo-2.2

KiB Mem:     4044828 total,   1516580 free

KiB Swap:    1021948 total,   1021948 free

Timestamp of tree: Thu, 25 Apr 2013 20:00:01 +0000

ld GNU ld (GNU Binutils) 2.22

app-shells/bash:          4.2_p37

dev-java/java-config:     2.1.12-r1

dev-lang/python:          2.7.3-r3, 3.1.5-r1, 3.2.3-r2

dev-util/cmake:           2.8.9

dev-util/pkgconfig:       0.28

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.11.8

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.10.3, 1.11.6, 1.12.6

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.6.3

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.7 (virtual/os-headers)

sys-libs/glibc:           2.15-r3

Repositories: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LANG="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="3dnow X Xaw3d a52 aac aalib acl acpi aim alsa amd64 ao apache2 apm audiofile avahi berkdb blas bluetooth branding bzip2 cairo calendar caps cdda cddb cdinstall cdparanoia cdr cgi clamav cli consolekit cracklib crypt css ctype cups curl cvs cxx dbi dbm dbus dbx dga directfb dri dts dv dvb dvd dvdr eds emboss encode enscript evo examples exif expat fam fastcgi fbcon firefox flac fontconfig foomaticdb fortran ftp gcj gdbm gif gimp glu gmp gnome gnuplot gnutls gphoto2 gpm graphviz gsl gsm gstreamer gtk gtkhtml guile gzip hal handbook hddtemp iconv icq icu idn ieee1394 imagemagick imlib innodb introspection iodbc ipv6 jabber java java6 javascript jbig jingle jpeg jpeg2k kde kontact lapack lcms ldap libcaca libedit libgda libnotify libwww lm_sensors lua lzma lzo mad maildir mikmod milter mime mmap mmx mng modules motif mozilla mp3 mp4 mpeg mpi mplayer msn mudflap multilib musepac mysql mysqli nas ncurses networkmanager nls nntp nptl nsplugin odbc offensive ofx ogg opengl openmp osc oscar oss pam pango pch pcntl pcre pdf perl php plasma plotutils png policykit portaudio posix postgres ppds pulseaudio python qt3support qt4 quicktime raw rdesktop readline rss ruby samba sasl sdl semantic-desktop session sharedext sharedmem simplexml smp sndfile snmp soap sockets socks5 speex spell sqlite sqlite3 sse sse2 ssl startup-notification subversion suid svg symlink syslog sysvipc szip tcl tcpd theora threads tidy tiff timiditytk tokenizer truetype udev udisks unicode upower usb v4l v4l2 vcd vorbis wmf wxwidgets x264 xcb xcomposite xft xine xinerama xinetd xml xnlrpc xosd xv xvid yahoo zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" XFCE_PLUGINS="brightness menu trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

bopper grub.d # 

----------

## Featherfoot

Some additional information:

I rebooted with the CD in the drive and it opened when I booted up and logged into KDE. I used the KDE device notifier to remove the CD successfully. 

I was not able to get the drive door open until I rebooted. When I did reboot, the drive door opened but the system did not recognize the drive.

Flash drives do mount successfully. My Passport USB drive also opens correctly.

----------

## Featherfoot

Anybody?

----------

## umka69

try this:

```

# mkdir /mnt/cdrom

# mount iso9660 /dev/cdrom /mnt/cdrom

```

if it helps just config you cdrom line of /etc/fstab in this way:

```

/dev/cdrom              /mnt/cdrom      iso9660         noauto,ro,user  0 0

```

----------

## Featherfoot

Mounting it manually works!

It seems as if the system is happier if, instead of "iso5660", it is mounted with "auto" in fstab.

I have to be root to mount the DVD. It does not unmount automatically and I have to be root.

I tried changing the ownership of /dev/cdrom. That didn't work. Nor could I change the ownership of /mnt/cdrom, /dev/sr0 is owned by root:cdrom.

c@bopper /etc/portage $ ls -al /dev/cdrom

lrwxrwxrwx 1 root root 3 May  4 15:14 /dev/cdrom -> sr0

jc@bopper /etc/portage $ ls -al /dev/sr0

brw-rw----+ 1 root cdrom 11, 0 May  4 15:14 /dev/sr0

jc@bopper /etc/portage $ ls -al /mnt/cdrom

total 10

dr-xr-xr-x 4 nobody nobody  136 Oct  3  2003 .

drwxrwxrwx 4 root   root   4096 Nov 17  2010 ..

drwxrwxrwx 2 nobody nobody   40 Oct  3  2003 AUDIO_TS

dr-xr-xr-x 2 nobody nobody 1132 Oct  3  2003 VIDEO_TS

So I am still puzzled why it doesn't mount correctly after doing so for so long...

----------

## umka69

try to add a user to the cdrom group

just add the username to "cdrom:x:19: ... " line. It is in /etc/group file.

----------

## Featherfoot

I used kuser to add it in and it worked. My username is in the file already.

----------

## VoidMage

 *Featherfoot wrote:*   

> I used kuser to add it in and it worked. My username is in the file already.

 

Just out of curiosity, given the appended '+', what did 'getfacl' print on the device node ?

Cause it looks like those group changes should have been unnecessary.

Also, VIDEO_TS/AUDIO_TS would suggest it's a movie DVD, so the filesystem is invalid anyway.

----------

## Featherfoot

opper etc # getfacl /dev/sr0

getfacl: Removing leading '/' from absolute path names

# file: dev/sr0

# owner: root

# group: cdrom

user::rw-

user:jc:rw-

group::rw-

mask::rw-

other::---

Here's a CD full of jpg files:

jc@bopper /etc $ ls -al /dev/cdrom

lrwxrwxrwx 1 root root 3 May  4 19:30 /dev/cdrom -> sr0

@bopper /etc $ ls -al /dev/sr0

brw-rw----+ 1 root cdrom 11, 0 May  4 19:30 /dev/sr0

c@bopper /etc $ getfacl /dev/cdrom

getfacl: Removing leading '/' from absolute path names

# file: dev/cdrom

# owner: root

# group: cdrom

user::rw-

user:jc:rw-

group::rw-

mask::rw-

other::---

jc@bopper /etc $ mount /mnt/cdrom

mount: /dev/sr0 is write-protected, mounting read-only

jc@bopper /etc $ ls -al /mnt/cdrom

total 4231

dr-xr-xr-x 1 root root   2048 Dec 31  1969 .

drwxrwxrwx 4 root root   4096 Nov 17  2010 ..

-r-xr-xr-x 1 root root 435159 Apr 14 13:54 Anna and John 107.jpg

-r-xr-xr-x 1 root root 440181 Apr 14 13:54 Anna and John 108.jpg

-r-xr-xr-x 1 root root 439166 Apr 14 13:54 Anna and John 109.jpg

-r-xr-xr-x 1 root root 424839 Apr 14 13:54 Anna and John 110.jpg

-r-xr-xr-x 1 root root 440734 Apr 14 13:54 Anna and John 111.jpg

-r-xr-xr-x 1 root root 446504 Apr 14 13:54 Anna and John 112.jpg

-r-xr-xr-x 1 root root 430901 Apr 14 13:54 Anna and John 113.jpg

-r-xr-xr-x 1 root root 420147 Apr 14 13:54 Anna and John 114.jpg

-r-xr-xr-x 1 root root 418680 Apr 14 13:54 Anna and John 115.jpg

-r-xr-xr-x 1 root root 427528 Apr 14 13:54 Anna and John 116.jpg

jc@bopper /etc $ 

I still have to manually mount the CD.

----------

## Featherfoot

Any  thoughts on what to do to make CD's automount like they are supposed to?

----------

## kurly

"Like they are supposed to"?  What software do you have installed to handle automatic mounting of CDs?  

You don't appear to actually have any problem at all mounting CDs, which may be why you are having trouble attracting interest in replying to the thread.  Your issue seems to be related to automatically mounting CDs.

----------

## VoidMage

Output of getfacl shows, that those moves on groups were most likely unnecessary - the permissions were already correct.

Next step to test would be udisks.

Depending on what the KDE component was built against, check if 'udisks -mount'/'udisksctl mount' is able to mount the disc with a filesystem.

----------

## Featherfoot

udisks worked:

bopper LibreCAD # udisks --mount /dev/sr0

Mounted /org/freedesktop/UDisks/devices/sr0 at /mnt/cdrom

udisksctl worked:

bopper LibreCAD # udisksctl mount --block-device /dev/sr0

Mounted /dev/sr0 at /mnt/cdrom.

bopper LibreCAD # 

----------

## VoidMage

What are the values in /sys/module/block/parameters/events_dfl_poll_msecs and /sys/block/sr0/events_poll_msecs ?

Also, that question about " What software do you have installed to handle automatic mounting of CDs" might be valid.

Your posts suggest you're using KDE, but be more specific on how complete it is.

----------

## Featherfoot

# cat /sys/module/block/parameters/events_dfl_poll_msecs

0

cat /sys/block/sr0/events_poll_msecs

-1

I should have been more precise:

When I insert a DVD or CD in the player, it does not show up as a file system in /mnt/cdrom unless I explicitly mount it. It seems to be inconsistent whether I can see files if "ls /dev/cdrom" at that time. Sometimes I have to use the KDE device notifier and press the  Open it with the File Manager "button" and then it will show the files.

My experience is that the mount used to happen automatically.

I was using the KDE Device Notifier that lets you perform various actions when a CD/DVD is inserted. It seems as if once it detects that the DVD has been mounted, the notifier opens to give you a selection of actions that can be performed with the device. I was using that to show that the system had recognized the presence of the CD/DVD.

----------

## VoidMage

 *Featherfoot wrote:*   

> 
> 
> ```
> # cat /sys/module/block/parameters/events_dfl_poll_msecs
> 
> ...

 

That's wrong. Did you mess up your udev rules ?

It should be set to a sane (>0) value - udev, if unset, sets it to 2000 (at least udev 200 still did).

----------

## Featherfoot

Can I just put the value somewhere, or is there a defaults file somewhere?

I haven't touched any udev settings, except that there was a fleeting "equery news" article and a follow-up article about configuring udev.  It said something about old versions of the 70* rules causing trouble. I experimented with renaming these files out of /etc/udev and found that was the only one that "70-persistent-net.rules" that could be renamed with no trouble.

----------

## Featherfoot

I set /sys/module/block/parameters/events_dfl_poll_msecs to 2000 as you suggested and my test CD mounted without me having to do anything special.

I think the question about how to make the change permanent very much applies.

----------

## VoidMage

Well, this particular rule should be in /lib/udev/rules.d/60-persistent-storage.rules under "enable in-kernel media-presence polling" comment.

That's where it is in udev 200.

----------

## Featherfoot

You mean these lines?

# enable in-kernel media-presence polling

ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", ATTR{parameters/events_dfl_poll_msecs}="2000"

I also note this line at the beginning of the file:

# do not edit this file, it will be overwritten on update

Am I the only person who is still using CD's?

I wonder how they manage to stay zero. This is an amd64 system.

----------

## VoidMage

Do you have any other files named 60-persistent-storage.rules in the dirs, udev reads ?

Cause that's the rule, so it looks like it's not getting applied for some reason.

----------

## Featherfoot

The only one is in /lib/udev/rules.d.

I agree that it looks like it isn't being read.

----------

## Featherfoot

I modified the 60-persistent-storage.rules  as follows:

# enable in-kernel media-presence polling

ACTION=="add", SUBSYSTEM=="module", KERNEL=="block",  ATTR{parameters/events_dfl_poll_msecs}="2000"

I don't see any error messages but it still didn't automount the CD.

----------

