LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Change Default Mount Option for Automount in Slackware64 14.1 (https://www.linuxquestions.org/questions/slackware-14/change-default-mount-option-for-automount-in-slackware64-14-1-a-4175498579/)

ack_iix 03-18-2014 04:28 AM

Change Default Mount Option for Automount in Slackware64 14.1
 
Just as the thread title, is there any way of changing the default mount options for external storage device? (like USB pen-drive or portable hard drive)

For example, I have a NTFS-formatted external hard drive - when I plugged it Slackware64 automatically mounts it using NTFS-3G, how do I pass or change the default mount options for the mounting process like adding uid=1000,gid=100,fmask=133,dmask=022 to NTFS-3G?

Or even change the default mount filesystem? Like change ntfs-3g to ufsd (Paragon NTFS driver) and pass the appropriate mount options every time the device automount.

Thanks for your reply.

willysr 03-18-2014 05:41 AM

have a look on your /etc/fstab

ack_iix 03-18-2014 07:37 AM

I'm asking about how to pass options in Slackware64 14.1 auto-mounting feature, I kind a lost about how to 'configure' or tune the auto-mount filesystem options not mounting manually using entry in /etc/fstab.

For example, I have these entry in /etc/fstab:
Code:

# WD Passport 2TB - /dev/sdb1
UUID="A63A0C9C3A0C6C1D"  /mnt/wd1  ufsd  uid=1000,gid=100,fmask=133,dmask=022,iocharset=utf8,nohidden  0  0

Do you know how to append all of those mount options to the auto-mount daemon / process (udisks, udisks2, or whatever that is) also change the default auto-mount behavior to use ufsd instead of ntfs-3g, so I don't have to mount it manually every time I start my laptop without first plugging in my portable hard drive.

Thanks

willysr 03-18-2014 10:24 AM

How do expect the system to mount something without plugging in your portable hard drive? What should it mount?

enorbet 03-18-2014 12:41 PM

If you add it to /etc/fstab it will control how and where automount mounts it. If you boot up w/o the external drive connected automount/fstab will just give a short error that it can't mount an unknown filesystem. When you do connect it, Bob's ur Uncle.

ack_iix 03-18-2014 04:23 PM

@willysr, do you really understands what I'm asking here? If you mount a file system in Linux, sometimes you have to pass appropriate mount paramaters to the -o option, for example:

Code:

mount -t ufsd -o uid=1000,gid=100,fmask=133,dmask=022,iocharset=utf8,nohidden /dev/sdb1 /mnt/wd1
My question is how do you enable automount to use all those params in '-o', because automount Slackware64 (KDE 4.12.3) seems to always use a default mount options.


@enorbet, haven't really tried your solution though because I always comment my fstab entry everytime I tinker with this issue. Will give it a try though.


Just incase you are all wondering, people from some other distro have asked this question as well:
http://ubuntuforums.org/showthread.php?t=988150
https://ask.fedoraproject.org/en/que...mount-options/
http://askubuntu.com/questions/30762...y-not-possible

ack_iix 03-18-2014 04:36 PM

Quick update:

I have these entries in /etc/fstab for mounting manually:
Code:

# WD Passport 2TB - /dev/sdb2
UUID="adbdf3df-8763-48fc-9a5c-a50e6bb30b6c" /mnt/wd2  ext4  defaults,noatime          1  3

# WD Passport 2TB - /dev/sdb1
UUID="A63A0C9C3A0C6C1D"  /mnt/wd1  ufsd  uid=1000,gid=100,fmask=133,dmask=022,iocharset=utf8,nohidden  0  0

But whan I plug my portable hard drive, the automount in KDE 4.12.3 seems to ignore these entries completely. Here's what I got from KDE automount:
Code:

/dev/sdb1 on /run/media/dwi/WD type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb2 on /run/media/dwi/Slack type ext4 (rw,nosuid,nodev,uhelper=udisks2)


enorbet 03-18-2014 04:36 PM

Quote:

Originally Posted by ack_iix (Post 5136980)

@enorbet, haven't really tried your solution though because I always comment my fstab entry everytime I tinker with this issue. Will give it a try though.

Here's an example

Code:


## Note - truncated /etc/fstab ##
## This is just for 2 specific 16G Thumbdrives ##
UUID=5424-CC68 /media/USB-1  auto    defaults,user                          0  0
UUID=1002-FB5E /media/USB-2  auto    defaults,user                          0  0

I've tried udisks2 rules and they don't hold up over upgrades so I use the above, which does.


All times are GMT -5. The time now is 09:49 AM.