Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automounting in userspace with ivman
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3 ... 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 958
Location: Portugal

PostPosted: Mon Jun 14, 2004 2:22 pm    Post subject: Automounting in userspace with ivman Reply with quote

what will i learn?
you will learn how to setup ivman to automount cdrom, dvd etc. using D-BUS and HAL
what do i need to do this?
you need to use udev.
and hopefully you hate supermount :)

first, you need to have hal-cvs and dbus-cvs installed.
for that, you need some ebuilds. i made them.
but, to get them, we need subversion (you are most likely too lazy to download all files manually)

Code:
emerge subversion

when thats done, we go into our portage overlay (/usr/local/portage)
and then we checkout what we need.
Code:
cd /usr/local/portage
svn co http://kaspersandberg.com/fluidportage/trunk/eclass
mkdir sys-apps
cd sys-apps
svn co http://kaspersandberg.com/fluidportage/trunk/sys-apps/dbus-cvs/
svn co http://kaspersandberg.com/fluidportage/trunk/sys-apps/hal-cvs/
svn co http://kaspersandberg.com/fluidportage/trunk/sys-apps/ivman-cvs/

great, now we have the ebuilds we need. then:
Code:
 ACCEPT_KEYWORDS="~arch" emerge hal-cvs

then emerge ivman-cvs
Code:
 ACCEPT_KEYWORDS="~arch" emerge ivman-cvs

great.
start dbus, and hal (hal implies dbus)
Code:
/etc/init.d/hald start

no errors? fine!
then edit the files in /etc/ivman for your needs.
then we start ivman
Code:
/etc/init.d/ivman start

great! insert a cd and look if it gets mounted!
(hooray! it works! (we hope))
but now, you might want it to mount as another user than root, to have permissions,
then do:
Code:
nano -w /etc/conf.d/ivman

to suit your needs ;) should be very selv explainary

Trobleshooting
if ivman doesent work, stop it:
Code:
/etc/init.d/ivman stop

and edit the base config
Code:
nano -w /etc/ivman/IvmConfigBase.xml

disable fork, and set debugging to true.
then start ivman from console
Code:
ivman

and save the messages, and come to either #love-sources or #ivman @ freenode to seek help


Last edited by Redeeman on Fri Jul 30, 2004 10:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
memborg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jun 2003
Posts: 121
Location: Aalborg, Denmark

PostPosted: Mon Jun 14, 2004 8:47 pm    Post subject: Reply with quote

What to do after this installment?
I was using supermount before and had set up my fstab to use that... What do i do now?
My fstab
Code:


/dev/hda1      /boot      ext2      noauto,noatime      1 2
/dev/hda3      /      reiserfs   noatime         0 1
/dev/hda2      none      swap      sw         0 0
none         /mnt/cdrom   supermount      fs=auto,dev=/dev/cdroms/cdrom0     0 0
#/dev/fd0      /mnt/floppy   auto      noauto         0 0
none         /mnt/usbstick   supermount   fs=auto,dev=/dev/sda1   0 0
# NOTE: The next line is critical for boot!
none         /proc      proc      defaults      0 0

Besides this question anything else whent fine... :D
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 958
Location: Portugal

PostPosted: Mon Jun 14, 2004 10:04 pm    Post subject: Reply with quote

you just create the fstab like you would do without supermount
Back to top
View user's profile Send private message
oiper
Guru
Guru


Joined: 01 May 2003
Posts: 316
Location: Alabama, US

PostPosted: Tue Jun 15, 2004 4:13 am    Post subject: great! Reply with quote

I do have a sour taste from supermount. I have installed all with no problems, but I have no /etc/conf.d/ivman file. Any ideas? B/c I need user permission. Maybe post it? :?:
_________________
www.bearscanfly.org - Because hiking is cool
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Tue Jun 15, 2004 6:40 am    Post subject: Reply with quote

memborg wrote:
What to do after this installment?
I was using supermount before and had set up my fstab to use that... What do i do now?

Automounting of USB stick isnt supported (yet).

You cdrom like should be like this:
Code:
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro              0 0


and you need to edit /etc/ivman/IvmConfigMappings.xml. Remove the comment tags (<!-- -->) around the sample line, and edit it apropriate, i.e. change /dev/hdc so it points to the correct /dev entry (which could be hdc of course).
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
memborg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jun 2003
Posts: 121
Location: Aalborg, Denmark

PostPosted: Tue Jun 15, 2004 8:06 am    Post subject: Reply with quote

Thanx...

That should be it then? Great...

Well i hope maybe in the next version of ivman there could be support for usbsticks and other mass storage devices... :D
Back to top
View user's profile Send private message
frisbee
n00b
n00b


Joined: 02 May 2003
Posts: 27
Location: Santa Cruz, California

PostPosted: Tue Jun 15, 2004 3:39 pm    Post subject: Reply with quote

I get this build error:

pyrexc dbus_bindings.pyx
/usr/lib/python2.3/site-packages/Plex/Transitions.py:85: SyntaxWarning: argument named None
def get_epsilon(self,
/var/tmp/portage/dbus-cvs-20040522/work/dbus-cvs/python/dbus_bindings.pyx:415:56: C function declaration not allowed here

What now?
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Tue Jun 15, 2004 4:14 pm    Post subject: Reply with quote

USE="-python" emerge dbus-cvs
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 958
Location: Portugal

PostPosted: Tue Jun 15, 2004 5:38 pm    Post subject: Reply with quote

hehe
Back to top
View user's profile Send private message
frisbee
n00b
n00b


Joined: 02 May 2003
Posts: 27
Location: Santa Cruz, California

PostPosted: Tue Jun 15, 2004 8:51 pm    Post subject: Reply with quote

Okay, so now its installed and running. I have a DVD writer that I use as my dvd/cdrom reader. I inserted a dvd with a e2fs file system on it and it did not automount. I could manually mount it but that's not the goal.

No messages in the log file. /dev/cdrom is a link to /dev/ide/host0/bus1/target0/lun0/cd

I uncommented the /dev/hdc line in IvmConfigMappings.xml and tried the debugging mode. No output. I think hald is not reporting correctly.

Here is my fstab entry:

/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,noatime,ro 0 0
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 958
Location: Portugal

PostPosted: Tue Jun 15, 2004 8:56 pm    Post subject: Reply with quote

did u remember to install hal and dbus-cvs? :)
Back to top
View user's profile Send private message
frisbee
n00b
n00b


Joined: 02 May 2003
Posts: 27
Location: Santa Cruz, California

PostPosted: Tue Jun 15, 2004 9:01 pm    Post subject: Reply with quote

I followed the initial HOW-TO to the letter. Here is whay I emerged:

* sys-apps/hal-cvs
Latest version available: 20040522
Latest version installed: 20040522

* sys-apps/dbus-cvs
Latest version available: 20040522
Latest version installed: 20040522

* sys-apps/ivman-cvs
Latest version available: 20040524
Latest version installed: 20040524
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 958
Location: Portugal

PostPosted: Tue Jun 15, 2004 9:12 pm    Post subject: Reply with quote

then i dont know, must be some ivman error, talk to eikke
Back to top
View user's profile Send private message
GlooM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 119
Location: $HOME

PostPosted: Tue Jun 15, 2004 9:30 pm    Post subject: Reply with quote

Redeeman,
the svn command fails saying the server is down, :| ?

Hmm, opera opened the svn links easily, guess ill dl the ebuilds manually.
Back to top
View user's profile Send private message
GlooM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 119
Location: $HOME

PostPosted: Tue Jun 15, 2004 10:10 pm    Post subject: Reply with quote

I get this on hal compilation:

configure: error: cannot find pci.ids. Use --with-hwdata to specify location

!!! ERROR: sys-apps/hal-cvs-20040522 failed.
!!! Function src_compile, Line 33, Exitcode 1
!!! (no error message)

well, using locate i found where pci.ids was, and edited the ebuild,
so the configuration would contain --with-hwdata=/path/to/file ,it seems
to have compiled. Cheers :D

ahh, bad luck again:

FATAL ERROR: Autoconf version 2.50 or higher is required for this script
Running autoconf...
FATAL ERROR: Autoconf version 2.50 or higher is required for this script

!!! ERROR: sys-apps/ivman-cvs-20040524 failed.
!!! Function econf, Line 367, Exitcode 1
!!! no configure script found

i have autoconf 2.57, what gives ?
remerging autoconf solved this :)
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Wed Jun 16, 2004 6:39 am    Post subject: Reply with quote

frisbee wrote:
Okay, so now its installed and running. I have a DVD writer that I use as my dvd/cdrom reader. I inserted a dvd with a e2fs file system on it and it did not automount. I could manually mount it but that's not the goal.

No messages in the log file. /dev/cdrom is a link to /dev/ide/host0/bus1/target0/lun0/cd

I uncommented the /dev/hdc line in IvmConfigMappings.xml and tried the debugging mode. No output. I think hald is not reporting correctly.

Here is my fstab entry:

/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,noatime,ro 0 0

If there's no output in debugging mode, I'm afraid soemthings's wrong with hal.
Maybe try to run dbus-monitor --system, and insert a CD then, look if you see any new DBUS messages.
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Wed Jun 16, 2004 6:41 am    Post subject: Reply with quote

GlooM wrote:
I get this on hal compilation:

