Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317185 - mount -t auto /dev/cdrom /mnt/cdrom fails, but mount -t iso9660 succeeds
Summary: mount -t auto /dev/cdrom /mnt/cdrom fails, but mount -t iso9660 succeeds
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-25 22:57 UTC by vik
Modified: 2010-04-28 02:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
strace of mount command (mount_strace.txt,17.40 KB, text/plain)
2010-04-27 01:44 UTC, vik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vik 2010-04-25 22:57:01 UTC
"mount -t auto /dev/cdrom /mnt/cdrom" fails, but "mount -t iso9660 /dev/cdrom /mnt/cdrom" succeeds for a multi-session DVD I burned using Roxio on Windows.  I believe the problem is due to mount not understanding the file type, so it fails in dmesg with this:
[   23.104322] sr 1:0:0:0: [sr0] Unhandled sense code
[   23.104324] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   23.104326] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   23.104329] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   23.104331] end_request: I/O error, dev sr0, sector 8657392
[   23.104333] Buffer I/O error on device sr0, logical block 1082174
[   30.100360] sr 1:0:0:0: [sr0] Unhandled sense code
[   30.100361] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   30.100363] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   30.100365] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   30.100367] end_request: I/O error, dev sr0, sector 8657392
[   30.100369] Buffer I/O error on device sr0, logical block 1082174
[   40.695615] sr 1:0:0:0: [sr0] Unhandled sense code
[   40.695618] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   40.695620] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   40.695622] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   40.695624] end_request: I/O error, dev sr0, sector 8657392
[   40.695627] Buffer I/O error on device sr0, logical block 1082174
[   51.450253] sr 1:0:0:0: [sr0] Unhandled sense code
[   51.450256] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   51.450258] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   51.450261] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   51.450263] end_request: I/O error, dev sr0, sector 8657392
[   51.450265] Buffer I/O error on device sr0, logical block 1082174 

If I tell mount that the DVD is an iso9660, it succeeds and everything works as expected.  Also, if I add this in my /etc/fstab:
/dev/cdrom              /mnt/cdrom      iso9660,udf     noauto,users    0 0 
KDE device notifier works as expected.  If possible, can you change the behavior of mount to try to mount CDs and DVDs as iso9660 first, then UDF?

Reproducible: Always

Steps to Reproduce:
1. Burn a DVD in Roxio (on Windows) on a session using UDF and leave DVD open.
2. Now burn another file on another session using UDF and leave DVD open.
3. Try to open DVD in Gentoo with KDE device notifier or manually mount with "-t auto".

Actual Results:  
This error in dmesg:
[   23.104322] sr 1:0:0:0: [sr0] Unhandled sense code
[   23.104324] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   23.104326] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   23.104329] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   23.104331] end_request: I/O error, dev sr0, sector 8657392
[   23.104333] Buffer I/O error on device sr0, logical block 1082174
[   30.100360] sr 1:0:0:0: [sr0] Unhandled sense code
[   30.100361] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   30.100363] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   30.100365] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   30.100367] end_request: I/O error, dev sr0, sector 8657392
[   30.100369] Buffer I/O error on device sr0, logical block 1082174
[   40.695615] sr 1:0:0:0: [sr0] Unhandled sense code
[   40.695618] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   40.695620] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   40.695622] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   40.695624] end_request: I/O error, dev sr0, sector 8657392
[   40.695627] Buffer I/O error on device sr0, logical block 1082174
[   51.450253] sr 1:0:0:0: [sr0] Unhandled sense code
[   51.450256] sr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
[   51.450258] sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]
[   51.450261] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x5
[   51.450263] end_request: I/O error, dev sr0, sector 8657392
[   51.450265] Buffer I/O error on device sr0, logical block 1082174 


Expected Results:  
ls /mnt/cdrom shows contents of DVD, or opening Dolphin shows contents of DVD.

