Written by Colin on 8/09/2010

If you're on a Mac with Windows installed via Bootcamp then you've no doubt noticed that the Bootcamp partition mounts as another drive when using OSX. I rarely needed access to the contents of my Bootcamp installation so I thought it'd be nice to prevent the partition from mounting at all on the Mac side of things. There's a relatively easy way to achieve this using just a little bit of command line inputs. The only things you need to know are tje name of your Bootcamp partition and the type of formating (NTFS or FAT). You will also need administrative rights on the computer. In my case, it's just "BOOTCAMP" in all capital letters. It's important that you get the capitalization and spelling correct otherwise this won't work. If you have a space in the name then you'll need to modify the text a bit. All you need to do is add a backslash slash (\) immediately before the space in the name (e.g. "Windows\ Drive").

Armed with the name of your partition, open up the Terminal application (Applications/Utilities/Terminal.app) and type in the following command

sudo pico /etc/fstab

You will be prompted to enter an administrator password (more than likely just your account password) to continue.

This will create and open a file on the command line where you will then enter the following text, replacing "DriveName" with the name of your partition (e.g. BOOTCAMP).

LABEL=DriveName none ntfs rw,noauto 0 0

Note that if you have a FAT32 formatted drive you will need to change the "ntfs" to "msdos" for this to work.

Press the keys Control + o and then enter to save the modifications to the file. Press the keys Control + x to exit the file editing interface. At this point you're done and you can exit Terminal. If you've done it correctly, the next time you restart your computer the Bootcamp partition shouldn't be mounted. You can always mount it manually with the Disk Utility application.

Note that this isn't limited to just the Bootcamp drive, you can do it with any partition on your computer's internal or external drives.

1 Comments:

Nathan said...

Thanks! I've been wondering how to do that. I'm sure one of these days I just accidentally delete a bunch of stuff from the wrong partition!

Related Posts with Thumbnails