LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2019, 04:58 AM   #16
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 987

Rep: Reputation: 259Reputation: 259Reputation: 259

This is why I mention "Head scratching", depending on the DE, the partitions may or may not be automatically mounted. None the less, inotify is likely the best tool to achieve the OPs desired objective.
 
Old 02-20-2019, 05:07 AM   #17
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 987

Rep: Reputation: 259Reputation: 259Reputation: 259
And quite frankly, the script can be designed to ensure the NTFS partition is prohibited from being mounted when the drive appears,
 
Old 02-20-2019, 05:08 AM   #18
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,014

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
Quote:
Originally Posted by Brains View Post
If I'm not mistaken, the default action is that both partitions will be automatically mounted (depending on the DE)
Just disable that in the DE? (if the OP uses one that behaves as you described in the first place...)
 
Old 02-20-2019, 05:48 AM   #19
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 987

Rep: Reputation: 259Reputation: 259Reputation: 259
The most likely behavior regardless of which DE, is that neither partition is auto-mounted until you go to access it. For lack of knowledge, my strategy is to ensure no partition is mounted before mounting the desired partition in the desired directory. Then there's another angle...
If the partition is not mounted in the default location, will you have the option of clicking on the "safely remove this drive" and getting the default desired results?

Last edited by Brains; 02-20-2019 at 05:50 AM.
 
Old 02-20-2019, 07:06 AM   #20
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,014

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
Quote:
Originally Posted by Brains View Post
The most likely behavior regardless of which DE, is that neither partition is auto-mounted until you go to access it. For lack of knowledge, my strategy is to ensure no partition is mounted before mounting the desired partition in the desired directory. Then there's another angle...
If the partition is not mounted in the default location, will you have the option of clicking on the "safely remove this drive" and getting the default desired results?
I can see where you are coming from, but you can only do so much hand holding in advance.
At the end of the day, the OP needs to implement the solution.
I don't think it's helpful to build out a complex solution here that tackles all possible scenarios, especially if that involves reverting default behavior of the DE when that behavior can be changed to meet the requirements, or might not even be present to begin with.

But I also feel we are digressing. Didn't mean to hijack this thread...
 
Old 02-20-2019, 10:02 AM   #21
dowlq
LQ Newbie
 
Registered: Feb 2019
Distribution: Kubuntu 18.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
Looks like the fstab entry works just like I wanted:
UUID=123... /mnt/mydisk ext4 defaults,noauto,user 0 0

Thank you for your help guys.
 
Old 02-20-2019, 10:11 AM   #22
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,014

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
Quote:
Originally Posted by dowlq View Post
Looks like the fstab entry works just like I wanted:
UUID=123... /mnt/mydisk ext4 defaults,noauto,user 0 0
There you go.
 
Old 02-20-2019, 03:01 PM   #23
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 987

Rep: Reputation: 259Reputation: 259Reputation: 259
I was just kind of pointing towards what the OP's original request suggest. That the NTFS partition cannot be accessed. I use KDE, when I plug a pen drive in, the device notifier pops up asking what to do, neither partition is mounted at this point but the device notifier icon will stay on the taskbar. If I choose to access one of the partitions 10 minutes later I click on the device notifier icon and access it. But when I safely remove the drive, it disappears and so does the device notifier icon and the only way I can remount this way is to pull the drive out and plug it back in again in order for the device notifier to reappear, and once ejected, there is no link to either partition in dolphin either.

So there is a process handling the drive when it is first attached, for lack of better words, in order for the NTFS partition to be inaccessible via GUI, you would want to "eject" the drive, then remount only the ext4 partition in another directory, at this point user's can't click on anything that will mount the NTFS partition, and you can go further, by also prohibiting users from accessing it via command line also with inotify.

Last edited by Brains; 02-20-2019 at 03:25 PM.
 
  


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
Question about installing audio drivers, automounting ext4 partition, and general linux skills. louierev07 Linux - Newbie 6 07-27-2016 05:17 AM
I set up an ext4 partition on external HD to store media files. permission issues rbrtscornell Linux - Newbie 9 04-20-2015 12:15 PM
How to change file system from ext4 journeying to ext4 writeback ? 5883 Linux - Newbie 6 03-10-2014 09:04 AM
modprobe: Module ext4 not found. no dependencies for kernel module 'ext4' found TheIndependentAquarius Linux - Newbie 6 01-25-2012 06:07 AM
Is it safe to format USB flash to ext4 or ext4? joham34 Linux - Newbie 2 01-08-2011 12:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 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