macOS

Manage Bootcamp Partition

Prevent Automount

It is not always we need or want the Bootcamp windoze partition mounted. Most hardly access it... ever from the Mac. So why keep the partition mounted all the time? Makes no sense, luckily we can disable the automount for the Bootcamp partition.

Get the UDID of the Disk

We need to know the UDID of the partition disable the automount, but we need to know the disk's node to find that UDID. To find out what is the disk's node (IDENTIFIER):

diskutil list

You'll see the name of your Bootcamp Volume in the list, and next to it the disk's node. Mine is disk0s4.

To get the UDID of the Bootcamp disk we issue the command below. Make sure to change the disk node (disk0s4 in the example below):

diskutil info /dev/disk0s4 | egrep -om1 "([A-Z0-9]{8}.[A-Z0-9]{4}.+$)"


Copy of the UDID and paste it somewhere.

dozer partition

Editing Config File

We need to edit the fstab file that is located in the /etc directory. We'll use Terminal and nano:

sudo nano /etc/fstab

Type or paste the line below in it, make sure to use your UDID not the one in the example below:

UUID=A649F190-9353-45DD-8B60-1D2B85C4F5FE none ntfs rw,noauto

Save the file by pressing CTRL + O and quit CTRL + X.

From now on the Bootcamp partition will not automount anymore. And if you want to access it you'll have to manually mount it. Keep reading to find out how.

Manually Mounting

There are many ways to mount this Bootcamp (and any other) partition. Can be do inside the Disk Utility.app, or using Terminal. You can also create a service to do it. We'll cover the terminal and the service options.

Take a look also at Mounty - Build-in NTFS r/w. It is another nice option with an interface and r/w native support.

Mounting Using the Terminal

The command to mount the Bootcamp disk is:

diskutil mount DISK_NODE

In our example that would be:

diskutil mount /dev/disk0s4
Mounting Using a Service

Now that's fast and easy! What we need to do is create an Automator service that we can either access thru the Finder menu options or thru a hotkey combination. Follow these steps:

  1. Open Automator.app
  2. Select Service and click on Choose
  3. Find the option Run Shell Script and drag it to the right pane
  4. In Service receive selected select no input
  5. Change any application to Finder.app
  6. In the Run Shell Script box delete the cat command and type:

    diskutil mount DISK_NODE

Where DISK_NODE is the Bootcamp disk node, in our example it would be:

diskutil mount /dev/disk0s4

Now save the file with File > Save. A good name is "Mount Bootcamp"

dozer automator

You can now mount the Bootcamp partition by clicking on the Finder's menu:

Finder > Services > Mount Bootcamp

dozer service

As you can see mine has a hotkey linked to it, which makes things even easier. Anywhere with Finder selected I can press the hotkey and the Bootcamp will be mounted.

Service Hotkey
  1. Open System Preferences click on Keyboard and select the Shortcuts tab.
  2. In the left panel select Services
  3. In the right panel find and select the "Mount Bootcamp" line
  4. Click on add shortcut and press a sequence.

Make sure the combination is unique, don't use something like CMD + C.

I choose CTRL + ALT + CMD + D.

dozer service prefs