{"id":209,"date":"2011-11-28T14:04:13","date_gmt":"2011-11-28T19:04:13","guid":{"rendered":"http:\/\/sites.williams.edu\/lj1\/?p=209"},"modified":"2011-12-13T15:18:09","modified_gmt":"2011-12-13T20:18:09","slug":"mac-unmounting-windows-or-any-other-volume-at-startup","status":"publish","type":"post","link":"https:\/\/sites.williams.edu\/lj1\/articles\/mac-unmounting-windows-or-any-other-volume-at-startup\/","title":{"rendered":"Mac &#8211; Unmounting Windows (or any other) volume at startup"},"content":{"rendered":"<p>To umount a Macintosh volume at start-up (for example the windows bootcamp volume) you can create a startup item &#8230;<\/p>\n<p>In:<\/p>\n<p>\/Library\/StartupItems<\/p>\n<p>Create a directory &#8220;Unmount&#8221;\u00a0 in that directory you want to put 2 files:<\/p>\n<p>Unmount<\/p>\n<p>and<\/p>\n<p>StartupParameters.plist<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Unmount<\/strong> file is a shell script with the following contents:<\/p>\n<blockquote><p>#!\/bin\/sh<br \/>\n. \/etc\/rc.common<br \/>\nif [ &#8220;$1&#8221; == &#8220;start&#8221; ]<br \/>\nthen<br \/>\n\/usr\/sbin\/diskutil unmount \/dev\/diskXXX<br \/>\nfi<\/p><\/blockquote>\n<p>The <strong>\/dev\/diskXXX<\/strong> in this file you need to change.\u00a0 My unmount command is actually &#8230;<\/p>\n<blockquote><p>\/usr\/sbin\/diskutil unmount \/dev\/disk0s3<\/p><\/blockquote>\n<p>To find the correct information for your system run the command:<\/p>\n<p>&#8220;diskutil\u00a0 info \/Volumes\/Windows\/&#8221; \u00a0\u00a0\u00a0 &#8212;- or whatever the volume name is &#8230;<\/p>\n<p>in the output you need to look for the &#8220;Device Node&#8221; .\u00a0 Whatever it says for that Device Node is what you should put in the Unmount command in the shell script above.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>StartupParameters.plist<\/strong> is a plist file that contains:<\/p>\n<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br \/>\n&lt;!DOCTYPE plist PUBLIC &#8220;-\/\/Apple Computer\/\/DTD PLIST 1.0\/\/EN&#8221;<br \/>\n&#8220;http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd&#8221;&gt;<br \/>\n&lt;plist version=&#8221;1.0&#8243;&gt;<br \/>\n&lt;dict&gt;<br \/>\n&lt;key&gt;Description&lt;\/key&gt;<br \/>\n&lt;string&gt;Try to unmount the old disk&lt;\/string&gt;<br \/>\n&lt;key&gt;Provides&lt;\/key&gt;<br \/>\n&lt;array&gt;<br \/>\n&lt;string&gt;Unmount&lt;\/string&gt;<br \/>\n&lt;\/array&gt;<br \/>\n&lt;\/dict&gt;<br \/>\n&lt;\/plist&gt;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>After creating the files, chmod them so that they are:<\/p>\n<p>-rw-r&#8211;r&#8211;\u00a0\u00a0\u00a0\u00a0 StartupParameters.plist<br \/>\n-rwxr-xr-x\u00a0\u00a0 Unmount<\/p>\n<p>Also, I set the owner and group to &#8220;root&#8221; and &#8220;wheel&#8221; respectively to match the other items in the \/Library\/StartupItems directory &#8230; (&#8220;chown -R root \/Library\/StartupItems\/Unmount\/&#8221;  and &#8220;chgrp -R wheel \/Library\/StartupItems\/Unmount\/&#8221;)<\/p>\n<p>&nbsp;<\/p>\n<p>For additional details see:<\/p>\n<p><a title=\"http:\/\/hints.macworld.com\/article.php?story=2005052804075538\" href=\"http:\/\/hints.macworld.com\/article.php?story=2005052804075538\">http:\/\/hints.macworld.com\/article.php?story=2005052804075538<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To umount a Macintosh volume at start-up (for example the windows bootcamp volume) you can create a startup item &#8230; In: \/Library\/StartupItems Create a directory &#8220;Unmount&#8221;\u00a0 in that directory you want to put 2 files: Unmount and StartupParameters.plist &nbsp; Unmount &hellip; <a class=\"more-link\" href=\"https:\/\/sites.williams.edu\/lj1\/articles\/mac-unmounting-windows-or-any-other-volume-at-startup\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,10086],"tags":[10106,10090,10089],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-articles","category-labs","tag-bootcamp","tag-mac","tag-startup"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":8,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":240,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/209\/revisions\/240"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}