Help - Search - Members - Calendar
Full Version: Prevent Windows HD from mounting in OSX?
InsanelyMac Forum > Apple World > OS X > Boot Camp
Adrian Fogge
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.
NeSuKuN
you CAN rename the drive, just rename it under windows.
Rammjet
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:

CODE
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.
alloutmacstoday
nice, that works very well
sashabe
Doesn't work on Leopard. It hides chosen partitions immediately, but they appear again after reboot.
downlord
Using the first of the two methods in OSX outlined found here:
http://www.insanelymac.com/forum/index.php...=23056&st=0

But it's not like switching them completely off.

EDIT: posted in wrong forum. Sorry
boy412
QUOTE (Adrian Fogge @ Nov 30 2006, 08:49 AM) *
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.
mohaas05
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.