PDA

View Full Version : HOWTO: Fxed mount points for FC5 removable media



jcliburn
8th April 2006, 07:01 PM
With FC5, optical media (and other removable media) are now mounted to a mount point defined by the volume label of the media, such as /media/HAROLD_AND_KUMAR_GO_TO_WHITE_CASTLE if you install that particular movie in your DVD drive. This can cause problems with applications that expect a fixed mount point like /media/cdrecorder in order to work correctly.

This howto creates and activates a custom HAL rule to change the FC5 mounting behavior such that optical media are always mounted at /media/cdrecorder. We're not creating a static mount point; we're just instructing HAL to override the real volume name with something we want (and is under our control). While this howto illustrates mounting at /media/cdrecorder, the process for mounting /media/cdrom or /media/usb is similar; just create a separate fdi file (instructions below) for each device you want to mount this way.

NOTE: In order for this to work, you must remove any mount points under /media that you may have created that carry the same name as the mount point we're going to establish in this howto. For example, if I want my DVDs to mount at /media/cdrecorder, I can't have a static mount point (a directory) also called /media/cdrecorder.

Become root and start hal-device-manager. (It takes several seconds for hal-device-manager to come up. Be patient.)

$ su -
# /usr/bin/hal-device-manager
See the attached screenshots. In hal-device-manager, click the "Advanced" tab. Scroll down the left-hand pane (the Devices pane) and find your CD/DVD device. Click it. Now, in the Advanced pane, at the top (see the right-hand screenshot below) you'll see the "block.device" key of your DVD drive (mine is /dev/hdc). Make a note of it. Then in the same (Advanced) pane scroll down and find the "storage.model" key (see the left-hand screenshot below). Copy and paste the "Value" field to a safe place. You'll need it in a minute.

Close hal-device-manager.

Navigate to the HAL policy directory.

# cd /usr/share/hal/fdi/policy
# mkdir 95userpolicy
# cd 95userpolicy
# gedit optical.fdi
Edit optical.fdi to contain this. Where I've placed STORAGE.MODEL_HERE, paste the storage.model value you saved from hal-device-manager earlier. Change "block.device" to your device name (again, mine is /dev/hdc).

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/hdc">
<match key="@block.storage_device:storage.model" string="STORAGE.MODEL_HERE">
<merge key="volume.label" type="string">cdrecorder</merge>
</match>
</match>
</device>
</deviceinfo>Save the file.

If you have other devices you want to mount this way, just create a new fdi file for each one and customize it according to the block.device , storage.model, and volume.label tags. The filename is irrelevant, so long as you include the ".fdi" extension. HAL will process each fdi file it finds in the 95userpolicy directory.

Restart haldaemon.

# service haldaemon restart
Insert an optical disk. The label on the desktop will show up as "cdrecorder". You should also see /media/cdrecorder mounted now.

# ls -l /media/cdrecorder/
total 4
dr-xr-xr-x 2 4294967295 4294967295 40 Mar 18 14:44 AUDIO_TS
dr-xr-xr-x 2 4294967295 4294967295 508 Mar 18 14:44 VIDEO_TS
Congratulations, you're done.

Firewing1
8th April 2006, 07:23 PM
Excellent howto!
I have two drives, I want one /media/cdrecorded and other /media/cdrom -- Do I just add another XML entry to the optical.fdi file and make the corrections? (mountoint & model name)
Thanks!
Firewing1

jcliburn
8th April 2006, 07:25 PM
Excellent howto!
I have two drives, I want one /media/cdrecorded and other /media/cdrom -- Do I just add another XML entry to the optical.fdi file and make the corrections? (mountoint & model name)
Thanks!
Firewing1
I haven't tried it, but it seems like you'd be able to do that. Just add another <device> ... </device> stanza and populate everything between the keywords.

Alternatively, you could add another file. Instead of "optical.fdi" you could have "cdrecorder.fdi" and "cdrom.fdi". HAL *should* incorporate both.

Firewing1
8th April 2006, 07:29 PM
(Trying now... I'll let you know...)
And, if I wanted a static mountpoint but not a static disk label, I could just remove that line, right?
Firewing1

htinn
8th April 2006, 07:32 PM
Sweet. Would you happen to know how to eject the disc on the command line?

jcliburn
8th April 2006, 07:33 PM
(Trying now... I'll let you know...)
And, if I wanted a static mountpoint but not a static disk label, I could just remove that line, right?
Firewing1
I found that if I remove the volume.label rule, a video will mount at /media/VOLUME_NAME, not at /media/cdrecorder, so for me anyway, the volume.label rule is important.

Firewing1
8th April 2006, 07:35 PM
That's odd. Can't put two in one file and can't static mount with a dynamic label.
But, using two files (I did "optical1.fdi" and "optical2.fdi") worked well.
Firewing1

jcliburn
8th April 2006, 07:38 PM
Sweet. Would you happen to know how to eject the disc on the command line?
/usr/bin/eject

Firewing1
8th April 2006, 07:40 PM
eject /dev/hdx
or
eject /media/mountpoint
should work, too
Firewing1

jcliburn
8th April 2006, 07:40 PM
That's odd. Can't put two in one file and can't static mount with a dynamic label.
But, using two files (I did "optical1.fdi" and "optical2.fdi") worked well.
Firewing1
I'm no HAL expert, so I can't help. Sorry. I've been whacking on this damned thing for a week or more just trying to get it to where it is now. :-) Maybe someone else more knowledgeable than I will swoop in and set us all straight.

htinn
8th April 2006, 07:42 PM
Well, for some weird reason I can't get user mode eject to work:


umount: /media/cdrom is not in the fstab (and you are not root)
/usr/bin/eject: unmount of `/media/cdrom' failed

jcliburn
8th April 2006, 07:46 PM
One thing I found is that before the HAL rule would work, I had to remove the mount point (the directory) /media/cdrecorder that I had created manually during my early troubleshooting. I also removed the fstab entry for /media/cdrecorder.

jcliburn
8th April 2006, 07:48 PM
Well, for some weird reason I can't get user mode eject to work:
It doesn't work for me, either. I can eject as root from the command line, but not as a user. However, as a user I can eject from the desktop icon.

jcliburn
8th April 2006, 07:55 PM
Well, for some weird reason I can't get user mode eject to work:
Try this:

/usr/bin/gnome-mount -n -e -p cdrecorder

Firewing1
8th April 2006, 07:55 PM
Try
su -
eject /media/path
Firewing1

Botond
8th April 2006, 08:09 PM
Wow! http://forums.fedoraforum.org/forum/images/icons/icon14.gif

Just one more question: k3b is always complaining about "Malformed URL". How do I instruct k3b to use /media/cdrecorder for mount, umount, eject and load operations?

Firewing1
8th April 2006, 08:12 PM
Edit your k3b preferences (I think it's under "tools")
Firewing1

htinn
8th April 2006, 08:21 PM
Okay, I figured it out:

gnome-eject -d /dev/hdb

That seems to works in user mode. :)

htinn
8th April 2006, 08:23 PM
Try this:

/usr/bin/gnome-mount -n -e -p cdrecorder

Thanks. :)

Botond
8th April 2006, 10:14 PM
Edit your k3b preferences (I think it's under "tools")
Firewing1

And do you remember by chance how is the setting called? A looked at each setting one by one and didn't find anything useful. :(

jcliburn
9th April 2006, 01:49 AM
It occurred to me driving down the highway this afternoon that the HAL rule in this howto is doing nothing more than overriding the real volume name. There's no escaping that FC5 is going to mount removable media at /media/VOLNAME. The trick is making VOLNAME something the user wants it to be -- and the same thing every time, no matter what particular optical disk is inserted into the drive. Armed with this revelation, I modified the howto and tested it to confirm my theory. It worked.

Botond
9th April 2006, 09:29 AM
I read somewhere that there's a Fedora hack somewhere inside Gnome (maybe in gnome-volume-manager or gmone-mount) which mounts removable media at their volume names. The original idea came probably from Ubuntu.
But I'm not sure.

rshendershot
9th April 2006, 07:39 PM
k3b tries to umount /media/[volname] but the change to gnome-mount is a problem. I'm going to try aliasing umount to gnome-eject and see if that helps k3b. Great how-to! thanks.

jcliburn
9th April 2006, 08:27 PM
I've run into a problem with the howto: DVDShrink under Wine doesn't recognize the mount point. If I make a manual mount point at /media/cdrecorder, delete the fdi file, and restart haldaemon, I can manually mount the device to the mount point, then DVDShrink recognizes the drive.

Can anyone verify the howto actually helps?

htinn
12th April 2006, 06:41 PM
Two things to remember about Wine:

1) The tool "winecfg" has a bug with changing drives, and you may need to change the links manually using "ln -s /path/to x:" in the "~/.wine/dosdevices/" folder.

2) Some applications in Wine will not recognize that your CD drive is a CD drive unless you change "type" to "CD-ROM" (which is in the "Drives"/"Show Advanced" section of winecfg).

EDIT: Three things... :mad:

3) Make sure you have a disc in the drive before changing the "type" of drive (or the change you make in step 2 will not stick).

d_GeNeRiT
13th April 2006, 04:23 AM
Hello There,

I have followed your how-to because I am very interested in getting DVDShrink working under wine in FC5 the way it used to work in FC4.

I followed all the steps but after I go into winecfg and drives tab and after I map the path to the media/cdrecorder/

THen the next time I launch winecfg and I go to the drives tab the path to the DVD-RW drive is gone! Its like it is not saving the change.

Can u please advise what steps u took after the instructions on the how-to in order to get the DVD drive to appear in DVDShrink everytime?

I have been using vobcopy (command line tool) to copy the DVD to my hard drive and then shrinking it with DVDShrink under wine. I would like to be able to just use DVDShrink + k3b to perform the entire DVD copy procedure like I used to do back in FC4.

dwflo
13th April 2006, 08:08 AM
Think this How-To will work for USB Hard Drives? I am pulling my hair, attempting to gain access to one.
I have started a thread regarding my issue. Here (http://forums.fedoraforum.org/forum/showthread.php?t=104406)

jcliburn
13th April 2006, 01:50 PM
Hello There,

I have followed your how-to because I am very interested in getting DVDShrink working under wine in FC5 the way it used to work in FC4.

I followed all the steps but after I go into winecfg and drives tab and after I map the path to the media/cdrecorder/

THen the next time I launch winecfg and I go to the drives tab the path to the DVD-RW drive is gone! Its like it is not saving the change.

Can u please advise what steps u took after the instructions on the how-to in order to get the DVD drive to appear in DVDShrink everytime?

In post #24 of this thread I reported the problem you're seeing. I've filed a bug at redhat. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188636

Here's how I work around it.

1. If you followed this howto and created an fdi file, rename it to something else, like "optical.fdi.xxx", and restart haldeamon.

# cd /usr/share/hal/fdi/policy/95userpolicy
# mv optical.fdi optical.fdi.xxx
# service haldaemon restart

2. Set up a mount point for your DVD drive.

# mkdir /media/cdrecorder
# chmod 777 /media/cdrecorder
3. Add a line in /etc/fstab to mount your DVD drive. The mount will not happen automatically when you insert a disk; you'll have to mount it manually.

/dev/hdc /media/cdrecorder udf,iso9660 user,exec,noauto 0 0
4. Insert a DVD.

5. Mount the DVD. NOTE: Some people have reported they can't mount/unmount unless they're root.

$ mount /dev/hdc
6. Run Wine/DVD Shrink.

Now here's another EXTREME oddity... With the line in /etc/fstab you just added in step 3, gnome-mount will never again mount a DVD at /media/{volume.name} until you either comment out or remove that line from /etc/fstab. I have no idea why, but it's a fact. I posted another bug on this phenomenon. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188633

I really don't like this new mounting scheme for removable media.

Jay

htinn
13th April 2006, 08:06 PM
I followed all the steps but after I go into winecfg and drives tab and after I map the path to the media/cdrecorder/

THen the next time I launch winecfg and I go to the drives tab the path to the DVD-RW drive is gone! Its like it is not saving the change.

Hello. Have you read my post (the one right above yours http://forums.fedoraforum.org/showpost.php?p=502585&postcount=25)? The winecfg tool has a bug. You CANNOT use it to change the location of the drive.

EDIT: Why am I bothering to post? Nobody ever reads my posts, apparently. :(

jcliburn
13th April 2006, 08:48 PM
Hello. Have you read my post (the one right above yours http://forums.fedoraforum.org/showpost.php?p=502585&postcount=25)? The winecfg tool has a bug. You CANNOT use it to change the location of the drive.

EDIT: Why am I bothering to post? Nobody ever reads my posts, apparently. :(
Can you point me to a bug report regarding winecfg and its inability to change drives?

JEO
13th April 2006, 08:48 PM
Well, for some weird reason I can't get user mode eject to work:


umount: /media/cdrom is not in the fstab (and you are not root)
/usr/bin/eject: unmount of `/media/cdrom' failed
If you look at /etc/mtab you can see that hal doesn't mount a cd with the "user" option set. It does set the uid to the user who mounted it though. Unfortunately the umount command wants to see that information in /etc/fstab so that is why the command line umount fails for users. In FC4 hal/fstab-sync worked differently and created those entries in /etc/fstab on the fly.

d_GeNeRiT
14th April 2006, 12:57 AM
Thanks Guys,

Yes, hopefully in time a permanent solution can be worked out. In the meantime here is what I have been doing in order to use DVDShrink under wine in FC5 to backup DVDs. I am using a command line tool named vobcopy to copy the DVD to my harddrive and then I can shrink it with DVDShrink under wine using the "OPEN FILES" option in DVDShrink to open the VIDEO_TS folder.

Its not really as bad as it seems. Because DVDShrink is now accessing the files from your harddrive rather than slow assed DVD drive. It only took me 4 minutes to DVDShrink up a DVD after the files where copied to my harddrive already. So in reality this workaround is adding about 5 - 8 minutes extra TOTAL time to the project compared to using only DVDShrink + K3B. Any-hoo here is how to do it:

Launch terminal
login as root

yum install vobcopy

After the install completes that I run vobcopy using the command below in the terminal:

vobcopy -m -v

(The -v switch is to make verbose feedback) (The -m switch will copy the .ifo as well as .vob files and DVDShrink needs both so u must use the -m switch) The VIDEO_TS will get copied to whatever directory you launch vobcopy from in the terminal. SO default will be /home/username/

More information on the switches here: http://vobcopy.org/

jcliburn
14th April 2006, 02:23 AM
I've run into a problem with the howto: DVDShrink under Wine doesn't recognize the mount point. If I make a manual mount point at /media/cdrecorder, delete the fdi file, and restart haldaemon, I can manually mount the device to the mount point, then DVDShrink recognizes the drive.
I'm utterly mystified, but tonight DVD Shrink correctly mounts my DVD without any fstab gyrations. The howto that starts this thread is in place (meaning, the HAL rule is active). Don't ask me to explain it. It just happened. :confused:

Edit: Since my discovery on April 8 that DVD Shrink wouldn't mount a DVD, I've installed the following packages, for what it's worth...

Apr 09 11:14:59 Erased: wine
Apr 09 11:24:09 Installed: wine.i386 0.9.11-1.fc5
Apr 11 06:10:59 Updated: ghostscript.i386 8.15.1-7.2
Apr 11 08:35:27 Installed: libsndfile.x86_64 1.0.14-1.fc5
Apr 11 08:35:28 Installed: k3b-extras.x86_64 0.12.14-4.fc5
Apr 11 08:38:05 Installed: a52dec.x86_64 0.7.4-9.lvn5
Apr 11 08:38:05 Installed: gsm.x86_64 1.0.10-10.lvn5
Apr 11 08:38:06 Installed: taglib.x86_64 1.4-2.fc5
Apr 11 08:38:07 Installed: imlib2.x86_64 1.2.1-5.fc5
Apr 11 08:38:09 Installed: ffmpeg.x86_64 0.4.9-0.21.20051228.lvn5
Apr 11 08:38:09 Installed: k3b-extras-nonfree.x86_64 0.12.14-2.lvn5
Apr 11 14:14:57 Installed: gnome-terminal.x86_64 2.14.0-1
Apr 11 19:48:10 Updated: libsepol.x86_64 1.12.4-1.fc5
Apr 11 19:48:11 Updated: libsemanage.x86_64 1.6.2-2.fc5
Apr 11 19:48:16 Updated: selinux-policy.noarch 2.2.29-3.fc5
Apr 11 19:48:22 Updated: gaim.x86_64 1:1.5.0-16.fc5
Apr 11 19:48:23 Updated: libsepol.i386 1.12.4-1.fc5
Apr 11 19:48:28 Updated: eclipse-changelog.x86_64 1:2.0.2_fc-1
Apr 11 19:50:47 Updated: selinux-policy-targeted.noarch 2.2.29-3.fc5
Apr 11 20:28:02 Installed: audit.x86_64 1.1.5-1
Apr 13 12:47:51 Installed: xmms-libs.x86_64 1:1.2.10-23.fc5
Apr 13 12:47:54 Updated: xorg-x11-server-Xorg.x86_64 1.0.1-9.fc5
Apr 13 12:48:00 Updated: xmms.x86_64 1:1.2.10-23.fc5
Apr 13 12:48:10 Updated: gnome-power-manager.x86_64 2.14.1-1
Apr 13 19:27:03 Installed: policycoreutils-debuginfo.x86_64 1.30.1-3.fc5
Apr 13 19:28:56 Installed: checkpolicy.x86_64 1.30.3-1.fc5

Pitel
14th April 2006, 07:49 AM
I don't know what happend, but after reboot, autoumnter isn't working at all. Even when I remove created 95userpolicy dir and restarted haldeamon. Not even my usb stick doesn't automount. :(

rshendershot
14th April 2006, 02:24 PM
If you look at /etc/mtab you can see that hal doesn't mount a cd with the "user" option set. It does set the uid to the user who mounted it though. Unfortunately the umount command wants to see that information in /etc/fstab so that is why the command line umount fails for users. In FC4 hal/fstab-sync worked differently and created those entries in /etc/fstab on the fly.

I have the HAL modification, per this thread, installed. mtab assigns hdc to root (500) not user. Is this why K3B drops back to fstab?



/dev/hdc /media/dvd udf rw,noexec,nosuid,nodev,uid=500 0 0

jcliburn
14th April 2006, 02:26 PM
I have the HAL modification, per this thread, installed. mtab assigns hdc to root (500) not user. Is this why K3B drops back to fstab?
root's uid is 0, not 500. Your non-root userid is most likely 500.

rshendershot
14th April 2006, 03:40 PM
root's uid is 0, not 500. Your non-root userid is most likely 500.


You're right of course. Apologies

Elrondo
15th April 2006, 03:22 AM
I do it and HAL don't want to respect the path, it continues with variable paths

jcliburn
16th April 2006, 02:29 AM
I do it and HAL don't want to respect the path, it continues with variable paths
Are you sure you specified the correct device name in the .fdi file? Check /var/log/messages for hal errors.

htinn
16th April 2006, 09:05 AM
Can you point me to a bug report regarding winecfg and its inability to change drives?

I can't find any bug reports, but you can easily verify this yourself. Just try changing the cdrom "path" without having a CD in the drive. I think it only permits you to change the mount point if you actually have something there. It seems like winecfg expects to find files there.

jcliburn
16th April 2006, 12:30 PM
Okay. I wasn't aware of that. Thanks.

Elrondo
20th April 2006, 11:06 PM
I post my policy:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/hda">
<match key="@block.storage_device:storage.model" string="PLEXTOR DVD-ROM PX-130A">
<merge key="volume.label" type="string">cdrom</merge>
</match>
</match>
</device>
</deviceinfo>

is it good ?

Firewing1
21st April 2006, 12:29 AM
Looks good :)
Firewing1

jcliburn
21st April 2006, 12:31 AM
I post my policy:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/hda">
<match key="@block.storage_device:storage.model" string="PLEXTOR DVD-ROM PX-130A">
<merge key="volume.label" type="string">cdrom</merge>
</match>
</match>
</device>
</deviceinfo>

is it good ?

Are you sure it's /dev/hda? Is it the only thing on the hda IDE bus?

Firewing1
21st April 2006, 12:32 AM
Are you sure it's /dev/hda? Is it the only thing on the hda IDE bus?
I think it's OK -- It's going to be more and more common as SATA / SCSI replaced IDE...
Firewing1

fizy
22nd April 2006, 04:54 PM
In FC3 the following worked. In FC5 it does not. hal-device-manager shows the merged key, but ignores it.

...
<merge key="volume.policy.desired_mount_point" type="string">compact_flash</merge>
<append key="volume.policy.desired_mount_point" type="copy_property">volume.partition.number</append>
...

bushpig
21st May 2006, 04:01 AM
Wow this hal stuff takes me back to the esoteric days when getting X to work on Linux was an accomplishment. Really a work in progress. I am trying to write a hal policy so non-root users can mount and read a USB drive. Here is what I wrote:


<?xml version="1.0" encoding="ISO-8859-1"?> <! -- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/sda">
<match key="@block.storage_device:storage.model" string="ATMR04-0">
<merge key="volume.label" type="string">mini_usb</merge>
<merge key="volume.policy.mount_option.users" type="bool">true</merge>
<merge key="volume.policy.mount_option.umask=0022" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>

Where my device is coming up as the /dev/sda block device and the storage.model string, from hal-device-manager is ATMR04-0.

This doesn't work at all. Doing a tail -f /var/log/messages I can see that the device is creating log entries when it is plugged and unplugged but now it no longer appears to users and does not appear in the specified mount point.

Any ideas greatly appreciated.

jcliburn
21st May 2006, 02:40 PM
Drive keys such as the two you're using are ignored in the default FC5 HAL policy. The file /usr/share/hal/fdi/policy/20-storage-methods.fdi contains valid options for drive keys. Search that file for "valid.options" to learn what keys you can use.

Since your fdi file causes additional problems, remove it or rename it to something other than .fdi.

As a test, try renaming /usr/share/hal/fdi/policy/10osvendor/99-redhat-storage-policy-fixed-drives.fdi to something other than .fdi and restart haldaemon (service haldaemon restart). After doing that, can a non-root user now mount your usb disk?

bushpig
21st May 2006, 03:19 PM
Thanks for the tips. Just renaming the files and restartind didn't solve the issue. I then created a shorter custom policy relating to any device on /dev/sda which set the umask to 0777. If I gnome-mount as root:
1) users can access the drive and can write to it although they cannot create files or folders using the gnome menu. In other words a user can drag files onto the drive, just can't create through the UI (!)
2) only root can mount. When a user tries to mount the UI window saying cannot mount pops up but no message is logged (!)

I can't wait till this process is smoothed out. Always a challenge for packagers and developers to get this stuff set up smoothly.

bushpig
21st May 2006, 03:22 PM
*Update* I rebooted my system and while I still need to gnome-mount the drive as root - the hal policy works regarding the umask and the UI allows users to create files and folders.

jcliburn
21st May 2006, 05:21 PM
Perhaps you could modify 20-storage-methods.fdi to allow user mounts. Something like

<append key="volume.mount.valid_options" type="strlist">user</append>

I just don't know quite where to put that line in the file. Perhaps trial and error is called for.

If you're successful, you can then add a "user" mount drive key to your custom hal file and have it be recognized.

If I had a usb HD I'd try it myself, but I don't.

bushpig
21st May 2006, 05:44 PM
Sorry I'm having a brain-freeze - would I invoke this with the stanza:

<merge key="volume.policy.mount_option.user" type="strlist">user</merge>

This suggestion makes sense to me and I will keep playing with it to see if I can get it to work.

jcliburn
21st May 2006, 05:58 PM
Yes, that's how I'd try it.

EDIT: Actually, it should be "users", not "user" as I indicated earlier. And "users" is what should be in the 20-storage-methods.fdi file, too. Sorry for the mistake.

bushpig
21st May 2006, 06:15 PM
Updated to use "users" and tried the append stanza in both my custom policy and the storage methods policy. I also tried disabling selinux, just to be sure. I am still unable to mount as a user.

Since I have a (kludgy) workaround by mounting as root, I'll do so until this process is polished up. This is a bit too esoteric for me ;)

irishstu
20th June 2006, 03:02 AM
Hey jcliburn,
I can't thank you enough for this. I got DVD Shrink working nicely with FC5. Your How To is very clear, concise and easy to follow.

You could maybe add another pic showing where the "/dev/hdc" information can be found in the "Device Manager". Also, that after you finish with the Device Manager, you need to exit it before you can continue using the terminal window.

Then it would be perrrrrrfect.

Seriously, thanks a millon. I would never have been able to get this to work by myself.
I owe you a Guinness.
Stu

jcliburn
20th June 2006, 03:31 AM
Done. Thanks.

irishstu
20th June 2006, 03:49 AM
Man, you're fast! :)

OperatorOne
26th June 2006, 07:04 PM
I'm not sure if this is the right thread or not... but here goes...

I have a PSP and when it mounts, it shows up as 'disk', which is lame. I want it to show up as PSP and have a custom Icon. I changed the volume label with a windows machine and now Linux has the PSP label correctly when it mounts, but there's still a friggin Ipod icon for it, and that's lame, PSP's rock Ipods all day... hehe. So how can I change this? Obviously I only want the PSP icon to show up for the PSP, and would like the ability to add more custom icons if needed.

I read through all of the above stuff and got kind of confuzzled... so any pointers appreciated.

cheers

jcliburn
26th June 2006, 08:02 PM
Sounds like you've managed to get it labeled the way you want, but the icon isn't what you want. You should start a new thread in either the Software or General Support forum (not both) and ask for help wrestling gnome/nautilus into changing the icon. (I presume you're using gnome. If not, of course, you'd ask how to change KDE icons.) You'll get better exposure in the other forums.

d_GeNeRiT
27th June 2006, 12:46 AM
Done. Thanks.

THanks jcliburn,

I followed your instructions (first post of the thread) and was able to get dvdshrink to see my DVD-RW drive now. I am using CrossoverOffice instead of WIne. When I click OPEN DISC nothing shows up but If I go to open files and then /media/cdrom/ then the dvd-rw drive is listed there and I can select it.

Thanks a bunch for the great how-to. I dont know what u changed since I tried this out 1 month ago (same how to) but it did not work so Im not sure what u changed in the instructions since that time but now it DOES work and I am grateful for that.

Thanks again :)

OperatorOne
27th June 2006, 01:30 AM
Sounds like you've managed to get it labeled the way you want, but the icon isn't what you want. You should start a new thread in either the Software or General Support forum (not both) and ask for help wrestling gnome/nautilus into changing the icon. (I presume you're using gnome. If not, of course, you'd ask how to change KDE icons.) You'll get better exposure in the other forums.

