How To Make An Extra Disk Partition Remain Unmounted On Boot

After buying another iMac to replace the one that was stolen a while back,  I was setting up the disk partitions and noticed that when I created a recovery partition it would automatically be mounted when the system boots up.  I don’t like this since that means anything could erroneously enter the partition by a simple background oops.  I know Linux/Unix, but the Apple uniqueness made me research for a while.

I’m not going to stretch this out since it’s relatively simple.  Open Disk Utility (Applications -> Utilities -> Disk Utility) then select the partition in question and select the “Info” button at the top.  Copy the Universal Unique Identifier value (the string to the right) to TextEdit or some other note taking utility.

Open Terminal (open spotlight, and type “Terminal“).  Type “sudo vifs“, and you will be prompted for your password.  Type it and once you hit enter a editor will appear.  Press ‘i’ on the keyboard, then enter the following line with your information (replace YOURUUID with the UUID you copied a little earlier):

UUID=YOURUUID none hfs rw,noauto

Press your escape key (esc) and type “:wq” to write and quit.  Once you are back at the command prompt, type the following to tell the system the changes were made:

sudo automount -vc

After a system reboot, the partition will remain unmounted at boot time.

This is how, after creating my recovery partition, I keep it out of sight unless needed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s