SliTaz SliTaz Forum

You are not logged in.

#1 2011-04-19 12:30:23

Malamut
Member
Registered: 2011-04-11
Posts: 15

udev problems

I'm trying to set up automounting with udev in latest cooking. I've wrote such file with udev rules:

# Automount USB devices

SUBSYSTEM!="block", GOTO="automount_end"

KERNEL!="sd[a-z][0-9]", GOTO="automount_end"

IMPORT{program}="/sbin/blkid -o udev -p %N"

ENV{ID_FS_LABEL}!="", ENV{MOUNT_POINT}="%E{ID_FS_LABEL}"

ENV{ID_FS_LABEL}=="", ENV{MOUNT_POINT}="%E{ID_MODEL}_%n"

ACTION!="add", GOTO="automount_add_end"

ENV{ID_FS_TYPE}=="ntfs|vfat", RUN+="/bin/mkdir -p /media/usb/%E{MOUNT_POINT}"

ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/mount -o uid=1000,utf8,nosuid,nodev,fmask=0022,dmask=0022 /dev/%k /media/usb/%E{MOUNT_POINT}"

ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g /dev/%k /media/usb/%E{MOUNT_POINT}"

LABEL="automount_add_end"

ACTION!="remove", GOTO="automount_end"

RUN+="/bin/umount -lf /media/usb/%E{MOUNT_POINT}"

RUN+="/bin/rmdir /media/usb/%E{MOUNT_POINT}"

LABEL="automount_end"

Ok, flash with FAT filesystem work correctly, but devices with NTFS doesn't mounting. udev create new directory with fs label as name, but doesn't mount filesystem to it. Where is the problem? Why mounting FAT partitions work from udev, but mounting NTFS doesn't work?

Offline

#2 2011-05-08 06:46:27

Filou
Moderator
Registered: 2011-05-03
Posts: 256

Re: udev problems

I suppose, you have the ntfs-3g drivers installed ?!?

If so, does the system recognize the partition as "ntfs", I mean is ENV{ID_FS_TYPE}=="ntfs" the parameter udev uses?

Maybe this should be ntfs-3g? (At least this is what lshal tells me as parameter

volume.fstype = 'ntfs-3g'  (string)

Cheers...

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]