Sounds good thx.

jcliburn
27th June 2006, 03:11 AM
THanks jcliburn,

I followed your instructions (first post of the thread) and was able to get dvdshrink to see my DVD-RW drive now. I am using CrossoverOffice instead of WIne. When I click OPEN DISC nothing shows up but If I go to open files and then /media/cdrom/ then the dvd-rw drive is listed there and I can select it.

Thanks a bunch for the great how-to. I dont know what u changed since I tried this out 1 month ago (same how to) but it did not work so Im not sure what u changed in the instructions since that time but now it DOES work and I am grateful for that.

Thanks again :)
You're quite welcome. Glad it works for you.

Now if I could just change that damned typo in the thread title... ("fixed", not "fxed") Sigh...

rgaelzer
27th June 2006, 07:17 PM
Thank you for the guide. It really worked for my DVD drive.
I have another problem concerning HAL that perhaps you can give a hint on to the solution.

I already opened a thread about it: http://forums.fedoraforum.org/showthread.php?p=559598#post559598
Below, I repeat my original post:
-------------------------------------- < snip > ------------------------------------
Title: Strange behaviour of HAL/hotplug.
Since I upgraded to FC5, HAL/hotplug have been behaving strangely...

When I stick in my external USB HDD, it is recognized, a mount point is created (at /media/disk/ ) and it is automatically mounted, all right.
When I copy files FROM the external HD, I get the expected USB 2.0 transfer speed of up to ~10 MBps. However, when I transfer files TO the external HD, the speed drops to ~ 200 kBps (VERY SLOW, slower than USB 1.1). Does anyone know the reason for this?

On the other hand, if I mount manually the drive (with mount -t ext3 /dev/sda1 /mnt/usbext3) as root, I get the same speed (for USB 2.0) in both directions. What could be happening here?

Another bizarre behaviour that I get with either the external HDD or with a DVD is that if I close the session, the drives are unmounted and the mount point is removed. Well, this could be a reasonable behaviour, but I don't want it... I want to keep the drives mounted even if I close KDE. Where do I look for a configuration file (or configuration GUI) to change this feature?
---------------------------------- <snip> --------------------------------------------------------

Do you have any ideas about what could be happening here?

Thanks.

False Data
3rd July 2006, 07:23 PM
Thanks for the much-needed clue! I've been puzzling over this one for a while.

So in FC5, instead setting the desired mount point via
<merge key="volume.policy.desired_mount_point" type="string">my_dir</merge> you use
<merge key="volume.label" type="string">my_dir</merge> That works like a charm. Thanks for the help!

electroconvulsi
4th July 2006, 05:48 PM
Sorry Guys I followed your howto and when I inser a DVD+R nothing happens and when I insert a DVD-R Gnome Mount Quits and the drive dissapears from computer. Why is this? I posted this question on my own thread about a month ago and have received no answers whatsoever. I would really appreciate one now. But I am leaving your mod on my system for the moment in the vain hope that I will one day have DVD support in FC5 Cds seem to mount OK but DVDs forget it.

Firewing1
4th July 2006, 09:51 PM
Can you provide a link to your thread? I'm sorry to hear about the no replies, but let's not hijeck this thread - We'll discuss solutions in your thread so others looking for the same solution can find it easily.
Firewing1

jcliburn
5th July 2006, 12:42 AM
http://forums.fedoraforum.org/forum/showthread.php?t=113183

Plankton
18th November 2006, 06:56 AM
Thanks for the HOW TO. I got it booked marked. Maybe you can help me with a problem I am having with my external USB 320GB harddrive and a CGI script ( I also have a php version) .

The script basically prints a directory listing of /media/EXTERNAL. It runs fine from the command line even if I su - apache and then execute it so it is NOT a user permission issue. When my CGI is run from the browser (again with uid of apache) if gets a error ...

Software error:

Cannot open /media/EXTERNAL: Permission denied

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

I am pretty sure that there is something I need to do with the HAL device manager to the drive but what I haven't got a clue.

Another thing that is not the problem is the my httpd.conf file. I can access just about any directory with my CGI when run from the browser just not the external USB harddrive.

Please help!

Plankton
18th November 2006, 08:10 AM
Hi,

I need some help dealing with HAL. I have a external USB device I can acces just fine as any user. But when I attempt to access my USB 320GB HD via my CGI I get the permission denied errors ... I can run the script just fine from the command line even after doing a "su - apache" but when ran from the browser the CGI (and a php) script fail. I am certian this isn't a problem that can be correct with modification to the httpd.conf file or a well place chmod/chown command. I am pretty sure there is something I need to do with /usr/bin/hal-device-manager but what I haven't got a clue. Please help!

jcliburn
20th November 2006, 04:16 PM
Plankton, you should probably start a new thread; this one doesn't get much exposure.

Jongi
19th December 2006, 05:08 PM
Been looking for a way to mount my DVDs/CDs to a fixed / static mount point. Great work.

WNorfleet
22nd December 2006, 03:20 PM
How might the HOWTO at the head of this thread work with an external USB DVD/CDROM? Which keys should be matched? In particular, I see no volume.label key under hal-device-manager anywhere in the device's tree. A .fdi file for this device that worked under FC4 no longer works under FC5.

Firewing1
23rd December 2006, 12:30 AM
Hi,

I need some help dealing with HAL. I have a external USB device I can acces just fine as any user. But when I attempt to access my USB 320GB HD via my CGI I get the permission denied errors ... I can run the script just fine from the command line even after doing a "su - apache" but when ran from the browser the CGI (and a php) script fail. I am certian this isn't a problem that can be correct with modification to the httpd.conf file or a well place chmod/chown command. I am pretty sure there is something I need to do with /usr/bin/hal-device-manager but what I haven't got a clue. Please help!
Sounds like SELinux to me -- If you look at the /var/log/messages file and/or the output of the 'dmesg' command and you see audit messages, then it's SELinux.
Firewing1

Plankton
25th December 2006, 02:35 AM
Thanks Firewing1 that's it alright! As soon as I run my script I get a gang of output in /var/log/messages ...


Dec 24 17:31:58 localhost kernel: audit(1167010318.341:4): avc: denied { read } for pid=3493 comm="ls" name="cgi-bin" dev=dm-0 ino=10223720 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:httpd_sys_script_exec_t :s0 tclass=dir

If you can tell me what to do about it would be very grateful! :)

Plankton
25th December 2006, 08:38 PM
I read the SELinux FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/) and learned that I could use


$ system-config-securitylevel

On the SELinux tab I selected 'Modify SELinux Policy' > 'HTTPD Service' > 'Disable SELinux protection for httpd daemon'. Rebooted and now my script works fine!
Thanks for getting pointed in the right direction! :)

Firewing1
25th December 2006, 10:05 PM
No problem! If you think you're going to be doing more work that gives you SELinux troubles, check out this tool: setroubleshoot. Just install it with:

yum install setroubleshoot
And then logout + login. From that point on, whenever there's a SELinux denial it'll notify you with easy-to-understand what, where, why, and how-to-fix.
Firewing1

emamm
17th January 2007, 09:43 PM
Hello

I am floowing the initial howto step by step but my FC6 doesn't seem to have hal-device-manager. Where can I get it?

Many thanks

Ed

JN4OldSchool
17th January 2007, 09:47 PM
lol, you have HAL. What is happening when you follow these directions?

Dies
17th January 2007, 11:00 PM
From that point on, whenever there's a SELinux denial it'll notify you with easy-to-understand what, where, why, and how-to-fix.
Firewing1

Get out, seriously ? Man, I wish I knew that before, now I have to turn it back on just to check it out. I just didn't want to have to read a couple hundred pages to understand it.

jcliburn
18th January 2007, 12:11 AM
I am floowing the initial howto step by step but my FC6 doesn't seem to have hal-device-manager. Where can I get it?


/usr/bin/hal-device-manager

If it isn't there:

yum install hal-gnome

Firewing1
18th January 2007, 01:56 AM
Get out, seriously ? Man, I wish I knew that before, now I have to turn it back on just to check it out. I just didn't want to have to read a couple hundred pages to understand it.
lol same here - But I installed it and it's really great. Any denial, a tray icon pops up - Click for what happened, why, and the command you need to prevent it from happening again. For the stuff that's not working, just copy > paste that command into a root terminal. Done :D
Firewing1

emamm
18th January 2007, 09:56 AM
Hello

I've just released that issuing the comand /usr/bin/hal-device | more is almost the same thing. I just had to look for the line /dev/hdc (my dvd burner) and copy the lines. After that all dvds are mounted at the same location - /media/cdrecorder.

However even with the new setup DVD decryptor won't detect the drive. I am running FC 6 and crossover pro 6.0.

Many thanks

Ed

wintermute000
20th May 2007, 11:36 AM
Hey can anyone help with this issue: the described procedure USED to work.

Until I stuck a PATA-to-SATA converter on my drive so it came up as /dev/scd0 instead of /dev/hde0. (in HAL manager the device ID stays the same). SO I edit my optical.fdi to reflect the new location, but it doesn't seem to have any effect.

My optical.fdi is quoted here

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/scd0">
<match key="@block.storage_device:storage.model" string="HL-DT-ST DVDRAM GSA-H10N">
<merge key="volume.label" type="string">dvd</merge>
</match>
</match>
</device>
</deviceinfo>

JN4OldSchool
20th May 2007, 01:11 PM
Try to create a new optical.fdi file, just do the whole procedure again and call the new one number 2 or whatever. I wouldnt sweat this too much though because I think this may no longer be a problem with F7.

wintermute000
20th May 2007, 01:27 PM
hmmm ok will note.

I have been wrestling with DVD/CDrom issues ever since I bought this otherwise spiffy Core2Duo rig. I went so far as to put in a PATA to SATA converter so it runs in SATA mode, due to the infamous Jmicron IDE controller issues with linux. Now I no longer have my old issues, but the drive just seems to stop working after a few days / hours uptime, even though off a reboot it seems good as gold (Ripping, viewing movie DVDs, file dvds, burning), but after an unspecified amount of time it will 'lose' its ability to even mount a disc :(