LinuxQuestions.org
Visit Jeremy's Blog.
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, 06:51 PM   #1
OutSiderBR
LQ Newbie
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 12

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, 02:56 AM   #2
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Orleans, 120 km south of Paris
Distribution: Mandrake, Freeduc (the one I'm making), Slackware, MacOS X
Posts: 218

Rep: Reputation: 45
/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, 08:20 AM   #3
lecho
LQ Newbie
 
Registered: Jan 2013
Location: Warsaw, Poland
Distribution: Slackware
Posts: 18

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 08:21 AM. Reason: typo
 
1 members found this post helpful.
Old 09-14-2018, 08:48 AM   #4
Nille_kungen
Member
 
Registered: Jul 2005
Posts: 468

Rep: Reputation: 149Reputation: 149
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, 11:53 AM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,428

Rep: Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206
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, 09:17 AM   #6
OutSiderBR
LQ Newbie
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 12

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, 10:04 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,585

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 10:21 AM. Reason: last statement was wrong, removed.
 
Old 09-17-2018, 11:07 AM   #8
OutSiderBR
LQ Newbie
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 12

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, 12:28 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,428

Rep: Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206Reputation: 3206
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, 02:27 PM   #10
OutSiderBR
LQ Newbie
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 12

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

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, 07:03 AM   #12
OutSiderBR
LQ Newbie
 
Registered: Jan 2015
Location: São Paulo-SP-Brazil
Distribution: Slackware
Posts: 12

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:38 AM
urpmi default options mdk 10.0 jayzuz Mandriva 0 07-29-2004 06:46 PM
default kernel options whysyn Slackware 1 06-17-2003 12:27 AM
default user options? hux Linux - Security 2 12-18-2002 11:19 AM
changing the default options on a command? IceNineJon Linux - Newbie 6 08-24-2002 01:07 PM

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

All times are GMT -5. The time now is 01:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration