You are not logged in.

#1 2010-07-20 09:39:11

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

udev rules for automounting

Hello, I was in a thread about a cool little file manager called qtfm, and I was wondering how to automount with udev there. Fiinix helped me here.

fiinix wrote:

For automount I use udev  (the first rule from our udev-wiki works fine for me, even for ntfs partitions, ntfs-3g being installed). To unmount a partition, I wrote a "Custom action" that allows me to unmount a folder by right click -> "Unmount". If that folder becomes empty, unmounting worked. For that custom action I use the command 'sudo umount %f' and in /etc/sudoers I allowed myself as a user to sudo /bin/umount without password. But gksu should work too.

However, my ntfs partition didn't show up after using that rule (from the link). It gave me my usb, my not my Windows partition. Because asking in that thread would be rude, since it's not about qtfm, I thought I'd ask here. I made sure I had ntfs-3g installed, so that should be it. Any clues?

Offline

#2 2010-07-20 11:13:17

jmad980
Member
From: Califonia
Registered: 2010-03-11
Posts: 54

Re: udev rules for automounting


Someone call a doctor, my awesome configuration broke again! || To err is human -- to blame it on a computer is even more so.

Offline

#3 2010-07-20 11:15:51

tlvince
Member
Registered: 2010-07-06
Posts: 68
Website

Re: udev rules for automounting

Did you try the ntfs variant of the rules?

Offline

#4 2010-07-22 08:43:38

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

Re: udev rules for automounting

I tried all those approaches, but none of them worked. In the end, I made a folder in /media and called it Windows. Then I typed this in the terminal:

sudo ntfs-3g /dev/sda2 /media/Windows2

This worked. What I don't understand is why I am unable to automount. Since ntfs-3g can clearly see my partition...

Offline

#5 2010-07-23 04:53:58

alexandrite
Member
Registered: 2009-03-27
Posts: 326

Re: udev rules for automounting

I think the initramfs brings up the internal hard drives before it starts udev, so the "add" event that makes it mount stuff is never called.

If you want to automatically mount a filesystem on boot (especially if it's on a non-removable medium), you should add an entry for it to /etc/fstab instead of relying on udev to mount it.

Here's the wiki article for fstab.  Should be all you need.

Last edited by alexandrite (2010-07-23 04:55:10)

Offline

Board footer

Powered by FluxBB