Bug 206669 - Mounting CD/DVD media with "/" in volume label
Mounting CD/DVD media with "/" in volume label
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gnome-mount (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
: Reopened
Depends On:
Blocks: FC6Target
  Show dependency treegraph
 
Reported: 2006-09-15 12:26 EDT by Aleksandar Milivojevic
Modified: 2013-03-05 22:46 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.5-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-12 13:31:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output of lshal command (38.76 KB, text/plain)
2006-10-03 16:07 EDT, Aleksandar Milivojevic
no flags Details
Content of /etc/fstab file (760 bytes, text/plain)
2006-10-03 16:08 EDT, Aleksandar Milivojevic
no flags Details
Output of lshal (43.75 KB, text/plain)
2006-10-03 16:39 EDT, Aleksandar Milivojevic
no flags Details
hald --verbose=yes (12.25 KB, text/plain)
2006-10-06 09:31 EDT, Aleksandar Milivojevic
no flags Details

  None (edit)
Description Aleksandar Milivojevic 2006-09-15 12:26:44 EDT
Description of problem:
If CD/DVD media has "/" in name, like for example RHEL5beta1 media ("RHEL/5 i386
DVD"), it will blindly try to use that name for mount point under /media.

** (gnome-mount:1908): WARNING **: Mount failed for
/org/freedesktop/Hal/devices/volume_label_RHEL/5_i386_DVD
org.freedesktop.Hal.Device.Volume.InvalidMountpoint : The mountpoint is invalid.


** (gnome-mount:1908): WARNING **: Given mount point name 'RHEL/5 i386 DVD' was
invalid, trying without this...
Mounted /dev/hda at "/media/disk"


Better approach would be to check for "bad" chars in volume label and replace
them with something else ("_" sounds like good choice).

Interesthing thing to note is that if I create CD with volume label "../usr", it
will change "/" to "_", and try to mount it at ".._usr" (and fail, for whatever
reason):

** (gnome-mount:2242): WARNING **: Mount failed for
/org/freedesktop/Hal/devices/volume_label____mnt
org.freedesktop.Hal.Device.Volume.InvalidMountpoint : The mountpoint is invalid.


** (gnome-mount:2242): WARNING **: Given mount point name '.._mnt' was invalid,
trying without this...
Mounted /dev/hda at "/media/disk"


So there is some code to handle "nasty" labels.  It's just that it isn't kicking
in in some cases.  Also, at various points, it considers different characters to
be "nasty".  At one place it replaced "../mnt" with "___mnt", at another it
replaced it with ".._mnt".  However, it hadn't handled "/" in "RHEL/5" from the
first example, although it was replacing spaces with "_".  Hmmm...

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 John (J5) Palmieri 2006-09-15 13:08:36 EDT
We need to filter out slashes
Comment 5 David Zeuthen 2006-09-26 13:54:05 EDT
Hi, please try with hal-0.5.8 and gnome-mount 0.5 available from here

 http://people.freedesktop.org/~david/hal-0.5.8.1-fc6/

Thanks. (built for FC6 but should work on RHEL5 too)
Comment 6 David Zeuthen 2006-09-27 16:13:40 EDT
Should be fixed in hal 0.5.8.1-2 / gnome-mount 0.5-2 otherwise please reopen.
Comment 7 Aleksandar Milivojevic 2006-10-03 15:49:18 EDT
Hi,

Sorry for taking a bit longer to test things.

I'd like to reopen this bug report, but for whatever reason system doesn't let
me to do so.

I've downloaded and installed gnome-mount-0.5-0davidz1 and hal-0.5.8.1-0davidz1.
 After installation, gnome-mount doesn't mount RHEL5b1 installation DVD at all
(the old version at least mounted it).

If I just use plain old mount command (something like "mount -r /dev/cdrom
/mnt"), it mounts the installation DVD.

The error message is:

# gnome-mount --text --device /dev/cdrom
gnome-mount 0.5
X display not available - using text-based operation.
Resolved device file /dev/cdrom -> /dev/hda
libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was
not set.

** (gnome-mount:1900): WARNING **: Given device '/dev/hda' is not a volume or a
drive.
Comment 8 David Zeuthen 2006-10-03 15:55:41 EDT
What is the output of lshal with a disc in the drive?
Comment 9 David Zeuthen 2006-10-03 16:01:59 EDT
Also, what's the content of your /etc/fstab file?
Comment 10 Aleksandar Milivojevic 2006-10-03 16:07:39 EDT
Created attachment 137691 [details]
Output of lshal command
Comment 11 Aleksandar Milivojevic 2006-10-03 16:08:45 EDT
Created attachment 137692 [details]
Content of /etc/fstab file
Comment 12 David Zeuthen 2006-10-03 16:17:04 EDT
Ah, right! Please try the hal available in rawhide, here

 http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/os/Fedora/RPMS/hal-0.5.8.1-2.fc6.i386.rpm

There was a regression in that RPM as noted in this comment

 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207715#c5

This is fixed in the latest hal rawhide which will also be in RHEL5.
Comment 13 Aleksandar Milivojevic 2006-10-03 16:38:29 EDT
I've downloaded the new RPM, however still getting erorrs.  The error message is
different now.  The output of lshal also differs now (I'll attach new lshal
output shortly).

# gnome-mount --text --device /dev/cdrom
gnome-mount 0.5
X display not available - using text-based operation.
Resolved device file /dev/cdrom -> /dev/hda
libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was
not set.

** (gnome-mount:1864): WARNING **: Mount failed for
/org/freedesktop/Hal/devices/volume_part_1_size_2459009024
org.freedesktop.DBus.Error.UnknownMethod : Method "Mount" with signature "ssas"
on interface "org.freedesktop.Hal.Device.Volume" doesn't exist
Comment 14 Aleksandar Milivojevic 2006-10-03 16:39:49 EDT
Created attachment 137695 [details]
Output of lshal

This one uses hal-0.5.8.1-2.fc6
Comment 15 David Zeuthen 2006-10-03 17:07:37 EDT
Interesting, thanks. What's the output of "/lib/udev/vol_id /dev/hda" with the
disc inserted?
Comment 16 Aleksandar Milivojevic 2006-10-04 12:38:41 EDT
The output is:

# /lib/udev/vol_id /dev/hda
ID_FS_USAGE=filesystem
ID_FS_TYPE=iso9660
ID_FS_VERSION=
ID_FS_UUID=
ID_FS_LABEL=RHEL/5 i386 DVD
ID_FS_LABEL_SAFE=RHEL5_i386_DVD
Comment 17 David Zeuthen 2006-10-04 13:01:23 EDT
Right. This looks related to

 http://lists.freedesktop.org/archives/hal/2006-September/006261.html

I'll try to fix this today, problem is that I can't reproduce it. I suppose I
could burn the RHEL5beta1 DVD.

Stay tuned and I'll have an RPM ready for you to test. Thanks.
Comment 18 David Zeuthen 2006-10-05 12:23:51 EDT
Can you try these packages please (they will be part of FC6 and RHEL5)

 http://people.freedesktop.org/~david/hal-0.5.8.1-4.fc6/

Thanks.
Comment 19 Aleksandar Milivojevic 2006-10-05 16:38:12 EDT
I've rebuilt the RPMs (my system is i386), and basically got the same errors again:

# gnome-mount --device=/dev/cdrom
gnome-mount 0.5
X display not available - using text-based operation.
Resolved device file /dev/cdrom -> /dev/hda
libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was
not set.

** (gnome-mount:1931): WARNING **: Mount failed for
/org/freedesktop/Hal/devices/volume_part_1_size_2459009024
org.freedesktop.DBus.Error.UnknownMethod : Method "Mount" with signature "ssas"
on interface "org.freedesktop.Hal.Device.Volume" doesn't exist
Comment 20 David Zeuthen 2006-10-05 17:15:18 EDT
Hmm.. very weird.. Can you try this

 remove optical disc

 # /etc/init.d/haldaemon stop
 # /usr/sbin/hald --daemon=no --verbose=yes

 (lots of debug output..)

 insert disc

 (some debug output will appear)

and paste the debug output that appeared after inserting the disc? Thanks.
Comment 21 Aleksandar Milivojevic 2006-10-06 09:31:48 EDT
Created attachment 137913 [details]
hald --verbose=yes
Comment 22 David Zeuthen 2006-10-12 13:31:32 EDT
Sorry for not responding earlier. 

OK, so HAL is not crashing anymore on this disc. I did find this piece of
information

[8231]: 08:31:51.037 [D] probe-volume.c:543: volume_session_count = 2
[8231]: 08:31:51.041 [D] probe-volume.c:551: last session starts at block = 1151849

which leads me to think that you have burned the disc wrongly, e.g. there is a
trailing session without any data. And according to how multi session discs
work, HAL is doing the right thing here, e.g. it's looking at the latest session. 

So I'm closing this as NOTABUG. Feel free to reopen / ask questions here if I
need to elaborate. Thanks.

Comment 23 Aleksandar Milivojevic 2006-10-12 16:09:22 EDT
First one thing that is easy to fix.  gnome-mount --eject attempts to execute
/usr/sbin/eject.  Path is wrong.  It should be /usr/bin/eject.

Back to the original problem.

The disc was burned with Nero, which happens to default to burning multisession.
 I forgot to instruct it to burn single session disc, so I clicked "close DVD"
after it was burned.  Looking at the disc, yes there are two sessions.  First
containst the acutall ISO image.  The seccond is just a dummy session containing
single 1 MB track that was recorded in order to "close" the disc.

I don't know if this comforms 100% to the standards.  I'm definitely not an
expert in this area.  However, hal/gnome-mount is about the only thing having
trouble with this disc.  Given the popularity of Nero, I'd guess there might be
bunch of discs like this floating around.  Which means trouble to the end-users
regardless of correctness of what Nero is doing.  I'd even argue that HAL is not
doing the right thing here.  It should have ignored the dummy session at the end
of DVD (like everything else is ignores it).  If using the dummy session is
allowed as a way to force closing of a disc (without burning additional real
session), than Nero is probably not the only thing out there producing such discs.

Now comes the twist.  If I burn second RHEL5beta1 DVD as single-session, mount
it using gnome-mount, eject it, and than insert the closed multisession disc I
had trouble with, gnome-mount all the sudden mounts it just fine.  Until machine
is rebooted.
Comment 24 David Zeuthen 2006-10-12 16:21:33 EDT
Re /usr/bin/eject and /usr/sbin/eject that is "fixed" in later builds, see bug
209866. 

(the real problem, of course, is 1) usermode instead of hal; and 2) Fedora
deviating (which is broken but beyond my control) from other distros in using
usermode for eject.

Whether hal/gnome-mount or Nero is broken is an interesting question. 

FWIW, discs burned on Windows XP SP2 and Linux works just fine for me when
leaving the disc open. 

From my recollection of the various standards it looks like Nero is doing
something wrong, I'd take it up with those guys or at least ask them about it. 

It's probably a good idea to add some kludges to HAL to try to probe earlier
sessions if the latter one doesn't contain a valid iso9660 file system. I've
added that to HAL's TODO list upstream, see

 http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=f46e98cc95db3c5256caef3a5b3022b35e8fb7f9

for details. Anyway, this is probably not going to happen for FC6 / RHEL5.
Thanks for the investigation though.
Comment 25 David Zeuthen 2006-10-12 16:23:37 EDT
I meant bug 208979 - not bug 209866. Sorry.

Note You need to log in before you can comment on or make changes to this bug.