You are not logged in.

#1 2014-02-02 19:54:12

vinipsmaker
Member
Registered: 2011-04-15
Posts: 34
Website

[SOLVED] How do I change the default mount options for a specific f...

Hello ppl,

I wonder if one of you can point me what software component I need to change to tune the default mounting options for a specific file system. ArchLinux mount FAT32 filesystems using the utf8 arg and I have an ancient system which doesn't and I'd like to replicate the Arch changes to this ancient system.

I tried to search on the ArchWiki, but I found nothing.

Thank you in advance.

Last edited by vinipsmaker (2014-02-02 21:17:23)


Sorry for my bad english

Offline

#2 2014-02-02 19:57:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How do I change the default mount options for a specific f...

We have no idea what are you using for automounting, you have to tell us.
If you mount the drive by hand, the man page for 'mount' will tell you what options you have.

Offline

#3 2014-02-02 20:15:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] How do I change the default mount options for a specific f...

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-02-02 20:32:52

vinipsmaker
Member
Registered: 2011-04-15
Posts: 34
Website

Re: [SOLVED] How do I change the default mount options for a specific f...

karol wrote:

We have no idea what are you using for automounting, you have to tell us.

The problem is not automounting.

Sample:

vinipsmaker ~ $ sudo mount /dev/sdb1 /mnt
[sudo] password for vinipsmaker:
...
/dev/sdb1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

I didn't specified these options (codepage=437, iocharset=iso8859-1, ...) and if I try to mount a ext4 filesystem, they won't show.

I want to know how to change these default options for a specific file system. In fact, I don't want you guys to give me the solution. Just point me what software I need to change and I'll take care of reading the documentation.

karol wrote:

If you mount the drive by hand, the man page for 'mount' will tell you what options you have.

By reading the manpage, I understood that the only way to tune the default mounting options for a specific filesystem is to create /usr/bin/mount.vfat. Do you think this approach is fragile or can I proceed with it?


Sorry for my bad english

Offline

#5 2014-02-02 20:36:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How do I change the default mount options for a specific f...

Have you tried 'mount -o <some options here> /dev/sdb1 /mnt'?

Offline

#6 2014-02-02 20:38:00

vinipsmaker
Member
Registered: 2011-04-15
Posts: 34
Website

Re: [SOLVED] How do I change the default mount options for a specific f...

karol wrote:

Have you tried 'mount -o <some options here> /dev/sdb1 /mnt'?

I want to change the behaviour for all software/scripts calling the mount command.


Sorry for my bad english

Offline

#7 2014-02-02 21:10:10

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: [SOLVED] How do I change the default mount options for a specific f...

I think you can set these options in fstab on a per filesystem base.

See https://wiki.archlinux.org/index.php/fstab

Also see the FAT32 remark at the end of the article.

Regards


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#8 2014-02-02 21:16:27

vinipsmaker
Member
Registered: 2011-04-15
Posts: 34
Website

Re: [SOLVED] How do I change the default mount options for a specific f...

rebootl wrote:

I think you can set these options in fstab on a per filesystem base.

See https://wiki.archlinux.org/index.php/fstab

Also see the FAT32 remark at the end of the article.

Regards

fstab doesn't allow wildcard sources/targets. I don't want to change options for a specific partition/label/uuid. I want to change the options for all of them that belong to a certain filesystem type.

Anyway, I'll mark this topic as solved. While I'm arguing with you guys, I'm believing that the problem must be solved in another layer.


Sorry for my bad english

Offline

#9 2014-02-02 21:20:10

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,954
Website

Re: [SOLVED] How do I change the default mount options for a specific f...

vinipsmaker wrote:

I didn't specified these options (codepage=437, iocharset=iso8859-1, ...)

These are hard-set defaults in the kernel: https://git.kernel.org/cgit/linux/kerne … at/Kconfig

You can override them with mount -o, or you can recompile your kernel with different defaults. I'm not sure why you want to override these defaults, but that's up to you.

Last edited by WorMzy (2014-02-02 21:21:47)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB