You are not logged in.

#1 2007-11-07 11:38:46

Giggi
Member
From: Switzerland
Registered: 2006-07-24
Posts: 19
Website

External USB HD does not work with HAL:

External USB HD does not work with HAL:

From the last 10 days the HAL auto-mount with ntfs-3g file system of my external hard drive  does not woks.
But the manual mount procedure with the command mount -t ntfs-3g /dev/sdb* /mnt/XYZ works.

I've followed the instructions in the wiki: http://wiki.archlinux.org/index.php/HAL and the system has worked up to the last kernel or HAL update.

My fat32 usb-stick works without any problem.

If I try to open the device with KDE it appears an error popup wit this message:

TODO: have to rethink extra options
Error: kio_media_mount_helper

The log from the kernel.log is

Nov  6 22:03:16 myhost usb 5-1: new high speed USB device using ehci_hcd and address 4
Nov  6 22:03:16 myhost usb 5-1: configuration #1 chosen from 1 choice
Nov  6 22:03:17 myhost Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
Nov  6 22:03:17 myhost ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Nov  6 22:03:17 myhost Initializing USB Mass Storage driver...
Nov  6 22:03:17 myhost scsi6 : SCSI emulation for USB Mass Storage devices
Nov  6 22:03:17 myhost usb-storage: device found at 4
Nov  6 22:03:17 myhost usb-storage: waiting for device to settle before scanning
Nov  6 22:03:17 myhost usbcore: registered new interface driver usb-storage
Nov  6 22:03:17 myhost USB Mass Storage support registered.
Nov  6 22:03:22 myhost scsi 6:0:0:0: Direct-Access     WDC WD32 00JB-00KFA0      0811 PQ: 0 ANSI: 0
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov  6 22:03:22 myhost sdb: sdb1
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Attached SCSI disk
Nov  6 22:03:22 myhost sd 6:0:0:0: Attached scsi generic sg2 type 0
Nov  6 22:03:22 myhost usb-storage: device scan complete

and the error.log is

Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov  6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through

Do you have some idea ....

Bye.

Offline

#2 2007-11-07 18:56:25

Giggi
Member
From: Switzerland
Registered: 2006-07-24
Posts: 19
Website

Re: External USB HD does not work with HAL:

I've also created the file "preferences.fdi"  as described in the wiki (http://wiki.archlinux.org/index.php/HAL … _correctly)  and in the forum page: http://bbs.archlinux.org/viewtopic.php?pid=248224.

But does not work also in this case. mad

Some idea (thaks).

Last edited by Giggi (2007-11-07 19:08:09)

Offline

#3 2007-11-08 12:30:53

vincde
Member
Registered: 2007-05-22
Posts: 18

Re: External USB HD does not work with HAL:

same problem here.
Nevertheless, if I plug the external drive BEFORE booting, then it see it. ??!!!???

I've also seen that "dmesg" does NOT show any info when you plug and unplug the USB cable.
For me this sounds like an issue in the kernel.

Offline

#4 2007-11-08 13:02:06

raymano
Member
Registered: 2006-10-13
Posts: 357
Website

Re: External USB HD does not work with HAL:

Has anyone filed a bug report for this? I don't know if it's related but I experience the same thing only when I have my USB printer plugged in to one of the USB ports. If I unplug the printer from the computer then storage devices are recognized by hal just fine.

Last edited by raymano (2007-11-08 13:06:09)


FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com

Offline

#5 2007-11-08 13:53:46

Giggi
Member
From: Switzerland
Registered: 2006-07-24
Posts: 19
Website

Re: External USB HD does not work with HAL:

raymano wrote:

Has anyone filed a bug report for this? I don't know if it's related but I experience the same thing only when I have my USB printer plugged in to one of the USB ports. If I unplug the printer from the computer then storage devices are recognized by hal just fine.

I've found this bug report with a similar problem:
http://bugs.archlinux.org/task/8489?str … ect=1&type[]=&sev[]=&pri[]=&due[]=&reported[]=&cat[]=&status[]=open&percent[]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=

It seems a bit common problem.

Offline

#6 2007-11-08 16:07:16

Milfadoodle
Member
Registered: 2007-05-21
Posts: 26

Re: External USB HD does not work with HAL:

Ok I got it to mount as user.

In tools/hal-storage-mount.c

Line 768 I changed

action = NULL; /* "hal-storage-mount-fixed-extra-options"; TODO:
Into
action = "hal-storage-mount-fixed-extra-options";

Line 774 I changed

action = NULL; /* "hal-storage-mount-removable-extra-options"; TODO:
Into
action = "hal-storage-mount-removable-extra-options";

Can someone who actually knows programming and/or hal tell me if this is a good fix or have I horribly destroyed something?


Whole segment looks like this before change:

for (i = 0; given_options[i] != NULL; i++) {
        g_string_append (mount_option_str, ",");
        g_string_append (mount_option_str, given_options[i]);
    }
    mount_option_commasep = g_string_free (mount_option_str, FALSE); /* leak! */
    args[na++] = mount_option_commasep;
    args[na++] = (char *) device;
    args[na++] = mount_dir;
    args[na++] = NULL;

    if (pol_is_fixed) {
        if (pol_change_uid) {
            action = NULL; /* "hal-storage-mount-fixed-extra-options"; TODO: rethink */
        } else {
            action = "org.freedesktop.hal.storage.mount-fixed";
        }
    } else {
        if (pol_change_uid) {
            action = NULL; /* "hal-storage-mount-removable-extra-options"; TODO: rethink "extra-options" */
        } else {
            action = "org.freedesktop.hal.storage.mount-removable";
        }
    }
        if (action == NULL) {
                unknown_error ("TODO: have to rethink extra options");
        }

Offline

#7 2007-11-08 16:59:08

Milfadoodle
Member
Registered: 2007-05-21
Posts: 26

Re: External USB HD does not work with HAL:

Well I still haven't found anything broken by the above change and it mounts my external ntfs drive without a hitch as normal user.

Offline

#8 2007-11-08 17:05:51

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: External USB HD does not work with HAL:

I think the author(s) just wanted to reevaluate how they handled pol_is_fixed. Chances are you just reverted the changes they made.

Offline

#9 2007-12-07 21:24:55

gkal
Member
From: Athens-Greece
Registered: 2006-09-09
Posts: 38

Re: External USB HD does not work with HAL:

same problem here with my ntfs partitions. However, as Giggi wrote, manual mount works.

Offline

#10 2007-12-29 12:57:55

struq
Member
From: Guangzhou
Registered: 2007-12-29
Posts: 16

Re: External USB HD does not work with HAL:

Is it a hal problem or kde problem?
see https://bugs.launchpad.net/ubuntu/+sour … bug/178351
ubuntu seem to have some solution

Offline

#11 2008-01-10 02:24:48

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

Hi.

I have no idea on what you just did there, but if it works for automounting ntfs stuff, please tell me how to do it:

Br fjodork


Milfadoodle wrote:

Ok I got it to mount as user.

In tools/hal-storage-mount.c

Line 768 I changed

action = NULL; /* "hal-storage-mount-fixed-extra-options"; TODO:
Into
action = "hal-storage-mount-fixed-extra-options";

Line 774 I changed

action = NULL; /* "hal-storage-mount-removable-extra-options"; TODO:
Into
action = "hal-storage-mount-removable-extra-options";

Can someone who actually knows programming and/or hal tell me if this is a good fix or have I horribly destroyed something?


Whole segment looks like this before change:

for (i = 0; given_options[i] != NULL; i++) {
        g_string_append (mount_option_str, ",");
        g_string_append (mount_option_str, given_options[i]);
    }
    mount_option_commasep = g_string_free (mount_option_str, FALSE); /* leak! */
    args[na++] = mount_option_commasep;
    args[na++] = (char *) device;
    args[na++] = mount_dir;
    args[na++] = NULL;

    if (pol_is_fixed) {
        if (pol_change_uid) {
            action = NULL; /* "hal-storage-mount-fixed-extra-options"; TODO: rethink */
        } else {
            action = "org.freedesktop.hal.storage.mount-fixed";
        }
    } else {
        if (pol_change_uid) {
            action = NULL; /* "hal-storage-mount-removable-extra-options"; TODO: rethink "extra-options" */
        } else {
            action = "org.freedesktop.hal.storage.mount-removable";
        }
    }
        if (action == NULL) {
                unknown_error ("TODO: have to rethink extra options");
        }

Offline

#12 2008-01-13 17:11:21

raymano
Member
Registered: 2006-10-13
Posts: 357
Website

Re: External USB HD does not work with HAL:

I have created a new patched version of the hal package source that can be downloaded from:

http://viewvc.faunos.com/viewvc.cgi/ext … z?view=tar

I have also included this in flyspray http://bugs.archlinux.org/task/8489

Thanks for you recommendation Milfadoodle. It's working without a glitch for me as well.

Last edited by raymano (2008-01-13 17:40:17)


FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com

Offline

#13 2008-01-13 22:15:11

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

raymano wrote:

I have created a new patched version of the hal package source that can be downloaded from:

http://viewvc.faunos.com/viewvc.cgi/ext … z?view=tar

I have also included this in flyspray http://bugs.archlinux.org/task/8489

Thanks for you recommendation Milfadoodle. It's working without a glitch for me as well.

Hi.

I installed you version, removed my ntfs drives from fstab and did a reboot. and still no automount on my ntfs drives.. suggestions?

Thx.


br fjodork

Offline

#14 2008-01-14 00:04:03

raymano
Member
Registered: 2006-10-13
Posts: 357
Website

Re: External USB HD does not work with HAL:

Just installing the package and removing the ntfs drives from fstab is not enough. You still have to follow the wiki instructions to get auto-mount to work:

http://wiki.archlinux.org/index.php/HAL … ntfs-3g.29

Also make sure to reboot after replacing hal with the one I have provided.

Last edited by raymano (2008-01-14 00:04:18)


FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com

Offline

#15 2008-01-14 07:59:17

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

ok. ill add the policies later today. thank you:P

Offline

#16 2008-01-16 21:29:47

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: External USB HD does not work with HAL:

Thanks for the patched HAL.. it works as expected with ntfs-3g now.

Offline

#17 2008-01-17 07:39:12

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

hmm. i HAVE to be doing something wrong. I installed your patch, added the preferences.fdi with the right rules and rebooted.. still no automount on ntfs drives...

could you describe what did you do exactly?

Thanks:P

Offline

#18 2008-01-20 12:23:53

mic64
Member
Registered: 2005-03-03
Posts: 173

Re: External USB HD does not work with HAL:

after the latest updates, neither CD, DVD, Ext NTFS HDs, FAT32 usb stick automount anymore.
All worked perfectly for months.
Why do the change working things?

And none of those wiki tricks did the trick.

Offline

#19 2008-01-24 11:34:47

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

raymano wrote:

Just installing the package and removing the ntfs drives from fstab is not enough. You still have to follow the wiki instructions to get auto-mount to work:

http://wiki.archlinux.org/index.php/HAL … ntfs-3g.29

Also make sure to reboot after replacing hal with the one I have provided.

OK.

I have done the following:

Downloaded the patched hal version.
used makepkg in /abs/local/trunk/ to create a pkg for pacman
used sudo pacman -U pkgname to install it.
used sudo nano /etc/hal/fdi/policy/preferences.fdi to create the fdi file with the following content:

<?xml version="1.0" encoding="UTF-8"?> 
 <deviceinfo version="0.2">
 
   <device>
     <match key="volume.fstype" string="ntfs">
       <match key="@block.storage_device:storage.hotpluggable" bool="true">
         <merge key="volume.fstype" type="string">ntfs-3g</merge>
         <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
         <append key="volume.mount.valid_options" type="strlist">locale=</append>
       </match>
     </match>
   </device>

   <device>
        <match key="volume.fstype" string="ntfs">
            <append key="volume.mount.valid_options" type="strlist">dmask=002</append>
            <append key="volume.mount.valid_options" type="strlist">fmask=113</append>
        </match>
    </device>
 
 </deviceinfo>

