How to change default mount options to support check=relaxed
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to change default mount options to support check=relaxed
I am new to Linux (RHEL 7). Moving from Solaris. My application (which makes use of the automount features in Solaris and now Linux - no manual mounting) needs to support both iso9660 and UDF in the CD/DVD devices. Additionally, the iso9660 CDs need to make use of the ability to reference filenames as both lower and uppercase.
I attempted to make use of the 'check=relaxed' option for 'mount' by creating an entry in /etc/fstab. Worked great for iso9660 CDs. Not for UDF DVDs - it's not a valid option for UDF.
I cannot change the way media is written. Many, many consumers need the media to be written the way it has always been. Consumer systems are primarily Windows, but also Solaris and maybe other OS's.
I have been trying to find a way to change the default mount options only for iso9660 media (and leave the UDF settings alone).
I believe the system is using systemd. autofs is installed, but not enabled. I would like to keep it that way, if possible.
Any suggestions? Thanks!
Last edited by laura.ferrari; 07-19-2019 at 01:17 PM.
One thing you can do before posting is to search threads. There's a button on the 'new thread page when you fill in the subject to find similar threads. I started this one.cd-dvd-mount-options-4175657570/
Basically, /etc/fstab is where you set your mount options. On rhel 7, /etc/mtab is probably a symlink to /proc/mounts, & 'man mount' gives you the mount command's man page, giving the (many, many) options and the mount options below. Bopth /etc/mtab & /proc/mounts both show what's actually mounted with a record of what options are actually being used.
One other thing you need to know. If you want a user to be able to mount a particular disk, yopu are better specifying the 'noauto' option in /etc/fstab. Otherwise, root will mount it automatically.
Thanks @business_kid. I was unaware of the search option within the threads. I have been finding Linuxquestions.org entries via Google – they’ve been helpful so far – and the thread you pointed me to hadn’t come up in my searches. I will definitely start searching there, too.
I definitely want my application to use the automounting feature in Linux. We moved away from manually mounting on Solaris some time ago and it has been working better for our users.
Is there a way to have multiple entries in the fstab (one each for iso9660 CDs and UDF DVDs)? I tried putting in two entries, each with their own set of mount options. Only the first entry was ever used (I switched the order to make sure both entries were working properly for their respective media type.
Since I’m using the same drive to insert multiple types of media, this seems the only way to support what I need to support. Or if I can somehow tell “Linux” to change the default ‘check=strict’ to be ‘check=relaxed’. All other default settings (for both types of media) are fine for my application.
@smallpond: Thanks for the idea. I tried it and it did nothing
I think I may know why. Excerpt from a 'mount' man page (not the man pages on my system, so could be old???):
"It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and relatime VFS entry flags by "remount,bind" operation. The another (for example filesystem specific flags) are silently ignored."
Since 'check' isn't listed in the first sentence, it may mean that it is an ignored option - Boo!
But it this text is NOT in the man pages on my system, so I'm not sure what the scoop is...
dev/sr0 /mnt/cdrom auto noauto,user,noatime,exec 0 0
Note that the filesystem is auto - the box works it out. Mine does iso9660 & udf since I compiled the udf module with my latest kernel. The mount man page is boring, but good. The 'noauto' tells it not to automagically mount this disk; that's useful as a user can mount it and you don't have to resort to root. The 'exec' lets me run linux binaries from cdrom and is rarely if ever used.
@business_kid - Thanks for the fstab entry. I will look into it more, although I don't think it will work for my application. It needs to automount for our users, and root is fine for us. I'm just trying to find a way to have it automount with check=relaxed for CDs and no check setting for DVDs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.