Jump to content

Can I turn off automounting for my NTFS volume?


xtraa
 Share

20 posts in this topic

Recommended Posts

Hi :)

 

When I start my OSX, It allways automounts all volumes including my Windows NTFS volume on the desktop.

But I don't want to mount it in OSX anymore, because I can't use it anyway.

 

Also what me scares is that clicking noise when OSX puts the drive into sleep mode or wake it up.

 

Spooky :huh::(

 

Drivetest and other tools says the volume is ok, but i saw lots of drives doing this kind of noise before crossing

the jordan.

 

So i did a search but i did not found anything really related. normally Apple comes without ntfs volumes on

it :D and that makes it hard to find at google. So maybe you can help me out?

 

I would appreciate any hint on this.

Link to comment
Share on other sites

thanks antrunix,

 

good idea :) but unfortunately that does not show any effect here,

it is already unchecked. also checking it > reboot > unchecking it

does not work.

Edited by xtraa
Link to comment
Share on other sites

When I start my OSX, It allways automounts all volumes including my Windows NTFS volume on the desktop.

But I don't want to mount it in OSX anymore, because I can't use it anyway.

You can probably write an AppleScript that automatically unmounts the NTFS volume when you login.

tell application "Terminal"
activate
do script "diskutil unmount disk0s8
quit
end tell

Save that as an Application and drag it into the Login Items in the Accounts PrefPane.

 

 

Also what me scares is that clicking noise when OSX puts the drive into sleep mode or wake it up.

You can turn off putting hard drives to sleep. In the Energy Saver PrefPane, or using the CHUD Tools.

 

Michael

Link to comment
Share on other sites

  • 5 months later...

For some odd reason I tried making a script using Finder instead of Terminal (because you're opening and closing an application) and it won't let me eject a specifically named disk. grrr

 

Although you might want to put in a "delay 8" in that script before quitting Terminal or else it might try and quit in the middle of a process (and thus ruin any chance of a seemless operation because you're being asked to quit). The completed script would look like this:

 

tell application "Terminal"

activate

do script "diskutil unmount disk0s8"

delay 8

quit

end tell

 

tried it. Works beautifully. You can set the delay trigger to however long you want it to be in seconds.

Link to comment
Share on other sites

The shortcut method doesn't really work for me since I found the NTFS partition has significant negative impact on spotlight performances since OS X can't write the index files to it, unmounting it prevent spotlight from searching it all together.

You can also use "do shell script" in applescript so you don't need to call Terminal, just

do shell script "diskutil unmount disk0s8"

replace disk0s8 with whatever identifier the disk you want to unmount has. I run this on startup to unmount my windows partition on my iMac, but somehow it is always really slow (taking up to 10 seconds or more to unmount it after the script is run), any one know any cause?

Link to comment
Share on other sites

I run this on startup to unmount my windows partition on my iMac, but somehow it is always really slow (taking up to 10 seconds or more to unmount it after the script is run), any one know any cause?

Did you save the script as a bundled application? Have you tried to run the script in system run services and not per user?

Link to comment
Share on other sites

Here's what I use...

 

tell application "Finder"
if (exists disk "WINDOWS") then
	tell application "Terminal"
		activate
		do script "diskutil unmount disk0s3"
		delay 2
		quit
	end tell
end if
end tell

 

If someone could tell me how to make this run in the background, that'd be spectacular!

Link to comment
Share on other sites

This is closer to what I'm after; but I don't even want to see the shell flash...

 

tell application "Finder"
if (exists disk "WINDOWS") then
	tell application "Terminal"
		do script "diskutil unmount disk0s3"
		set visible of every window to false
		delay 2
		quit
	end tell
end if
end tell

Link to comment
Share on other sites

Did you save the script as a bundled application? Have you tried to run the script in system run services and not per user?

Yes i saved it as an app, but it's per user, that's probably the cause, thanks for the tip.

 

@jgrimes80: don't call terminal, use "do shell script" instead, you wont see shell pop up then. (what Nonny Moose wrote there)

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...

Easiest Method I have found.... In terminal type:

 

sudo pico /etc/rc

scroll down to the bottom of the file

 

insert the following at the end of the file

 

diskutil unmount /Volumes/"Name Of Volume"

 

hit ctrl -o to save

hit ctrl x to exit

 

reboot

 

done.

Link to comment
Share on other sites

Usually when you update the system, the rc file gets replaced and you have to remember to do it again.

 

However, if you create an /etc/rc.local file and put the command in that, the file won't get replaced during an update, except in a clean install. The rc file looks for an rc.local file before it quits.

Link to comment
Share on other sites

 Share

×
×
  • Create New...