LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 03:58 AM   #16
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389

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, 04:07 AM   #17
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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, 04:08 AM   #18
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,019

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
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, 04:48 AM   #19
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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 04:50 AM.
 
Old 02-20-2019, 06:06 AM   #20
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,019

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
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, 09: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, 09:11 AM   #22
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,019

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
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, 02:01 PM   #23
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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 02:25 PM.
 
  


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

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

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