You are not logged in.

#1 2010-07-23 00:34:06

ScottWilson1990
Member
Registered: 2010-01-20
Posts: 33

HAL Automount on Startup

Distribution:Arch Linux 2010.05
Kernal:2.6.33.4

System Info:

Intel Core2Duo 1.8GHz
2GB Crucial DDR2 667MHZ RAM
ASrock 775-DualVSTA Motherboard
NVIDIA 8800GT 512MB PCI-Express Graphics Card
500GB SATA Western Digital Caviar Blue (MAIN SYSTEM DRIVE)
250GB IDE Western Digital Caviar
300GB SATA Western Digital Caviar RE16
160GB IDE Maxtor Diamondmax Plus 9
500W Casecom power supply
-----------------------------------------------------------------------------------------------

Hello all,

First of all, setup is as follows:

500GB Western Digital Caviar Blue SATA hard drive:
200mb Primary Partition: /boot  EXT4
40gb Primary Partition: /  EXT4
1gb Primary Partition: Linux Swap

Extended Partition
70gb Logical Partition: /MusicStorage  EXT4
360gb Logical Partition: /MediaStorage EXT4

160gb Maxtor Diamondmax Plus 9 IDE hard drive:
70gb Primary Partition: /Documents  NTFS
80gb Primary Partition: /SetupFiles  NTFS

I'm using HAL to show me the hard drives when I boot, rather than using fstab. The problem is, every time I want to access the hard drives after boot, I have to enter the root password. So it doesn't automount any of the drives because I have to enter this password, which isn't a problem in its self. But the problem is, I store all my documents and images on the 160gb maxtor in the Documents partition, so that all my documents and everything are on a separate hard drive than my system all together, I find it safer that way and its just a personal preference. But the problem is... when... say... I set a background image for Arch that is located in that Documents partition, when I reboot... the background doesnt come on until I enter the root password to access that hard drive / partition. So when I boot im just getting a default green background. Is there any way to get all of the hard drives to automount using HAL without having to put that password in, so that arch can access that hard drive and partition as soon as it boots to enable the background? If I use fstab, then it eliminates this problem, but I would rather have HAL automount them for me, as it saves a lot of time if I change any hard drives round that I have plugged in.


Sorry for the long post, and thanks in advance for any help,
Scott.

Last edited by ScottWilson1990 (2010-07-23 00:35:59)


"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair..." - Douglas Adams

Offline

#2 2010-07-23 00:38:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: HAL Automount on Startup

> So it doesn't automount any of the drives because I have to enter this password
I think it does mount them, you have permissions problem if you need to be root to access them. Is your user in the storage group?

> Kernal:2.6.33.4
The current kernel is 2.6.34.

Offline

#3 2010-07-23 04:42:57

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: HAL Automount on Startup

What if you use udev to mount them instead?

http://wiki.archlinux.org/index.php/Ude … SB_devices

Offline

#4 2010-07-23 08:48:23

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL Automount on Startup

karol wrote:

> So it doesn't automount any of the drives because I have to enter this password
I think it does mount them, you have permissions problem if you need to be root to access them. Is your user in the storage group?

Storage group is not used anymore, at least not by HAL. HAL in it's default configuration gets permissions from ConsoleKit.

@ScottWilson1990: What environment do you use and how do you start it?

Offline

#5 2010-07-23 08:59:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: HAL Automount on Startup

Gusar wrote:
karol wrote:

> So it doesn't automount any of the drives because I have to enter this password
I think it does mount them, you have permissions problem if you need to be root to access them. Is your user in the storage group?

Storage group is not used anymore, at least not by HAL. HAL in it's default configuration gets permissions from ConsoleKit.

@ScottWilson1990: What environment do you use and how do you start it?

That's news to me. What if I don't use HAL anymore? Would you be so kind and spare some change ... I mean post some links?

Offline

#6 2010-07-23 11:46:54

ScottWilson1990
Member
Registered: 2010-01-20
Posts: 33

Re: HAL Automount on Startup

I'm using gnome environment and im starting it using "exec ck-launch-session gnome" through ~/.xinitrc. Before I added the ck-launch-session command, the drives wouldn't let me access them at all. They just said permission denied. Now i've added that command, it allows me to access them, but I have to enter the root password every time.

I am a member of storage group. Maybe its something to do with the configuration of consolekit if that's what HAL uses, but I don't know much about it, so i'll have a look.

In the mean time, has anyone got any more ideas?


Thanks for all the replies,
Scott.


"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair..." - Douglas Adams

Offline

#7 2010-07-23 12:15:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: HAL Automount on Startup

Take a look at pmount - it let's users mount devices.
BTW: we use udev not HAL now, HAL is deprecated.

Offline

#8 2010-07-23 12:17:01

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL Automount on Startup

karol wrote:

That's news to me. What if I don't use HAL anymore? Would you be so kind and spare some change ... I mean post some links?

Just check the HAL configuration and you'll see that root and users that are "at_console" (meaning a ConsoleKit session) have permissions to do stuff. If you're using udisks, that one uses policykit for permissions. I haven't moved to udisks yet, so I don't know how policykit is configured, though I think it too checks for ConsoleKit sessions.

@ScottWilson1990: Gnome doesn't use HAL anymore for mounting, it uses udisks. So policykit is the thing you should look at. As I wrote above I don't have experience with policykit, so I can't help you further.

Offline

#9 2010-07-23 22:07:12

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: HAL Automount on Startup

Yeah but how can you get udev to automount when you're using UUID on your fstab file for instead of the old way SDA1, etc.????

Offline

#10 2010-07-23 22:35:37

ScottWilson1990
Member
Registered: 2010-01-20
Posts: 33

Re: HAL Automount on Startup

What ever happened to just letting fstab deal with the mounting options? I can mount the drives using fstab with options

rw,user,auto    0  0

and it mounts them fine on startup allowing arch to access my background and load it straight away on execution of gnome.
Is using fstab classed as bad practice now? or did people just stop using it when they started having to mount them using the UUID of all the drives?

Why has HAL become deprecated? surely it still does the job its supposed to, but I more than likely don't have it set up properly.

Udev has always been around hasn't it?
I've just read the Archwiki on Udev and it seems like such a bl**dy long tedious way of doing things? Why deprecate something like HAL in favour of something like Udev that is so long winded?

I will checkout the HAL configuration like you said Gusar, but if its classed as deprecated and bad practice now then i'd rather use the most up-to-date mounting methods.


Thanks so much for all your replies,
Scott.


"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair..." - Douglas Adams

Offline

#11 2010-07-23 23:10:38

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL Automount on Startup

Udev is not meant to be used directly, so it's ok if it's seemingly long-winded, it's a low-level tool. Modern apps (nautilus, the in-development version of pcmanfm) use udisks which sits on top of udev. Likewise with xorg - while it uses udev for input devices, you don't mess with udev directly to configure them, you use xorg.conf or rather a graphical utility of your DE.

@ScottWilson1990: Forget HAL, as I said Gnome doesn't use it anymore. What you should be checking is policykit, which is what determines permissions for udisks. I've seen posts regarding policykit at this forum, just do a search and you might find a solution.

Hal is deprecated because it duplicates stuff that udev does already and from what I've read is a pain to maintain. Udisks and upower are it's successors and they use policykit to get permissions. Gnome was the first to move to these successors, lxde is getting there, KDE will take some time.

Last edited by Gusar (2010-07-23 23:21:19)

Offline

Board footer

Powered by FluxBB