The software needs to try iso9660 first then other types for CDs and DVDs.
Comment 1 vik 2010-04-25 22:59:49 UTC
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r10 x86_64)                                                                
=================================================================               
System uname: Linux-2.6.31-gentoo-r10-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-1.12.13                                                             
Timestamp of tree: Sat, 24 Apr 2010 15:00:01 +0000                              
app-shells/bash:     4.0_p37                                                    
dev-java/java-config: 2.1.10                                                    
dev-lang/python:     2.6.4-r1                                                   
dev-util/cmake:      2.6.4-r3                                                   
sys-apps/baselayout: 1.12.13                                                    
sys-apps/sandbox:    1.6-r2                                                     
sys-devel/autoconf:  2.13, 2.63-r1                                              
sys-devel/automake:  1.9.6-r3, 1.11.1                                           
sys-devel/binutils:  2.18-r3                                                    
sys-devel/gcc:       4.3.4                                                      
sys-devel/gcc-config: 1.4.1                                                     
sys-devel/libtool:   2.2.6b                                                     
virtual/os-headers:  2.6.30-r1                                                  
ACCEPT_KEYWORDS="amd64"                                                         
ACCEPT_LICENSE="* -@EULA"                                                       
CBUILD="x86_64-pc-linux-gnu"                                                    
CFLAGS="-march=native -O2 -pipe"                                                
CHOST="x86_64-pc-linux-gnu"                                                     
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"                      
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"   
CXXFLAGS="-march=native -O2 -pipe"                                              
DISTDIR="/usr/portage/distfiles"                                                
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"                 
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://mirror.usu.edu/mirrors/gentoo/"                                                                     
LDFLAGS="-Wl,-O1"                                                               
MAKEOPTS="-j4"                                                                  
PKGDIR="/usr/portage/packages"                                                  
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acl acpi alsa amd64 bash-completion berkdb bindist branding bzip2 cairo cdr cli cracklib crypt cups cxx dbus dri dvd dvdr exif fortran gdbm gpm hal iconv jpeg jpeg2k kde mmx modules mudflap multilib ncurses nls nptl nptlonly nsplugin nvidia opengl openmp pam pcre perl png pppd python qt3support qt4 readline reflection scanner session smp spl sse sse2 ssl svg symlink sysfs tcpd threads tiff unicode vdpau xorg xvmc zlib" 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="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 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" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Rafał Mużyło 2010-04-25 23:31:03 UTC
What does i.e. blkid prints for such disk ?
Comment 3 SpanKY gentoo-dev 2010-04-26 00:00:58 UTC
also post as an attachment running the mount command through strace
Comment 4 vik 2010-04-27 01:33:29 UTC
(In reply to comment #2)
> What does i.e. blkid prints for such disk ?
> 
# blkid /dev/sr0
/dev/sr0: LABEL="Desktop_Backup_9_23_09" TYPE="udf"

Comment 5 vik 2010-04-27 01:44:00 UTC
Created attachment 229335 [details]
strace of mount command
Comment 6 SpanKY gentoo-dev 2010-04-27 04:53:39 UTC
if blkid detects a valid type, then it wont probe anything else.  this is the current expected behavior.

run `BLKID_DEBUG=0xffff blkid -c /dev/null /dev/sr0` and post the output as an attachment
Comment 7 vik 2010-04-28 02:44:10 UTC
(In reply to comment #6)
> if blkid detects a valid type, then it wont probe anything else.  this is the
> current expected behavior.
> 
> run `BLKID_DEBUG=0xffff blkid -c /dev/null /dev/sr0` and post the output as an
> attachment
> 

But blkid is detecting it as the wrong type, udf.  The right type is iso9660.

# BLKID_DEBUG=0xffff blkid -c /dev/null /dev/sr0
libblkid: debug mask set to 0xffff.                     
creating blkid cache (using /dev/null)                  
reading cache file /dev/null                            
need to revalidate /dev/sr0 (cache time 18446744071562067968, stat time 1272396482,                                                                             
        time since last check 3419905837)                                       
reseting blkid_probe                                                            
ready for low-probing, offset=0, size=4432592896                                
--> starting probing loop [idx=-1]                                              
linux_raid_member: call probefunc()                                             
ddf_raid_member: call probefunc()                                               
isw_raid_member: call probefunc()                                               
lsi_mega_raid_member: call probefunc()                                          
via_raid_member: call probefunc()                                               
silicon_medley_raid_member: call probefunc()                                    
nvidia_raid_member: call probefunc()                                            
promise_fasttrack_raid_member: call probefunc()                                 
highpoint_raid_member: call probefunc()                                         
adaptec_raid_member: call probefunc()                                           
jmicron_raid_member: call probefunc()                                           
udf: magic sboff=1, kboff=32                                                    
udf: call probefunc()                                                           
assigning LABEL                                                                 
assigning TYPE                                                                  
<-- leaving probing loop (type=udf) [idx=28]                                    
--> starting probing loop [idx=28]                                              
iso9660: magic sboff=1, kboff=32                                                
iso9660: call probefunc()                                                       
assigning LABEL                                                                 
assigning TYPE                                                                  
<-- leaving probing loop (type=iso9660) [idx=29]                                
--> starting probing loop [idx=29]                                              
ufs: call probefunc()                                                           
sysv: call probefunc()
<-- leaving probing loop (failed) [idx=49]
returning LABEL value
    creating new cache tag head LABEL
returning TYPE value
    creating new cache tag head TYPE
/dev/sr0: devno 0x0b00, type udf
reseting blkid_probe
/dev/sr0: LABEL="Desktop_Backup_9_23_09" TYPE="udf"
writing cache file /dev/null (really /dev/null)
device /dev/sr0, type udf
freeing cache struct
  freeing dev /dev/sr0 (udf)
  dev: name = /dev/sr0
  dev: DEVNO="0xb00"
  dev: TIME="1272422224"
  dev: PRI="0"
  dev: flags = 0x00000001
    tag: LABEL="Desktop_Backup_9_23_09"
    tag: TYPE="udf"

    freeing tag LABEL=Desktop_Backup_9_23_09
    tag: LABEL="Desktop_Backup_9_23_09"
    freeing tag TYPE=udf
    tag: TYPE="udf"
    freeing tag LABEL=(NULL)
    tag: LABEL="(null)"
    freeing tag TYPE=(NULL)
    tag: TYPE="(null)"