Re: Automount NTFS on Dockstar Debian March 07, 2011 12:58PM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian March 07, 2011 02:12PM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian March 07, 2011 02:24PM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian March 11, 2011 06:31PM |
Registered: 12 years ago Posts: 161 |
root@debian:~# cat /etc/udev/rules.d/90-automount.rules KERNEL!="sd*", GOTO="media_label_end" ENV{ID_USB_DRIVER}!="usb-storage", GOTO="media_label_end" IMPORT{program}="/sbin/blkid -o udev -p %N", ENV{name}="%E{ID_FS_LABEL}" ENV{ID_FS_TYPE}=="", GOTO="media_label_end" ENV{name}=="", ENV{name}="%k" KERNEL=="sd*", SYMLINK+="usb-storage/%E{name}" ACTION=="add", RUN+="/usr/bin/pmount -t %E{ID_FS_TYPE} --sync --noatime --umask 000 %k %E{name}" ACTION=="remove", RUN+="/usr/bin/pumount %E{name}" LABEL="media_label_end"
root@debian:~# cat /root/usb-storage.pmount #!/bin/bash PMOUNT=`which pmount` if [ -z "$PMOUNT" ] then echo "Error: $0 cant find pmount!" 1>&2 exit 1 fi OPTIONS="--sync --noatime --umask 000" ROOT="/dev/usb-storage" for DEV in $( ls -1 $ROOT ) do BLKID=( `/sbin/blkid $ROOT/$DEV` ) for ITEM in ${BLKID[@]} do TEMP=`expr match "$ITEM" 'TYPE=\"\(.*\)\"'` TYPE=${TEMP//\"/} if [ -n "$TYPE" ] && [ "$TYPE" != "swap" ] then echo "$ROOT/$DEV" echo `$PMOUNT -t $TYPE $OPTIONS $ROOT/$DEV $DEV` break fi done done exit 0
root@debian:~# cat /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /root/usb-storage.pmount exit 0
Re: Automount NTFS on Dockstar Debian March 12, 2011 01:42AM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian March 12, 2011 10:57AM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian March 12, 2011 04:37PM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian March 13, 2011 01:40PM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian March 13, 2011 04:54PM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian July 18, 2011 09:50PM |
Admin Registered: 12 years ago Posts: 17,650 |
ENV{name}!="*Async", ENV{mode}="--sync" ENV{name}=="*Async", ENV{mode}="" ACTION=="add", RUN+="/usr/bin/pmount -t %E{ID_FS_TYPE} %E{mode} --noatime --umask 000 %k %E{name}"
if [ -n "$TYPE" ] && [ "$TYPE" != "swap" ] then echo "$ROOT/$DEV" if [ `expr $DEV : '.*Async'` ] then OPTIONS="--noatime --umask 000" fi echo `$PMOUNT -t $TYPE $OPTIONS $ROOT/$DEV $DEV` break fi
Re: Automount NTFS on Dockstar Debian July 19, 2011 05:50AM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian July 19, 2011 12:16PM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian July 19, 2011 01:22PM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian July 20, 2011 01:27PM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian November 09, 2011 11:07AM |
Registered: 12 years ago Posts: 161 |
Re: Automount NTFS on Dockstar Debian November 09, 2011 01:54PM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS on Dockstar Debian March 05, 2012 11:59PM |
Admin Registered: 12 years ago Posts: 17,650 |
root@Ds1:/etc/udev/rules.d# cat 70-automount.rules # NOTE: # 1. use pmount --sync if drive label ends with Sync/SYNC/sync in add action to allow removal without corruption # 2. avoid mounting EFI partition for a HFS+ drive # 3. force mount HFS+ partition as read-write KERNEL!="sd*", GOTO="media_label_end" ENV{ID_USB_DRIVER}!="usb-storage", GOTO="media_label_end" IMPORT{program}="/sbin/blkid -o udev -p %N", ENV{name}="%E{ID_FS_LABEL}" ENV{ID_FS_TYPE}=="", GOTO="media_label_end" ENV{ID_FS_LABEL}!="EFI", GOTO="continue" ENV{ID_PART_TABLE_TYPE}=="gpt", GOTO="media_label_end" LABEL="continue" ENV{name}=="", ENV{name}="%k" KERNEL=="sd*", SYMLINK+="usb-storage/%E{name}" ENV{name}=="*SYNC", ENV{mode}="--sync" ENV{name}=="*Sync", ENV{mode}="--sync" ENV{name}=="*sync", ENV{mode}="--sync" ENV{name}!="*SYNC", ENV{mode}="" ENV{ID_FS_TYPE}=="hfsplus", ENV{mode2}="--read-write" ACTION=="add", RUN+="/usr/bin/pmount -t %E{ID_FS_TYPE} %E{mode} %E{mode2} --noatime --umask 000 %k %E{name}" ACTION=="remove", RUN+="/usr/bin/pumount --yes-I-really-want-lazy-unmount %E{name}" LABEL="media_label_end"
root@Ds1:/etc/udev/rules.d# pmount -t hfsplus --noatime --umask 000 --read-write /dev/sdb2 HFSpDrive mount: warning: /media/HFSpDrive seems to be mounted read-only.
Re: Automount NTFS on Dockstar Debian March 15, 2012 11:06PM |
Admin Registered: 12 years ago Posts: 17,650 |
root@Ds1:/etc/udev/rules.d# cat 70-automount.rules # NOTE: # 1. use pmount --sync if drive label ends with Sync/SYNC/sync in add action to allow removal without corruption # 2. avoid mounting EFI partition for a HFS+ drive # 3. force mount HFS+ partition as read-write KERNEL!="sd*", GOTO="media_label_end" ENV{ID_USB_DRIVER}!="usb-storage", GOTO="media_label_end" IMPORT{program}="/sbin/blkid -o udev -p %N", ENV{name}="%E{ID_FS_LABEL}" ENV{ID_FS_TYPE}=="", GOTO="media_label_end" ENV{ID_FS_LABEL}!="EFI", GOTO="continue" ENV{ID_PART_TABLE_TYPE}=="gpt", GOTO="media_label_end" LABEL="continue" ENV{name}=="", ENV{name}="%k" KERNEL=="sd*", SYMLINK+="usb-storage/%E{name}" ENV{name}=="*SYNC", ENV{mode}="--sync" ENV{name}=="*Sync", ENV{mode}="--sync" ENV{name}=="*sync", ENV{mode}="--sync" ENV{name}!="*SYNC", ENV{mode}="" ENV{ID_FS_TYPE}=="hfsplus", ENV{mode2}="--read-write" ENV{ID_FS_TYPE}=="hfsplus", ENV{mode3}="/bin/mount -v -o remount,force,rw /media/%E{name}" ENV{ID_FS_TYPE}!="hfsplus", ENV{mode3}="/usr/bin/pmount" ACTION=="add", RUN+="/usr/bin/pmount -t %E{ID_FS_TYPE} %E{mode} %E{mode2} --noatime --umask 000 %k %E{name}" ACTION=="add", RUN+="%E{mode3}" ACTION=="remove", RUN+="/usr/bin/pumount --yes-I-really-want-lazy-unmount %E{name}" LABEL="media_label_end"
Re: Automount NTFS/HFS+ on Dockstar Debian April 11, 2012 02:35PM |
Registered: 11 years ago Posts: 9 |
Re: Automount NTFS/HFS+ on Dockstar Debian April 12, 2012 01:42AM |
Admin Registered: 12 years ago Posts: 17,650 |
Re: Automount NTFS/HFS+ on Dockstar Debian April 13, 2012 10:28AM |
Registered: 11 years ago Posts: 9 |
udevadm info --query=all --name=/dev/sdb1 P: /devices/platform/orion-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 N: sdb1 S: disk/by-id/usb-Kingston_DataTraveler_109_00187D1174F1EC10E0003168-0:0-part1 S: disk/by-label/Kingston S: disk/by-path/platform-orion-ehci.0-usb-0:1.3:1.0-scsi-0:0:0:0-part1 S: disk/by-uuid/4F75-E6B4 E: DEVLINKS=/dev/disk/by-id/usb-Kingston_DataTraveler_109_00187D1174F1EC10E0003168-0:0-part1 /dev/disk/by-label/Kingston /dev/disk/by-path/platform-orion-ehci.0-usb-0:1.3:1.0-scsi-0:0:0:0-part1 /dev/disk/by-uuid/4F75-E6B4 E: DEVNAME=/dev/sdb1 E: DEVPATH=/devices/platform/orion-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 E: DEVTYPE=partition E: ID_BUS=usb E: ID_FS_LABEL=Kingston E: ID_FS_LABEL_ENC=Kingston E: ID_FS_TYPE=exfat E: ID_FS_USAGE=filesystem E: ID_FS_UUID=4F75-E6B4 E: ID_FS_UUID_ENC=4F75-E6B4 E: ID_FS_VERSION=1.0 E: ID_INSTANCE=0:0 E: ID_MODEL=DataTraveler_109 E: ID_MODEL_ENC=DataTraveler\x20109 E: ID_MODEL_ID=6545 E: ID_PART_ENTRY_DISK=8:16 E: ID_PART_ENTRY_NUMBER=1 E: ID_PART_ENTRY_OFFSET=2 E: ID_PART_ENTRY_SCHEME=dos E: ID_PART_ENTRY_SIZE=30481150 E: ID_PART_ENTRY_TYPE=0x7 E: ID_PART_TABLE_TYPE=dos E: ID_PATH=platform-orion-ehci.0-usb-0:1.3:1.0-scsi-0:0:0:0 E: ID_PATH_TAG=platform-orion-ehci_0-usb-0_1_3_1_0-scsi-0_0_0_0 E: ID_REVISION=PMAP E: ID_SERIAL=Kingston_DataTraveler_109_00187D1174F1EC10E0003168-0:0 E: ID_SERIAL_SHORT=00187D1174F1EC10E0003168 E: ID_TYPE=disk E: ID_USB_DRIVER=usb-storage E: ID_USB_INTERFACES=:080650: E: ID_USB_INTERFACE_NUM=00 E: ID_VENDOR=Kingston E: ID_VENDOR_ENC=Kingston E: ID_VENDOR_ID=0930 E: MAJOR=8 E: MINOR=17 E: SUBSYSTEM=block E: UDEV_LOG=3 E: USEC_INITIALIZED=3969473999 E: name=Kingston
Re: Automount NTFS/HFS+ on Dockstar Debian April 13, 2012 06:56PM |
Admin Registered: 12 years ago Posts: 17,650 |
pmount -t exfat /dev/sdb1 /media/mountpoint mount -t exfat /dev/sdb1 /media/mountpoint
pmount -t exfat-fuse /dev/sdb1 /media/mountpoint
ENV{ID_FS_TYPE}=="exfat", ENV{mode3}="exfat-fuse" ENV{ID_FS_TYPE}!="exfat", ENV{mode3}=%E{ID_FS_TYPE}" ACTION=="add", RUN+="/usr/bin/pmount -t %E{mode3} %E{mode} %E{mode2} --noatime --umask 000 %k %E{name}"
Re: Automount NTFS/HFS+ on Dockstar Debian April 13, 2012 09:59PM |
Registered: 11 years ago Posts: 9 |
pmount -t exfat-fuse /dev/sdb1 /media/test Error: invalid file system name 'exfat-fuse'
SUPPORTED FILESYSTEMS For now, pmount supports the following filesystems: udf, iso9660, vfat, ntfs, hfsplus, hfs, ext3, ext2, ext4, reis- erfs, reiser4, xfs, jfs and omfs. They are tried sequentially in that exact order when the filesystem is not spec- ified. Additionally, pmount supports the filesystem types ntfs-fuse and ntfs-3g to mount NTFS volumes respectively with ntfsmount (1) or ntfs-3g (1). If the file /sbin/mount.ntfs-3g is found, then pmount will mount NTFS filestystems with type ntfs-3g rather than plain ntfs. To disable this behavior, just specify -t ntfs on the command-line, as this happens only for autodetection.
Re: Automount NTFS/HFS+ on Dockstar Debian April 14, 2012 04:21AM |
Admin Registered: 12 years ago Posts: 17,650 |
ENV{ID_FS_TYPE}=="exfat", ENV{cmd1}="/bin/mount" ENV{ID_FS_TYPE}!="exfat", ENV{cmd1}="/usr/bin/pmount" ENV{ID_FS_TYPE}=="exfat", ENV{fs1}="exfat-fuse" ENV{ID_FS_TYPE}!="exfat", ENV{fs1}=%E{ID_FS_TYPE}" ACTION=="add", RUN+="%E{cmd1} -t %E{fs1} %E{mode} --noatime --umask 000 %k %E{name}"