saved the file and removed my ntfs entryes from fstab and rebooted. and still there is no automount off ntfs partitions.

have i done something wrong?

br fjodork

Offline

#20 2008-01-25 12:23:53

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

No suggestions?

Offline

#21 2008-03-21 01:39:30

kam
Member
Registered: 2008-03-20
Posts: 5

Re: External USB HD does not work with HAL:

Good news everyone!
I finally got this working, thanks to Milfadoodle's hack. I tried to modify the hal source myself which turned out to be really instructive since i learned to make a custom pkgbuild and use mkpkg and all (yeah you guessed right, I'm a newbie).
First I tried to compile from source (configure make make install etc.) but that didn't work (nothing changed, I guess it didn't overwrite the old files) so I tarred back the modified source folder, changed settings in hal's PKGBUILD in my abs tree to point to my modified source.tar.gz (don't forget to change the md5sum) and after a makepkg and a pacman -U i had all fixed smile
As says my favorite doc "I had a wonderful time"

Last edited by kam (2008-03-21 01:41:07)


Be concerned about the future, you're gonna spend the rest of your life there...

Offline

#22 2008-03-21 04:20:12

fjodork
Member
Registered: 2008-01-10
Posts: 14

Re: External USB HD does not work with HAL:

Ok.

Could you please post your pkgbuild then?

Thx.

Offline

#23 2008-03-21 11:49:18

kam
Member
Registered: 2008-03-20
Posts: 5

Re: External USB HD does not work with HAL:

I have done the following:

Downloaded the patched hal version.
used makepkg in /abs/local/trunk/ to create a pkg for pacman
used sudo pacman -U pkgname to install it.
used sudo nano /etc/hal/fdi/policy/preferences.fdi to create the fdi file with the following content:

saved the file and removed my ntfs entryes from fstab and rebooted. and still there is no automount off ntfs partitions.

have i done something wrong?

br fjodork

WARNING: what follows is a guide of what did work for me, I'm still in an early stage of learning linux, so please correct me if anything of what follows is wrong/dangerous/stupid. As I said, this worked for me, it's not pretty, since I was learning each step on the fly and I'm sure there are better ways to do this.

So fjodork, you seem to have done the the necessary steps, though i couldn't get it to work until i first removed hal without dependencies

 pacman -Rd hal

it will give you some warning about the dependencies, ignore  it since we are reinstalling hal in a few steps.
First i tried to follow Raymano's link, obviously it showed me nothing in the browser so I thought it might be a broken link.
So I downloaded the source tarball from here http://hal.freedesktop.org/releases/hal-0.5.10.tar.gz
unpacked it changed the /tools/hal-storage-mount.c as per Milfadoodle's instructions.

at first I tried to compile directly from source, the process would finish without a glitch though after reboot nothing changed, as if hal weren't
installed, i guess there were issues with paths. anyway read on

Then repacked the source in tarball, copied it to /var/abs/extra/system/hal and modified the PKGBUILD as follows

makedepends=('pkgconfig' 'gperf')
options=('!libtool')
install=hal.install
source=(${pkgname}-${pkgver}.tar.gz #removed url so makepkg looks in the current directory for the tarball
    hal
    hal-policy.patch
    cryptsetup_location.patch
    hal-0.5.9-hide-diagnostic.patch
    ntfs3g-valid-options.patch)

md5sums=('6641c30a27c00485c6accac5110ff911' # replace with md5sum of your package's sourceball (run md5sum filename)
         '882f67668cb14a0a9e4a27ef22278027'
         '5ba8b610aa9763a5f42b9f7cbd7a86ad'

then makepkg (i had to add --asroot, don't ask why tongue
and finally pacman -U hal-0.5.10-1-i686.pkg
another reboot and everything worked without a glitch!:D (yeah i know i still haven't got rid of the reboot mentality wink )
I have also put the policy files as per the wiki instructions.
PS: I know this is a dirty way to getting things done but as i said, I'm just starting big_smile
If anyone could comment/correct/explain this post I'd be more than happy, the automount issue was bothering me for about a month now (you'll say why do I need ntfs in the first place? well, I only recently switched for Linux as my primary OS, these are some relics of the M$ era big_smile


Be concerned about the future, you're gonna spend the rest of your life there...

Offline

#24 2008-06-02 22:00:31

cautha
Member
From: Kingston, Ontario
Registered: 2008-06-02
Posts: 115
Website

Re: External USB HD does not work with HAL:

Sorry for reviving this thread, but I'm still having problems, despite the fact that kam's instructions were so clear. I'm not a noob, per se, but Arch has definitely been a learning experience for me.

Incidentally, this is my second go at it after having tried the fix some months ago. Everything seemed to go well, except for the fact that my drives still wouldn't mount tongue (In case it's relevant, I'm running a 64-bit OS.)

Round 2:

To begin with, these are the contents of /etc/fstab:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


UUID=40ee601e-d1ff-4c46-b802-462c363f30c7 / ext3 defaults 0 1
UUID=611d9e29-0445-42c3-8d11-24d17bb3bd32 swap swap defaults 0 0
/dev/cdrom /media/cdrom   auto    ro,user,noauto,unhide   0      0
/dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0

Also, yaourt tells me I now have hal-0.5.11-1. I should add that mounting from the shell with ntfs-3g does work for both internal and external drives. I'm not too scared of the command line; my only issue with this is that it's a pain to have to open Konqueror with root privileges whenever I want to access my files.

No matter how much looking around I do, I can't find an Arch-friendly *.tar.gz for hal-0.5.11-1 -- or a *.diff file to bring the downloaded source up to 0.5.11-1 before I try modifying it again. I found a Debian *.orig.tar.gz  and *.diff, but I'm pretty sure that's beside the point... correct me if I'm wrong.

This is no longer an issue: a quick pacman -Sw hal downloaded the source for me. I'm going to try my hand at the above instructions again.

But I digress. First of all, can anyone provide the source for 0.5.11-1 so I can try kam/milfadoodle's instructions myself?

Alternatively, could someone post his/her PKGBUILD/a link to the patched source to make it a little easier?

If there were an easier way to get at the files on my NTFS drives, I would feel the need to use Windows much less often. For me, this is the last big hurdle smile

Cheers,
Harry

Last edited by cautha (2008-06-03 05:02:47)

Offline

#25 2008-06-03 05:40:34

cautha
Member
From: Kingston, Ontario
Registered: 2008-06-02
Posts: 115
Website

Re: External USB HD does not work with HAL:

Oops, I take it back (and sorry for double-posting).

My initial glee faded a little when I realized that the hal-0.5.11-1-x86_64.pkg.tar.gz pacman gave me was already compiled. Back to square one, it seems!

EDIT: I found a way to get the source after all: I copied the contents of /var/abs/extra/hal to /home/harry/abs/hal/, did a makepkg -c, and ended the process after the source downloaded. Crude, but effective big_smile

It would appear that I'm not beaten yet.

H

EDIT #2: Successfully built the sources modified according to milfadoodle's instructions. Although the line-numbers were different, I changed the right things. Then I edited the PKGBUILD to reflect those changes, yada yada. As root, I did /etc/rc.d/hal restart.

Tried to mount one of the partitions by clicking on it in Konqueror; I'm not sure if the error I got was a result of its not having been dismounted properly, or if it's because I forgot to change the policy files afterwards, but I'm leaning toward the former.

mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so

I'm going to reboot, and then I'll check back here. If it still doesn't work, my next step is to look at the ArchWiki entry.

H

Last edited by cautha (2008-06-03 06:24:08)

Offline

Board footer

Powered by FluxBB