Jump to content
Adrian Fogge

Prevent Windows HD from mounting in OSX?

11 posts in this topic

Recommended Posts

Is there a way to prevent the Windows HD from mounting at login in OSX?

 

Frankly, I would rather not see any hard disk icons on my desktop, but it is one of those things where "why not" comes into play.

 

The point is that if I can not rename the drive to something other than "Untitled", then I do not want to see it, because the only reason why I have an XP installation in the first place is to play a little HL2, CS:S and Eve.

Share this post


Link to post
Share on other sites
Advertisement

To change the name of your Windows partition:

If your Windows partition is formatted as NTFS, you must change its name only in Windows since OSX cannot write to it.

 

If the partition is FAT32, you can change the name of the partition just like anything else:
click on the icon, press <Enter>, type name, press <Enter>.

You can stop ALL drive icons from appearing on your Desktop:

Finder menu -> Preferences -> General -> UNcheck the "Hard Disk" box

 

To access your hidden drives/partitions, click on the Finder icon in the Dock and select the disk/partition in the left pane.

If you only want to unmount the Windows partition, then use Terminal (in Utilities folder) to create a system file called rc.local.

Type this in Terminal:

 

diskutil list						   <-- get the Name of the Windows partition
									  - I'll assume it is "Untitled"

sudo nano /etc/rc.local				 <-- 2 slashes in there, don't lose one
  (give password)

diskutil unmount "/Volumes/Untitled"	<-- use correct name there
									  - use quotes if name has spaces
  (press Control-O to save)
  (press Y and then Enter to accept)
  (press Control-X to exit)

Then reboot.

 

Since the partition is unmounted, you will not be able to browse Windows files from OSX.

Share this post


Link to post
Share on other sites

Doesn't work on Leopard. It hides chosen partitions immediately, but they appear again after reboot.

Share this post


Link to post
Share on other sites
Is there a way to prevent the Windows HD from mounting at login in OSX?

 

This is how I did it:

 

(Snipped from this tutorial)

 

To toggle the invisibility bit of a single file, however, you?ll again need help from Apple's Xcode Tools software. This time you need a Unix program called SetFile. You'll find it, together with a collection of other Unix software, in the /Developer/Tools directory.

 

By default, the software in the Tools directory will not run simply by typing the name of the program (there are many ways to resolve this inconvenience, but that's a subject for another article). Here's the quickest and easiest way to put SetFile in action and use it modify a file's invisibility status:

 

  1. Launch Terminal.
  2. Open the /Developer/Tools folder in the Finder. Locate SetFile and drag its icon to the terminal window. The Directory path for SetFile (/Developer/Tools/SetFile) should appear in the Unix command line prompt.
  3. Type: -a V . Leave a space after the upper case V.
  4. Locate the file that you want to make invisible. Drag its icon to the Terminal window. Its path should now be added to the same command line prompt.

Thus, for our aforementioned MyDoc file on the Desktop, when you are done doing all of the above, the command line should look like this:

  • /Developer/Tools/SetFile -a V /Users/homedirectoryname/Desktop/MyDoc

where homedirectoryname is the name of your home directory (mine is landau, for example).

 

Now, press Return. This immediately enables the invisibility bit -- although, just as when doing this with XRay, the file will not actually turn invisible until the Finder is relaunched.

 

To reverse directions with SetFile, you do almost the same thing with two exceptions:

 

  1. Use a lower case v instead of an upper case V. This disables the invisible bit.
  2. Since you can't drag an invisible file's icon to the Terminal window, you'll need to know the file's path. If you haven't moved it from its prior location, the path is the same as the one that you used when you made the file invisible. Just retype it.

Share this post


Link to post
Share on other sites

You can also go into Windows, and rename the drive with a period in the beginning of the name (like .BootCamp). This will cause it to show as invisible in OS X.

Share this post


Link to post
Share on other sites

I saw earlier up there was mention of not wanting to see ANY hard drives on the desktop. I think it was Onyx, Deeper, or Tinker Tool that actually disable the desktop entirely. Imagine never having clutter. It's fantastic.

 

It's a bit overkill for many people, but it makes using your mac a lot more intense.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×