configure: error: cannot find pci.ids. Use --with-hwdata to specify location

!!! ERROR: sys-apps/hal-cvs-20040522 failed.
!!! Function src_compile, Line 33, Exitcode 1
!!! (no error message)

well, using locate i found where pci.ids was, and edited the ebuild,
so the configuration would contain --with-hwdata=/path/to/file ,it seems
to have compiled. Cheers :D

ahh, bad luck again:

FATAL ERROR: Autoconf version 2.50 or higher is required for this script
Running autoconf...
FATAL ERROR: Autoconf version 2.50 or higher is required for this script

!!! ERROR: sys-apps/ivman-cvs-20040524 failed.
!!! Function econf, Line 367, Exitcode 1
!!! no configure script found

i have autoconf 2.57, what gives ?
remerging autoconf solved this :)

No idea about this, I'm not really a autotools guru. I was happy the scripts actually worked here and on other people's machine(s).
Nice it has been solved. If you know what caused this, please let me know on ivman-devel!
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
frisbee
n00b
n00b


Joined: 02 May 2003
Posts: 27
Location: Santa Cruz, California

PostPosted: Wed Jun 16, 2004 7:22 am    Post subject: Reply with quote

I figured out the problem compiling dbus. I needed to upgrade pyrex to the masked version. Now it emerges without error.
Restarted everything and still no automount. I tried the suggested

Code:

% dbus-monitor --system
signal interface=org.freedesktop.DBus; member=ServiceAcquired; sender=org.freedesktop.DBus
string::1.12


and nothing happened when I inserted the DVD. Question? Does my 2.6 kernel need any special feature enabled? Modules? Reboot after installing hal, dbus, or ivman?

Thanks,
[/code]
Back to top
View user's profile Send private message
GlooM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 119
Location: $HOME

PostPosted: Wed Jun 16, 2004 9:23 am    Post subject: Reply with quote

Frisbee
No, this aint windoze, you only have to reboot to boot a new kernel,
/etc/init.d/someservice start (or restart) is enough.

The problem is, I cant get it working too :evil: .
The debug doesnt show any messages, ill try the
dbus monitor thing.

Same output in dbus-monitor --system as Frisbee's.
:evil:
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Wed Jun 16, 2004 9:55 am    Post subject: Reply with quote

Are you guys using a udev-system?
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
GlooM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 119
Location: $HOME

PostPosted: Wed Jun 16, 2004 9:59 am    Post subject: Reply with quote

Well there is a udev process in process list.

udevd that is.
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Wed Jun 16, 2004 10:03 am    Post subject: Reply with quote

Then you should get some output in dbus-monitor. Otherwise that's not an ivman problem, but a udev and/or dbus and/or hal problem I'm afraid.
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
GlooM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 119
Location: $HOME

PostPosted: Wed Jun 16, 2004 10:10 am    Post subject: Reply with quote

Well it aint ivman then, hal depends on dbus, dbus is silent, so hal aint the prob too, udev then ?
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Wed Jun 16, 2004 10:30 am    Post subject: Reply with quote

hal depends on dbus, but also on udev, like this:

device added -> udev creates a /dev entry and /sys is updated -> hal detects this -> hal sends a dbus message to registered applications.

So, if dbus-monitor gives no output, its hal and/or udedv that's broken. Hal normally isnt afaik (works on my pc and on lots of others I heard of :)) so I think (could be wrong of course) there's something wrong with your UDev setup...
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
Chaosite
Guru
Guru


Joined: 13 Dec 2003
Posts: 540
Location: Right over here.

PostPosted: Wed Jun 16, 2004 12:25 pm    Post subject: Reply with quote

eikketk wrote:
hal depends on dbus, but also on udev, like this:

device added -> udev creates a /dev entry and /sys is updated -> hal detects this -> hal sends a dbus message to registered applications.

So, if dbus-monitor gives no output, its hal and/or udedv that's broken. Hal normally isnt afaik (works on my pc and on lots of others I heard of :)) so I think (could be wrong of course) there's something wrong with your UDev setup...


This is a real long shot, but here goes...

It is a udev problem, or more exactly, a problem with the Gentoo hacks of udev. The problem is, that /dev is populated with all the devices _possible_, instead of all the devices that are actually on the system. So, udev doesn't make a new entry in /dev (Its already there!), and HAL doesn't send any message. And because Gentoo by default puts /dev in a tarball, then untars it on startup... I think you understand the problem.

The solution should be to edit this file:
Code:
/etc/conf.d/rc


I don't recall the exact line the should be changed, but the file is very well commented, so you should find the right line easily.

After that, it should work properly (Unless I'm wrong, which is very probable too...). HAL was meant to work on a pure udev system...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3 ... 27, 28, 29  Next
Page 1 of 29

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum