Jump to content

HOW TO: Unmount Windows Partition on Startup


rewecow
 Share

7 posts in this topic

Recommended Posts

Hey,

I didn't want the windows partition to mount while in OS X (using the boot camp dual boot), so I went searching for a solution. Mostly thanks to the help of this hint - http://www.macosxhints.com/article.php?sto...005052804075538 - I was able to get what I wanted. Here are the steps:

 

1) Open terminal and type cd /Library/StartupItems

 

2) Make a directory in this folder called Unmount by typing sudo mkdir Unmount

 

You will have to type your root password for sudo.

 

3) Set the permissions on this folder by typing sudo chmod 755 Unmount

 

4) Enter this folder by typing cd Unmount

 

5) Create a file called Unmount by typing sudo pico Unmount

 

6) Copy and paste the following code into pico:

 

#!/bin/sh

. /etc/rc.common

if [ "$1" == "start" ]

then

/usr/sbin/diskutil unmount /dev/REPLACE_WITH_PARTITIONS_NAME

fi

 

7) Replace REPLACE_WITH_PARTITIONS_NAME with the name of your windows partition. Apple defaults it to Untitled, but you may have renamed yours.

 

8) Press ctrl - x to exit pico, and make sure to press Y and enter when it asks if you want to save.

 

9) Create another file called StartupParameters.plist by typing sudo pico StartupParameters.plist

 

10) Copy and paste the following code into pico:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"

"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Description</key>

<string>Try to unmount the old disk</string>

<key>Provides</key>

<array>

<string>Unmount</string>

</array>

</dict>

</plist>

 

11) Press ctrl - x to exit pico, and make sure to press Y and enter when it asks if you want to save.

 

12) Set the permissions on the Unmount file by typing sudo chmod 755 Unmount

 

13) Restart. Done.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

This worked for me but I have to change /Library/StartupItems/Unmount/Unmount from this:

 

#!/bin/sh

. /etc/rc.common

if [ "$1" == "start" ]

then

/usr/sbin/diskutil unmount /dev/Untitled ###change this line###

fi

 

to this:

 

#!/bin/sh

. /etc/rc.common

if [ "$1" == "start" ]

then

/usr/sbin/diskutil unmount /Volumes/Untitled ###to this###

fi

 

Hope this helps

Link to comment
Share on other sites

 Share

×
×
  • Create New...