You are not logged in.

#1 2007-04-14 13:08:14

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Different mount point for hamsters on boot.

When i boot, my hamster gets mounted on /media/sda1, but when i plug it it gets mounted into /media/HAMSTER.

I created the udev rules to get hamsters mounting on /media/[device name]. These are the rules:

/etc/udev/rules.d/hamster.rules:

KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount-device.sh /dev/%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount-device.sh /dev/%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /dev/%k"

So i have to get to the conclusion that on boot mounts are performed in a different way than on plug.

I did "grep -rn mount *", and the only file that says anythings about mounting devices that are noot in fstab seems to be the one i posted.

How can i get rid of hamsters getting mounted on boot to /media/[device name] with fmask=0 and dmask=0?

(ooops, hamster = pen drive/external hd)

Offline

Board footer

Powered by FluxBB