LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-13-2018, 05:51 PM   #1
OutSiderBR
Member
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 69

Rep: Reputation: Disabled
mount default options


In OpenSUSE Leap 15, if I type as root
Code:
mount /dev/sdb1 /mnt/tmp
for a USB stick with vfat (partition type b), Leap automatically uses default options and mounts it like:

Code:
/dev/sdb1 on /mnt/tmp type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
If I type in the same command in Slackware I get different default mount options:

Code:
/dev/sdb1 on /mnt/tmp type vfat (rw)
What configuration files should I change to mimic the Leap15 mount options?

Thanks for the attention.
 
Old 09-14-2018, 01:56 AM   #2
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Fleury-les-Aubrais, 120 km south of Paris
Distribution: Devuan, Debian, Mandrake, Freeduc (the one I used to work on), Slackware, MacOS X
Posts: 251

Rep: Reputation: 49
/etc/fstab if the key will always be in /dev/sdb1

Otherwise you'll have to deal with udev rules and I'm not expert in this.
 
Old 09-14-2018, 07:20 AM   #3
lecho
Member
 
Registered: Jan 2013
Location: Warsaw, Poland
Distribution: Slackware
Posts: 32

Rep: Reputation: Disabled
It seems that the "mount" command does not print all options used for a given mountpoint. Try the "findmnt" command or "cat /proc/mounts" to check options in use.

Last edited by lecho; 09-14-2018 at 07:21 AM. Reason: typo
 
1 members found this post helpful.
Old 09-14-2018, 07:48 AM   #4
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
What is it that you want to do and why?
Do you want to set specific permissions or charset for one drive?
What functionality is it that you are missing
 
Old 09-14-2018, 10:53 AM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Stéphane Ascoët View Post
/etc/fstab if the key will always be in /dev/sdb1

Otherwise you'll have to deal with udev rules and I'm not expert in this.
You could also use persistent naming in the fstab if /dev/sdb1 could change. Something like a label or UUID would work.
 
Old 09-17-2018, 08:17 AM   #6
OutSiderBR
Member
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 69

Original Poster
Rep: Reputation: Disabled
Thank you all very much for the replies. I was just curious about how to set this default rule. It may well be in udev, indeed. I know how to set the default options in fstab or on the command line as root, no problem with that. I would like to tweak my Slack o behave like that. I will search a bit further and check Leap 15 rules.

Once again, thank you very much.
 
Old 09-17-2018, 09:04 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
My question would be why you want the same default options.

As an aside, and for a vfat file system if I read correctly the man page for the mount command:
  • codepage=437 is the default so this option is useless.
  • iocharset=iso8859-1 is the default so this option is useless.

Last edited by Didier Spaier; 09-17-2018 at 09:21 AM. Reason: last statement was wrong, removed.
 
Old 09-17-2018, 10:07 AM   #8
OutSiderBR
Member
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 69

Original Poster
Rep: Reputation: Disabled
Didier, I would like to know it out of curiosity only. Suppose I want to set the default page to iso8859-15 with the euro sign. I would like to know how to do it. Just for the sake of knowing it.
 
Old 09-17-2018, 11:28 AM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by OutSiderBR View Post
Didier, I would like to know it out of curiosity only. Suppose I want to set the default page to iso8859-15 with the euro sign. I would like to know how to do it. Just for the sake of knowing it.
Some of them are set in the kernel. I don't have a modern config in front of me, but I was able to extract this from an old page at the ArchWiki (it has since been merged with other articles and that information no longer resides on the current article).

Code:
$ zgrep -e FAT -e DOS /proc/config.gz | sort -r 
# DOS/FAT/NT Filesystems
CONFIG_FAT_FS=m
CONFIG_MSDOS_PARTITION=y
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NCPFS_SMALLDOS=y
Leap might also have a script when calling mount.vfat to specify specific options (also found on that ArchWiki page).

Code:
/usr/bin/mount.vfat
#!/bin/bash
#mount VFAT with full rw (read-write) permissions for all users
#/usr/bin/mount -i -t vfat -oumask=0000,iocharset=utf8 "$@"
#The above is the same as
mount -i -t vfat -oiocharset=utf8,fmask=0000,dmask=0000 "$@"
 
1 members found this post helpful.
Old 09-17-2018, 01:27 PM   #10
OutSiderBR
Member
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 69

Original Poster
Rep: Reputation: Disabled
Thanks, bassmadrigal.
 
Old 09-17-2018, 02:18 PM   #11
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 184

Rep: Reputation: Disabled
Did you try the `findmnt' command as @lecho suggested?

If I do that I find that a vfat device is actually mounted with the same default options as Leap, it's just that the `mount' command doesn't show them by default.
 
Old 09-18-2018, 06:03 AM   #12
OutSiderBR
Member
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Loomx View Post
Did you try the `findmnt' command as @lecho suggested?

If I do that I find that a vfat device is actually mounted with the same default options as Leap, it's just that the `mount' command doesn't show them by default.
I did it and in fact the options are there. Now I know that there are some places to set the default parameters. Thanks a lot !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Java Options vs. Tomcat6 Options Orangutanklaus Linux - Software 2 05-09-2013 09:38 AM
urpmi default options mdk 10.0 jayzuz Mandriva 0 07-29-2004 05:46 PM
default kernel options whysyn Slackware 1 06-16-2003 11:27 PM
default user options? hux Linux - Security 2 12-18-2002 10:19 AM
changing the default options on a command? IceNineJon Linux - Newbie 6 08-24-2002 12:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration